Bug 509585 - [RHEL 5.3] problems changing coalesce settings <=12us on bnx2x
Summary: [RHEL 5.3] problems changing coalesce settings <=12us on bnx2x
Keywords:
Status: CLOSED DUPLICATE of bug 522600
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Flavio Leitner
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 533192
TreeView+ depends on / blocked
 
Reported: 2009-07-03 18:59 UTC by Flavio Leitner
Modified: 2010-11-09 12:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-09 07:19:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch fixing rx coalesce (2.05 KB, patch)
2009-07-06 17:39 UTC, Flavio Leitner
no flags Details | Diff

Description Flavio Leitner 2009-07-03 18:59:05 UTC
Description of problem:

  Setting to anything <= 12 causes all network traffic to 'disappear',
  cannot ping, telnet, etc.
  Bringing the interface down, then setting to > 12 will correct the issue.


Version-Release number of selected component (if applicable):
  RHEL 5.3 x86_64 (-155 from dzickus tested as well)


How reproducible:
  Always


Relevant code:
static int bnx2x_set_coalesce(struct net_device *dev,
                             struct ethtool_coalesce *coal)
{
       struct bnx2x *bp = netdev_priv(dev);

       bp->rx_ticks = (u16) coal->rx_coalesce_usecs;
       if (bp->rx_ticks > 3000)
               bp->rx_ticks = 3000;
...
       if (netif_running(dev))
               bnx2x_update_coalesce(bp);

and

static void bnx2x_update_coalesce(struct bnx2x *bp)
{
               REG_WR8(bp, BAR_USTRORM_INTMEM +
                       USTORM_SB_HC_TIMEOUT_OFFSET(port, sb_id,
                                                   U_SB_ETH_RX_CQ_INDEX),
                       bp->rx_ticks/12);

Usually a code like that 'rx_ticks/12' means the board register accepts
multiples of 12, so you can configure 0us, 12us, 24us, 36us, 48us, 60us...
Upstream does that too.
Broadcom driver does that too.

I looks like a hardware limitation, though I don't have any detailed
board specification to make sure.

However, it should not stop working because someone tried to configure
a value less or equal 12us.

Comment 5 Flavio Leitner 2009-07-06 17:39:13 UTC
Created attachment 350651 [details]
patch fixing rx coalesce 

Hi,

I've received a feedback from Broadcom on this. The FW supports coalescing
in 12us granularity, and so value of less then 12 should be interpreted as
disabling coalescing.

Could you give a try on the attached patch?

thank you,
Flavio

Comment 16 Stanislaw Gruszka 2010-02-09 07:19:15 UTC
I missed/forgot about that bug. It is duplicate (already solved).

*** This bug has been marked as a duplicate of bug 522600 ***


Note You need to log in before you can comment on or make changes to this bug.