Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150042
b: refs/heads/master
c: 2844f79
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Apr 28, 2009
1 parent b5031d4 commit a389d6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 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: 3935358ebcb8320965478c0e8ee070e1d65851c8
refs/heads/master: 2844f7975837d47fe7f20aa96c1df3bcecf91935
2 changes: 1 addition & 1 deletion trunk/drivers/net/igb/e1000_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@
#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400

/* Receive Checksum Control */
#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
#define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */
#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */

/* Header split receive */
Expand Down
30 changes: 11 additions & 19 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2236,29 +2236,21 @@ static void igb_configure_rx(struct igb_adapter *adapter)
mrqc |= (E1000_MRQC_RSS_FIELD_IPV6_UDP_EX |
E1000_MRQC_RSS_FIELD_IPV6_TCP_EX);


wr32(E1000_MRQC, mrqc);

/* Multiqueue and raw packet checksumming are mutually
* exclusive. Note that this not the same as TCP/IP
* checksumming, which works fine. */
rxcsum = rd32(E1000_RXCSUM);
rxcsum |= E1000_RXCSUM_PCSD;
wr32(E1000_RXCSUM, rxcsum);
} else {
} else if (adapter->vfs_allocated_count) {
/* Enable multi-queue for sr-iov */
if (adapter->vfs_allocated_count)
wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ);
/* Enable Receive Checksum Offload for TCP and UDP */
rxcsum = rd32(E1000_RXCSUM);
if (adapter->rx_csum)
rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE;
else
rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE);

wr32(E1000_RXCSUM, rxcsum);
wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ);
}

/* Enable Receive Checksum Offload for TCP and UDP */
rxcsum = rd32(E1000_RXCSUM);
/* Disable raw packet checksumming */
rxcsum |= E1000_RXCSUM_PCSD;
/* Don't need to set TUOFL or IPOFL, they default to 1 */
if (!adapter->rx_csum)
rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL);
wr32(E1000_RXCSUM, rxcsum);

/* Set the default pool for the PF's first queue */
igb_configure_vt_default_pool(adapter);

Expand Down

0 comments on commit a389d6c

Please sign in to comment.