All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments
@ 2016-09-13  8:09 Hariprasad Shenai
  2016-09-15 23:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Shenai @ 2016-09-13  8:09 UTC (permalink / raw
  To: netdev; +Cc: davem, leedom, nirranjan, Hariprasad Shenai

The checksum provided by the device doesn't include the L3 headers,
as IPv6 expects

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
V2: Fixed compilation issue reported by kbuild bot

 drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index c8fd4f8fe1fa..f3ed9ce99e5e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1648,14 +1648,15 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
 
 	if (csum_ok && !pkt->err_vec &&
 	    (be32_to_cpu(pkt->l2info) & (RXF_UDP_F | RXF_TCP_F))) {
-		if (!pkt->ip_frag)
+		if (!pkt->ip_frag) {
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
-		else {
+			rxq->stats.rx_cso++;
+		} else if (pkt->l2info & htonl(RXF_IP_F)) {
 			__sum16 c = (__force __sum16)pkt->csum;
 			skb->csum = csum_unfold(c);
 			skb->ip_summed = CHECKSUM_COMPLETE;
+			rxq->stats.rx_cso++;
 		}
-		rxq->stats.rx_cso++;
 	} else
 		skb_checksum_none_assert(skb);
 
-- 
2.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCHv2 net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments
  2016-09-13  8:09 [PATCHv2 net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments Hariprasad Shenai
@ 2016-09-15 23:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-09-15 23:38 UTC (permalink / raw
  To: hariprasad; +Cc: netdev, leedom, nirranjan

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Tue, 13 Sep 2016 13:39:24 +0530

> The checksum provided by the device doesn't include the L3 headers,
> as IPv6 expects
> 
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
> ---
> V2: Fixed compilation issue reported by kbuild bot

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-15 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13  8:09 [PATCHv2 net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments Hariprasad Shenai
2016-09-15 23:38 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.