Re: [PATCH net-next] mlx4: Better use of order-0 pages in RX path
From: kbuild test robot <hidden>
Date: 2017-03-13 12:50:55
Hi Eric, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/mlx4-Better-use-of-order-0-pages-in-RX-path/20170313-191100 config: x86_64-randconfig-s5-03131942 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/net/ethernet/mellanox/mlx4/en_rx.c:622:12: warning: 'struct iphdr' declared inside parameter list will not be visible outside of this definition or declaration struct iphdr *iph) ^~~~~ 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:517, from include/linux/bitops.h:36, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/timer.h:4, from include/linux/workqueue.h:8, from include/linux/bpf.h:12, from drivers/net/ethernet/mellanox/mlx4/en_rx.c:34: drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function 'get_fixed_ipv4_csum': drivers/net/ethernet/mellanox/mlx4/en_rx.c:627:36: error: dereferencing pointer to incomplete type 'struct iphdr' length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2)); ^ include/uapi/linux/swab.h:100:54: note: in definition of macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^
quoted
include/linux/byteorder/generic.h:96:21: note: in expansion of macro '__be16_to_cpu'
#define be16_to_cpu __be16_to_cpu
^~~~~~~~~~~~~quoted
drivers/net/ethernet/mellanox/mlx4/en_rx.c:627:21: note: in expansion of macro 'be16_to_cpu'
length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2));
^~~~~~~~~~~
vim +/be16_to_cpu +627 drivers/net/ethernet/mellanox/mlx4/en_rx.c
f8c6455b Shani Michaeli 2014-11-09 611 static inline __wsum get_fixed_vlan_csum(__wsum hw_checksum,
f8c6455b Shani Michaeli 2014-11-09 612 struct vlan_hdr *vlanh)
f8c6455b Shani Michaeli 2014-11-09 613 {
f8c6455b Shani Michaeli 2014-11-09 614 return csum_add(hw_checksum, *(__wsum *)vlanh);
f8c6455b Shani Michaeli 2014-11-09 615 }
f8c6455b Shani Michaeli 2014-11-09 616
f8c6455b Shani Michaeli 2014-11-09 617 /* Although the stack expects checksum which doesn't include the pseudo
f8c6455b Shani Michaeli 2014-11-09 618 * header, the HW adds it. To address that, we are subtracting the pseudo
f8c6455b Shani Michaeli 2014-11-09 619 * header checksum from the checksum value provided by the HW.
f8c6455b Shani Michaeli 2014-11-09 620 */
f8c6455b Shani Michaeli 2014-11-09 621 static void get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
f8c6455b Shani Michaeli 2014-11-09 622 struct iphdr *iph)
f8c6455b Shani Michaeli 2014-11-09 623 {
f8c6455b Shani Michaeli 2014-11-09 624 __u16 length_for_csum = 0;
f8c6455b Shani Michaeli 2014-11-09 625 __wsum csum_pseudo_header = 0;
f8c6455b Shani Michaeli 2014-11-09 626
f8c6455b Shani Michaeli 2014-11-09 @627 length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2));
f8c6455b Shani Michaeli 2014-11-09 628 csum_pseudo_header = csum_tcpudp_nofold(iph->saddr, iph->daddr,
f8c6455b Shani Michaeli 2014-11-09 629 length_for_csum, iph->protocol, 0);
f8c6455b Shani Michaeli 2014-11-09 630 skb->csum = csum_sub(hw_checksum, csum_pseudo_header);
f8c6455b Shani Michaeli 2014-11-09 631 }
f8c6455b Shani Michaeli 2014-11-09 632
f8c6455b Shani Michaeli 2014-11-09 633 #if IS_ENABLED(CONFIG_IPV6)
f8c6455b Shani Michaeli 2014-11-09 634 /* In IPv6 packets, besides subtracting the pseudo header checksum,
f8c6455b Shani Michaeli 2014-11-09 635 * we also compute/add the IP header checksum which
:::::: The code at line 627 was first introduced by commit
:::::: f8c6455bb04b944edb69e9b074e28efee2c56bdd net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE
:::::: TO: Shani Michaeli [off-list ref]
:::::: CC: David S. Miller [off-list ref]
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation Attachments
- .config.gz [application/gzip] 34812 bytes