Hi wenxu, Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/ip_tunnel-Add-dst_cache-management-lwtunnel_state-of-ip-tunnel/20190222-074749 config: nds32-allyesconfig (attached as .config) compiler: nds32le-linux-gcc (GCC) 6.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=6.4.0 make.cross ARCH=nds32 All errors (new ones prefixed by >>): net//ipv4/ip_tunnel_core.c: In function 'ip_tun_destroy_state': net//ipv4/ip_tunnel_core.c:292:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ net//ipv4/ip_tunnel_core.c: At top level: >> net//ipv4/ip_tunnel_core.c:329:19: error: initialization from incompatible >> pointer type [-Werror=incompatible-pointer-types] .destroy_state = ip_tun_destroy_state, ^~~~~~~~~~~~~~~~~~~~ net//ipv4/ip_tunnel_core.c:329:19: note: (near initialization for 'ip_tun_lwt_ops.destroy_state') cc1: some warnings being treated as errors vim +329 net//ipv4/ip_tunnel_core.c 286 287 static int ip_tun_destroy_state(struct lwtunnel_state *lwtstate) 288 { 289 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); 290 291 dst_cache_destroy(&tun_info->dst_cache); > 292 } 293 294 static int ip_tun_fill_encap_info(struct sk_buff *skb, 295 struct lwtunnel_state *lwtstate) 296 { 297 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); 298 299 if (nla_put_be64(skb, LWTUNNEL_IP_ID, tun_info->key.tun_id, 300 LWTUNNEL_IP_PAD) || 301 nla_put_in_addr(skb, LWTUNNEL_IP_DST, tun_info->key.u.ipv4.dst) || 302 nla_put_in_addr(skb, LWTUNNEL_IP_SRC, tun_info->key.u.ipv4.src) || 303 nla_put_u8(skb, LWTUNNEL_IP_TOS, tun_info->key.tos) || 304 nla_put_u8(skb, LWTUNNEL_IP_TTL, tun_info->key.ttl) || 305 nla_put_be16(skb, LWTUNNEL_IP_FLAGS, tun_info->key.tun_flags)) 306 return -ENOMEM; 307 308 return 0; 309 } 310 311 static int ip_tun_encap_nlsize(struct lwtunnel_state *lwtstate) 312 { 313 return nla_total_size_64bit(8) /* LWTUNNEL_IP_ID */ 314 + nla_total_size(4) /* LWTUNNEL_IP_DST */ 315 + nla_total_size(4) /* LWTUNNEL_IP_SRC */ 316 + nla_total_size(1) /* LWTUNNEL_IP_TOS */ 317 + nla_total_size(1) /* LWTUNNEL_IP_TTL */ 318 + nla_total_size(2); /* LWTUNNEL_IP_FLAGS */ 319 } 320 321 static int ip_tun_cmp_encap(struct lwtunnel_state *a, struct lwtunnel_state *b) 322 { 323 return memcmp(lwt_tun_info(a), lwt_tun_info(b), 324 sizeof(struct ip_tunnel_info)); 325 } 326 327 static const struct lwtunnel_encap_ops ip_tun_lwt_ops = { 328 .build_state = ip_tun_build_state, > 329 .destroy_state = ip_tun_destroy_state, 330 .fill_encap = ip_tun_fill_encap_info, 331 .get_encap_size = ip_tun_encap_nlsize, 332 .cmp_encap = ip_tun_cmp_encap, 333 .owner = THIS_MODULE, 334 }; 335 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip