Content-Type: multipart/mixed; boundary="===============4690949880671802471==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH nf-next v2 3/4] netfilter: nf_flow_table_offload: add tunnel match offload support Date: Mon, 25 Nov 2019 05:07:07 +0800 Message-ID: <201911250455.bB2bCI2E%lkp@intel.com> In-Reply-To: <1574330056-5377-4-git-send-email-wenxu@ucloud.cn> List-Id: --===============4690949880671802471== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on nf-next/master] [also build test WARNING on next-20191122] [cannot apply to v5.4-rc8] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/netfilter-= nf_flow_table_offload-support-tunnel-offload/20191123-192226 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git m= aster reproduce: # apt-get install sparse # sparse version: v0.6.1-36-g9305d48-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> net/netfilter/nf_flow_table_offload.c:71:32: sparse: sparse: incorrect t= ype in assignment (different base types) @@ expected restricted __be32 [= usertype] keyid @@ got [usertype] keyid @@ >> net/netfilter/nf_flow_table_offload.c:71:32: sparse: expected restric= ted __be32 [usertype] keyid net/netfilter/nf_flow_table_offload.c:71:32: sparse: got unsigned int net/netfilter/nf_flow_table_offload.c:81:44: sparse: sparse: incorrect t= ype in assignment (different base types) @@ expected restricted __be32 [= usertype] src @@ got [usertype] src @@ net/netfilter/nf_flow_table_offload.c:81:44: sparse: expected restric= ted __be32 [usertype] src net/netfilter/nf_flow_table_offload.c:81:44: sparse: got unsigned int net/netfilter/nf_flow_table_offload.c:83:44: sparse: sparse: incorrect t= ype in assignment (different base types) @@ expected restricted __be32 [= usertype] dst @@ got [usertype] dst @@ net/netfilter/nf_flow_table_offload.c:83:44: sparse: expected restric= ted __be32 [usertype] dst net/netfilter/nf_flow_table_offload.c:83:44: sparse: got unsigned int net/netfilter/nf_flow_table_offload.c:130:32: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be32 = [usertype] src @@ got [usertype] src @@ net/netfilter/nf_flow_table_offload.c:130:32: sparse: expected restri= cted __be32 [usertype] src net/netfilter/nf_flow_table_offload.c:130:32: sparse: got unsigned int net/netfilter/nf_flow_table_offload.c:132:32: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be32 = [usertype] dst @@ got [usertype] dst @@ net/netfilter/nf_flow_table_offload.c:132:32: sparse: expected restri= cted __be32 [usertype] dst net/netfilter/nf_flow_table_offload.c:132:32: sparse: got unsigned int net/netfilter/nf_flow_table_offload.c:137:29: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be16 = [usertype] n_proto @@ got e] n_proto @@ net/netfilter/nf_flow_table_offload.c:137:29: sparse: expected restri= cted __be16 [usertype] n_proto net/netfilter/nf_flow_table_offload.c:137:29: sparse: got int net/netfilter/nf_flow_table_offload.c:142:33: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be16 = [usertype] flags @@ got _be16 [usertype] flags @@ net/netfilter/nf_flow_table_offload.c:142:33: sparse: expected restri= cted __be16 [usertype] flags net/netfilter/nf_flow_table_offload.c:142:33: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:155:22: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be16 = [usertype] src @@ got e] src @@ net/netfilter/nf_flow_table_offload.c:155:22: sparse: expected restri= cted __be16 [usertype] src net/netfilter/nf_flow_table_offload.c:155:22: sparse: got int net/netfilter/nf_flow_table_offload.c:157:22: sparse: sparse: incorrect = type in assignment (different base types) @@ expected restricted __be16 = [usertype] dst @@ got e] dst @@ net/netfilter/nf_flow_table_offload.c:157:22: sparse: expected restri= cted __be16 [usertype] dst net/netfilter/nf_flow_table_offload.c:157:22: sparse: got int net/netfilter/nf_flow_table_offload.c:253:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:253:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:253:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:280:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:280:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:280:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:321:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:321:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:321:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:346:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:346:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:346:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:391:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:391:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:391:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:418:20: sparse: sparse: incorrect = type in initializer (different base types) @@ expected unsigned int [use= rtype] mask @@ got d int [usertype] mask @@ net/netfilter/nf_flow_table_offload.c:418:20: sparse: expected unsign= ed int [usertype] mask net/netfilter/nf_flow_table_offload.c:418:20: sparse: got restricted = __be32 net/netfilter/nf_flow_table_offload.c:632:24: sparse: sparse: incorrect = type in initializer (different base types) @@ expected restricted __be16= [usertype] proto @@ got e] proto @@ net/netfilter/nf_flow_table_offload.c:632:24: sparse: expected restri= cted __be16 [usertype] proto net/netfilter/nf_flow_table_offload.c:632:24: sparse: got int net/netfilter/nf_flow_table_offload.c:659:24: sparse: sparse: incorrect = type in initializer (different base types) @@ expected restricted __be16= [usertype] proto @@ got e] proto @@ net/netfilter/nf_flow_table_offload.c:659:24: sparse: expected restri= cted __be16 [usertype] proto net/netfilter/nf_flow_table_offload.c:659:24: sparse: got int net/netfilter/nf_flow_table_offload.c:716:24: sparse: sparse: incorrect = type in initializer (different base types) @@ expected restricted __be16= [usertype] proto @@ got e] proto @@ net/netfilter/nf_flow_table_offload.c:716:24: sparse: expected restri= cted __be16 [usertype] proto net/netfilter/nf_flow_table_offload.c:716:24: sparse: got int vim +71 net/netfilter/nf_flow_table_offload.c 53 = 54 #define NF_FLOW_DISSECTOR(__match, __type, __field) \ 55 (__match)->dissector.offset[__type] =3D \ 56 offsetof(struct nf_flow_key, __field) 57 = 58 static void nf_flow_rule_lwt_match(struct nf_flow_match *match, 59 struct ip_tunnel_info *tun_info) 60 { 61 struct nf_flow_key *mask =3D &match->mask; 62 struct nf_flow_key *key =3D &match->key; 63 unsigned int enc_keys; 64 = 65 if (!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX)) 66 return; 67 = 68 NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_ENC_CONTROL, enc_contro= l); 69 NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_ENC_KEYID, enc_key_id); 70 key->enc_key_id.keyid =3D tunnel_id_to_key32(tun_info->key.tun_id); > 71 mask->enc_key_id.keyid =3D 0xffffffff; 72 enc_keys =3D BIT(FLOW_DISSECTOR_KEY_ENC_KEYID) | 73 BIT(FLOW_DISSECTOR_KEY_ENC_CONTROL); 74 = 75 if (ip_tunnel_info_af(tun_info) =3D=3D AF_INET) { 76 NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS, 77 enc_ipv4); 78 key->enc_ipv4.src =3D tun_info->key.u.ipv4.dst; 79 key->enc_ipv4.dst =3D tun_info->key.u.ipv4.src; 80 if (key->enc_ipv4.src) 81 mask->enc_ipv4.src =3D 0xffffffff; 82 if (key->enc_ipv4.dst) 83 mask->enc_ipv4.dst =3D 0xffffffff; 84 enc_keys |=3D BIT(FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS); 85 key->enc_control.addr_type =3D FLOW_DISSECTOR_KEY_IPV4_ADDRS; 86 } else { 87 memcpy(&key->enc_ipv6.src, &tun_info->key.u.ipv6.dst, 88 sizeof(struct in6_addr)); 89 memcpy(&key->enc_ipv6.dst, &tun_info->key.u.ipv6.src, 90 sizeof(struct in6_addr)); 91 if (memcmp(&key->enc_ipv6.src, &in6addr_any, 92 sizeof(struct in6_addr))) 93 memset(&key->enc_ipv6.src, 0xff, 94 sizeof(struct in6_addr)); 95 if (memcmp(&key->enc_ipv6.dst, &in6addr_any, 96 sizeof(struct in6_addr))) 97 memset(&key->enc_ipv6.dst, 0xff, 98 sizeof(struct in6_addr)); 99 enc_keys |=3D BIT(FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS); 100 key->enc_control.addr_type =3D FLOW_DISSECTOR_KEY_IPV6_ADDRS; 101 } 102 = 103 match->dissector.used_keys |=3D enc_keys; 104 } 105 = --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corpor= ation --===============4690949880671802471==--