aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-09-13 08:59:44 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-18 16:13:46 -0400
commite488921f44765e8ab6c48ca35e3f6b78df9819df (patch)
tree828ab3039c520cca06e85f5e135385774e6ac28d /drivers/net/ethernet
parentc25463722509fef0ed630b271576a8c9a70236f3 (diff)
bnx2x: fix rx checksum validation for IPv6
Commit d6cb3e41 "bnx2x: fix checksum validation" caused a performance regression for IPv6. Rx checksum offload does not work. IPv6 packets are passed to the stack with CHECKSUM_NONE. The hardware obviously cannot perform IP checksum validation for IPv6, because there is no checksum in the IPv6 header. This should not prevent us from setting CHECKSUM_UNNECESSARY. Tested on BCM57711. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index af20c6ee2cd9..e8e97a7d1d06 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -662,14 +662,16 @@ void bnx2x_csum_validate(struct sk_buff *skb, union eth_rx_cqe *cqe,
662 struct bnx2x_fastpath *fp, 662 struct bnx2x_fastpath *fp,
663 struct bnx2x_eth_q_stats *qstats) 663 struct bnx2x_eth_q_stats *qstats)
664{ 664{
665 /* Do nothing if no IP/L4 csum validation was done */ 665 /* Do nothing if no L4 csum validation was done.
666 666 * We do not check whether IP csum was validated. For IPv4 we assume
667 * that if the card got as far as validating the L4 csum, it also
668 * validated the IP csum. IPv6 has no IP csum.
669 */
667 if (cqe->fast_path_cqe.status_flags & 670 if (cqe->fast_path_cqe.status_flags &
668 (ETH_FAST_PATH_RX_CQE_IP_XSUM_NO_VALIDATION_FLG | 671 ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG)
669 ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG))
670 return; 672 return;
671 673
672 /* If both IP/L4 validation were done, check if an error was found. */ 674 /* If L4 validation was done, check if an error was found. */
673 675
674 if (cqe->fast_path_cqe.type_error_flags & 676 if (cqe->fast_path_cqe.type_error_flags &
675 (ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG | 677 (ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG |