提交 56fbbb4e 编写于 作者: A Alexander Duyck 提交者: David S. Miller

igb: cleanup incorrect comment and set IP Checksum Enable

IP Checksum enable doesn't need packet split in order to function.  It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Acked-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1e5c3d21
...@@ -2059,17 +2059,11 @@ static void igb_configure_rx(struct igb_adapter *adapter) ...@@ -2059,17 +2059,11 @@ static void igb_configure_rx(struct igb_adapter *adapter)
} else { } else {
/* Enable Receive Checksum Offload for TCP and UDP */ /* Enable Receive Checksum Offload for TCP and UDP */
rxcsum = rd32(E1000_RXCSUM); rxcsum = rd32(E1000_RXCSUM);
if (adapter->rx_csum) { if (adapter->rx_csum)
rxcsum |= E1000_RXCSUM_TUOFL; rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE;
else
rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE);
/* Enable IPv4 payload checksum for UDP fragments
* Must be used in conjunction with packet-split. */
if (adapter->rx_ps_hdr_size)
rxcsum |= E1000_RXCSUM_IPPCSE;
} else {
rxcsum &= ~E1000_RXCSUM_TUOFL;
/* don't need to clear IPPCSE as it defaults to 0 */
}
wr32(E1000_RXCSUM, rxcsum); wr32(E1000_RXCSUM, rxcsum);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册