tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git for-net-next head: 680cba277b9779591e673100f6896e5baed7a180 commit: 5bc248f667347360c04b4774c038f285391c4df9 [33/40] netfilter: remove checksum_partial indirection in struct nf_afinfo config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 5bc248f667347360c04b4774c038f285391c4df9 # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): In file included from net//ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:36:8: error: unknown type name 'inline__sum16' static inline__sum16 nf_ip6_checksum_partial(struct sk_buff *skb, ^~~~~~~~~~~~~ net//ipv6/netfilter.c:133:9: error: redefinition of 'nf_ip6_checksum' __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~ In file included from net//ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:31:23: note: previous definition of 'nf_ip6_checksum' was here static inline __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~ >> net//ipv6/netfilter.c:166:9: error: conflicting types for 'nf_ip6_checksum_partial' __sum16 nf_ip6_checksum_partial(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~~~~~~~~~ In file included from net//ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:36:22: note: previous definition of 'nf_ip6_checksum_partial' was here static inline__sum16 nf_ip6_checksum_partial(struct sk_buff *skb, ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/netfilter_ipv6.h:36:22: warning: 'nf_ip6_checksum_partial' defined but not used [-Wunused-function] vim +/nf_ip6_checksum_partial +166 net//ipv6/netfilter.c 132 > 133 __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, 134 unsigned int dataoff, u_int8_t protocol) 135 { 136 const struct ipv6hdr *ip6h = ipv6_hdr(skb); 137 __sum16 csum = 0; 138 139 switch (skb->ip_summed) { 140 case CHECKSUM_COMPLETE: 141 if (hook != NF_INET_PRE_ROUTING && hook != NF_INET_LOCAL_IN) 142 break; 143 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, 144 skb->len - dataoff, protocol, 145 csum_sub(skb->csum, 146 skb_checksum(skb, 0, 147 dataoff, 0)))) { 148 skb->ip_summed = CHECKSUM_UNNECESSARY; 149 break; 150 } 151 /* fall through */ 152 case CHECKSUM_NONE: 153 skb->csum = ~csum_unfold( 154 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, 155 skb->len - dataoff, 156 protocol, 157 csum_sub(0, 158 skb_checksum(skb, 0, 159 dataoff, 0)))); 160 csum = __skb_checksum_complete(skb); 161 } 162 return csum; 163 } 164 EXPORT_SYMBOL(nf_ip6_checksum); 165 > 166 __sum16 nf_ip6_checksum_partial(struct sk_buff *skb, unsigned int hook, 167 unsigned int dataoff, unsigned int len, 168 u_int8_t protocol) 169 { 170 const struct ipv6hdr *ip6h = ipv6_hdr(skb); 171 __wsum hsum; 172 __sum16 csum = 0; 173 174 switch (skb->ip_summed) { 175 case CHECKSUM_COMPLETE: 176 if (len == skb->len - dataoff) 177 return nf_ip6_checksum(skb, hook, dataoff, protocol); 178 /* fall through */ 179 case CHECKSUM_NONE: 180 hsum = skb_checksum(skb, 0, dataoff, 0); 181 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, 182 &ip6h->daddr, 183 skb->len - dataoff, 184 protocol, 185 csum_sub(0, hsum))); 186 skb->ip_summed = CHECKSUM_NONE; 187 return __skb_checksum_complete_head(skb, dataoff + len); 188 } 189 return csum; 190 }; 191 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip