Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266492
b: refs/heads/master
c: 294e7d7
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Oct 8, 2011
1 parent faafc8e commit e5d8c3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 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: 4be000c874576541cd1d4d0498a0a72a1c60bf0b
refs/heads/master: 294e7d78f5b929536b81620ed33c6507f2921463
1 change: 0 additions & 1 deletion trunk/drivers/net/ethernet/intel/igb/igb.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ struct igb_ring {
};

enum e1000_ring_flags_t {
IGB_RING_FLAG_RX_CSUM,
IGB_RING_FLAG_RX_SCTP_CSUM,
IGB_RING_FLAG_TX_CTX_IDX,
IGB_RING_FLAG_TX_DETECT_HANG
Expand Down
22 changes: 6 additions & 16 deletions trunk/drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,6 @@ static int igb_alloc_queues(struct igb_adapter *adapter)
ring->dev = &adapter->pdev->dev;
ring->netdev = adapter->netdev;
ring->numa_node = adapter->node;
/* enable rx checksum */
set_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags);
/* set flag indicating ring supports SCTP checksum offload */
if (adapter->hw.mac.type >= e1000_82576)
set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags);
Expand Down Expand Up @@ -1811,19 +1809,8 @@ static u32 igb_fix_features(struct net_device *netdev, u32 features)

static int igb_set_features(struct net_device *netdev, u32 features)
{
struct igb_adapter *adapter = netdev_priv(netdev);
int i;
u32 changed = netdev->features ^ features;

for (i = 0; i < adapter->num_rx_queues; i++) {
if (features & NETIF_F_RXCSUM)
set_bit(IGB_RING_FLAG_RX_CSUM,
&adapter->rx_ring[i]->flags);
else
clear_bit(IGB_RING_FLAG_RX_CSUM,
&adapter->rx_ring[i]->flags);
}

if (changed & NETIF_F_HW_VLAN_RX)
igb_vlan_mode(netdev, features);

Expand Down Expand Up @@ -5807,9 +5794,12 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
{
skb_checksum_none_assert(skb);

/* Ignore Checksum bit is set or checksum is disabled through ethtool */
if (!test_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags) ||
(status_err & E1000_RXD_STAT_IXSM))
/* Ignore Checksum bit is set */
if (status_err & E1000_RXD_STAT_IXSM)
return;

/* Rx checksum disabled via ethtool */
if (!(ring->netdev->features & NETIF_F_RXCSUM))
return;

/* TCP/UDP checksum error bit is set */
Expand Down

0 comments on commit e5d8c3c

Please sign in to comment.