diff mbox

[net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments

Message ID 1473750899-12866-1-git-send-email-hariprasad@chelsio.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Hariprasad Shenai Sept. 13, 2016, 7:14 a.m. UTC
The checksum provided by the device doesn't include the L3 headers,
as IPv6 expects

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

kernel test robot Sept. 13, 2016, 7:56 a.m. UTC | #1
Hi Hariprasad,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Hariprasad-Shenai/cxgb4vf-don-t-offload-Rx-checksums-for-IPv6-fragments/20160913-151500
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/swab.h:4:0,
                    from include/uapi/linux/byteorder/little_endian.h:12,
                    from include/linux/byteorder/little_endian.h:4,
                    from arch/x86/include/uapi/asm/byteorder.h:4,
                    from include/asm-generic/bitops/le.h:5,
                    from arch/x86/include/asm/bitops.h:504,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/skbuff.h:17,
                    from drivers/net/ethernet/chelsio/cxgb4vf/sge.c:36:
   drivers/net/ethernet/chelsio/cxgb4vf/sge.c: In function 't4vf_ethrx_handler':
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:34: error: 'F_RXF_IP' undeclared (first use in this function)
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                                     ^
   include/uapi/linux/swab.h:113:54: note: in definition of macro '__swab32'
    #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                         ^
   include/linux/byteorder/generic.h:133:21: note: in expansion of macro '__cpu_to_be32'
    #define ___htonl(x) __cpu_to_be32(x)
                        ^~~~~~~~~~~~~
>> include/linux/byteorder/generic.h:138:18: note: in expansion of macro '___htonl'
    #define htonl(x) ___htonl(x)
                     ^~~~~~~~
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:28: note: in expansion of macro 'htonl'
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                               ^~~~~
   drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:34: note: each undeclared identifier is reported only once for each function it appears in
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                                     ^
   include/uapi/linux/swab.h:113:54: note: in definition of macro '__swab32'
    #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                         ^
   include/linux/byteorder/generic.h:133:21: note: in expansion of macro '__cpu_to_be32'
    #define ___htonl(x) __cpu_to_be32(x)
                        ^~~~~~~~~~~~~
>> include/linux/byteorder/generic.h:138:18: note: in expansion of macro '___htonl'
    #define htonl(x) ___htonl(x)
                     ^~~~~~~~
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:28: note: in expansion of macro 'htonl'
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                               ^~~~~

vim +/F_RXF_IP +1654 drivers/net/ethernet/chelsio/cxgb4vf/sge.c

  1648	
  1649		if (csum_ok && !pkt->err_vec &&
  1650		    (be32_to_cpu(pkt->l2info) & (RXF_UDP_F | RXF_TCP_F))) {
  1651			if (!pkt->ip_frag) {
  1652				skb->ip_summed = CHECKSUM_UNNECESSARY;
  1653				rxq->stats.rx_cso++;
> 1654			} else if (pkt->l2info & htonl(F_RXF_IP)) {
  1655				__sum16 c = (__force __sum16)pkt->csum;
  1656				skb->csum = csum_unfold(c);
  1657				skb->ip_summed = CHECKSUM_COMPLETE;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index c8fd4f8fe1fa..4d4b94a8969a 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(F_RXF_IP)) {
 			__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);