Thread (15 messages) 15 messages, 3 authors, 2023-01-17

Re: [PATCH net-next v1 1/7] net: flow_offload: provision conntrack info in ct_metadata

From: kernel test robot <hidden>
Date: 2023-01-10 20:38:42
Also in: llvm, netfilter-devel, oe-kbuild-all

Hi Vlad,

Thank you for the patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Vlad-Buslov/net-flow_offload-provision-conntrack-info-in-ct_metadata/20230110-213500
patch link:    https://lore.kernel.org/r/20230110133023.2366381-2-vladbu%40nvidia.com
patch subject: [PATCH net-next v1 1/7] net: flow_offload: provision conntrack info in ct_metadata
config: hexagon-randconfig-r045-20230110
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/99f16b3535be4a9588707780f082146c647c5b5f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Vlad-Buslov/net-flow_offload-provision-conntrack-info-in-ct_metadata/20230110-213500
        git checkout 99f16b3535be4a9588707780f082146c647c5b5f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/net/ethernet/mediatek/ net/sched/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot [off-list ref]

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

   In file included from net/sched/cls_flow.c:14:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from net/sched/cls_flow.c:14:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from net/sched/cls_flow.c:14:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   In file included from net/sched/cls_flow.c:23:
   In file included from include/net/pkt_cls.h:7:
   In file included from include/net/sch_generic.h:21:
   include/net/flow_offload.h:291:27: error: field has incomplete type 'enum ip_conntrack_info'
                           enum ip_conntrack_info ctinfo;
                                                  ^
   include/net/flow_offload.h:291:9: note: forward declaration of 'enum ip_conntrack_info'
                           enum ip_conntrack_info ctinfo;
                                ^
quoted
net/sched/cls_flow.c:64:52: warning: shift count >= width of type [-Wshift-count-overflow]
           return (a & 0xFFFFFFFF) ^ (BITS_PER_LONG > 32 ? a >> 32 : 0);
                                                             ^  ~~
   7 warnings and 1 error generated.
--
   In file included from drivers/net/ethernet/mediatek/mtk_ppe_offload.c:6:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/net/ethernet/mediatek/mtk_ppe_offload.c:6:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/net/ethernet/mediatek/mtk_ppe_offload.c:6:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   In file included from drivers/net/ethernet/mediatek/mtk_ppe_offload.c:10:
   include/net/flow_offload.h:291:27: error: field has incomplete type 'enum ip_conntrack_info'
                           enum ip_conntrack_info ctinfo;
                                                  ^
   include/net/flow_offload.h:291:9: note: forward declaration of 'enum ip_conntrack_info'
                           enum ip_conntrack_info ctinfo;
                                ^
quoted
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:75:26: error: no member named 'mangle' in 'struct flow_action_entry'
           void *dest = eth + act->mangle.offset;
                              ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:76:26: error: no member named 'mangle' in 'struct flow_action_entry'
           const void *src = &act->mangle.val;
                              ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:78:11: error: no member named 'mangle' in 'struct flow_action_entry'
           if (act->mangle.offset > 8)
               ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:81:11: error: no member named 'mangle' in 'struct flow_action_entry'
           if (act->mangle.mask == 0xffff) {
               ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:86:25: error: no member named 'mangle' in 'struct flow_action_entry'
           memcpy(dest, src, act->mangle.mask ? 2 : 4);
                             ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:118:31: note: expanded from macro '__swab32'
           (__u32)(__builtin_constant_p(x) ?       \
                                        ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x000000ffUL) << 24) |            \
                     ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |            \
                     ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |            \
                     ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
                     ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:123:23: error: no member named 'mangle' in 'struct flow_action_entry'
           u32 val = ntohl(act->mangle.val);
                           ~~~  ^
   include/linux/byteorder/generic.h:140:27: note: expanded from macro 'ntohl'
   #define ntohl(x) ___ntohl(x)
                             ^
   include/linux/byteorder/generic.h:136:35: note: expanded from macro '___ntohl'
   #define ___ntohl(x) __be32_to_cpu(x)
                                     ^
   include/uapi/linux/byteorder/little_endian.h:41:59: note: expanded from macro '__be32_to_cpu'
   #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                                                             ^
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
                     ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:125:15: error: no member named 'mangle' in 'struct flow_action_entry'
           switch (act->mangle.offset) {
                   ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:127:12: error: no member named 'mangle' in 'struct flow_action_entry'
                   if (act->mangle.mask == ~htonl(0xffff))
                       ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:148:15: error: no member named 'mangle' in 'struct flow_action_entry'
           switch (act->mangle.offset) {
                   ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:159:21: error: no member named 'mangle' in 'struct flow_action_entry'
           memcpy(dest, &act->mangle.val, sizeof(u32));
                         ~~~  ^
   drivers/net/ethernet/mediatek/mtk_ppe_offload.c:321:13: error: no member named 'mangle' in 'struct flow_action_entry'
                           if (act->mangle.htype == FLOW_ACT_MANGLE_HDR_TYPE_ETH)
                               ~~~  ^
quoted
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:325:16: error: no member named 'dev' in 'struct flow_action_entry'
                           odev = act->dev;
                                  ~~~  ^
quoted
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:331:13: error: no member named 'vlan' in 'struct flow_action_entry'
                               act->vlan.proto != htons(ETH_P_8021Q))
                               ~~~  ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   6 warnings and 20 errors generated.


vim +75 drivers/net/ethernet/mediatek/mtk_ppe_offload.c

817b2fdf166766b David Bentham 2022-04-05  71  
502e84e2382d926 Felix Fietkau 2021-03-24  72  static void
502e84e2382d926 Felix Fietkau 2021-03-24  73  mtk_flow_offload_mangle_eth(const struct flow_action_entry *act, void *eth)
502e84e2382d926 Felix Fietkau 2021-03-24  74  {
502e84e2382d926 Felix Fietkau 2021-03-24 @75  	void *dest = eth + act->mangle.offset;
502e84e2382d926 Felix Fietkau 2021-03-24  76  	const void *src = &act->mangle.val;
502e84e2382d926 Felix Fietkau 2021-03-24  77  
502e84e2382d926 Felix Fietkau 2021-03-24  78  	if (act->mangle.offset > 8)
502e84e2382d926 Felix Fietkau 2021-03-24  79  		return;
502e84e2382d926 Felix Fietkau 2021-03-24  80  
502e84e2382d926 Felix Fietkau 2021-03-24  81  	if (act->mangle.mask == 0xffff) {
502e84e2382d926 Felix Fietkau 2021-03-24  82  		src += 2;
502e84e2382d926 Felix Fietkau 2021-03-24  83  		dest += 2;
502e84e2382d926 Felix Fietkau 2021-03-24  84  	}
502e84e2382d926 Felix Fietkau 2021-03-24  85  
502e84e2382d926 Felix Fietkau 2021-03-24  86  	memcpy(dest, src, act->mangle.mask ? 2 : 4);
502e84e2382d926 Felix Fietkau 2021-03-24  87  }
502e84e2382d926 Felix Fietkau 2021-03-24  88  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help