[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201902220851.mw021zkh%fengguang.wu@intel.com>
Date: Fri, 22 Feb 2019 08:23:01 +0800
From: kbuild test robot <lkp@...el.com>
To: wenxu@...oud.cn
Cc: kbuild-all@...org, netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-next] ip_tunnel: Add dst_cache management
lwtunnel_state of ip tunnel
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: i386-randconfig-x007-201907 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (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 of 'void (*)(struct lwtunnel_state *)' from incompatible pointer type 'int (*)(struct lwtunnel_state *)' [-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
Download attachment ".config.gz" of type "application/gzip" (30912 bytes)
Powered by blists - more mailing lists