Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200511
b: refs/heads/master
c: 28c8e47
h: refs/heads/master
i:
  200509: 42d4c78
  200507: 13bf62e
  200503: c5bfe12
  200495: b2f3b52
  200479: 6948ead
  200447: 5477c92
v: v3
  • Loading branch information
Andy Gospodarek authored and David S. Miller committed Jun 14, 2010
1 parent a11fe95 commit 37315aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7837e58ce39bd727e0a163e7d34e479df36f6d29
refs/heads/master: 28c8e4790ca5ef75f54895ca46437f9fbb433ddf
37 changes: 8 additions & 29 deletions trunk/drivers/net/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2077,25 +2077,6 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
return 0;
}

/*
* this function must be called before setting the new value of
* rx_itr_setting
*/
static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter,
struct ethtool_coalesce *ec)
{
/* check the old value and enable RSC if necessary */
if ((adapter->rx_itr_setting == 0) &&
(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) {
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
adapter->netdev->features |= NETIF_F_LRO;
DPRINTK(PROBE, INFO, "rx-usecs set to %d, re-enabling RSC\n",
ec->rx_coalesce_usecs);
return true;
}
return false;
}

static int ixgbe_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec)
{
Expand Down Expand Up @@ -2124,9 +2105,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
(1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE))
return -EINVAL;

/* check the old value and enable RSC if necessary */
need_reset = ixgbe_reenable_rsc(adapter, ec);

/* store the value in ints/second */
adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs;

Expand All @@ -2135,9 +2113,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
/* clear the lower bit as its used for dynamic state */
adapter->rx_itr_setting &= ~1;
} else if (ec->rx_coalesce_usecs == 1) {
/* check the old value and enable RSC if necessary */
need_reset = ixgbe_reenable_rsc(adapter, ec);

/* 1 means dynamic mode */
adapter->rx_eitr_param = 20000;
adapter->rx_itr_setting = 1;
Expand All @@ -2157,10 +2132,11 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
*/
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
netdev->features &= ~NETIF_F_LRO;
DPRINTK(PROBE, INFO,
"rx-usecs set to 0, disabling RSC\n");

if (netdev->features & NETIF_F_LRO) {
netdev->features &= ~NETIF_F_LRO;
DPRINTK(PROBE, INFO, "rx-usecs set to 0, "
"disabling LRO/RSC\n");
}
need_reset = true;
}
}
Expand Down Expand Up @@ -2255,6 +2231,9 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
}
} else if (!adapter->rx_itr_setting) {
netdev->features &= ~ETH_FLAG_LRO;
if (data & ETH_FLAG_LRO)
DPRINTK(PROBE, INFO, "rx-usecs set to 0, "
"LRO/RSC cannot be enabled.\n");
}
}

Expand Down

0 comments on commit 37315aa

Please sign in to comment.