Re: [PATCH nf-next,v2 2/3] netfilter: nftables_offload: VLAN id needs host byteorder in flow dissector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pablo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on nf/master]
[also build test WARNING on nf-next/master linus/master v5.12-rc7 next-20210412]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_payload-fix-C-VLAN-offload-support/20210413-021535
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: microblaze-randconfig-s031-20210413 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-280-g2cd6d34e-dirty
        # https://github.com/0day-ci/linux/commit/10b8731b5f73d5e52f6f2e247e7f4b33e4d1ddb0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_payload-fix-C-VLAN-offload-support/20210413-021535
        git checkout 10b8731b5f73d5e52f6f2e247e7f4b33e4d1ddb0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
   net/netfilter/nft_cmp.c: note: in included file:
   include/net/netfilter/nf_tables_core.h:53:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __le32 [usertype] @@
   include/net/netfilter/nf_tables_core.h:53:16: sparse:     expected unsigned int
   include/net/netfilter/nf_tables_core.h:53:16: sparse:     got restricted __le32 [usertype]

vim +128 net/netfilter/nft_cmp.c

   122	
   123	static void nft_payload_n2h(union nft_cmp_offload_data *data,
   124				    const u8 *val, u32 len)
   125	{
   126		switch (len) {
   127		case 2:
 > 128			data->val16 = ntohs(*((u16 *)val));
   129			break;
   130		case 4:
 > 131			data->val32 = ntohl(*((u32 *)val));
   132			break;
   133		case 8:
 > 134			data->val64 = be64_to_cpu(*((u64 *)val));
   135			break;
   136		default:
   137			WARN_ON_ONCE(1);
   138			break;
   139		}
   140	}
   141	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux