From: kbuild test robot <lkp@intel.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: kbuild-all@01.org, davem@davemloft.net, jbenc@redhat.com,
Roopa Prabhu <roopa@cumulusnetworks.com>,
jiri@resnulli.us, jhs@mojatatu.com, xiyou.wangcong@gmail.com,
daniel@iogearbox.net, oss-drivers@netronome.com,
netdev@vger.kernel.org,
Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: Re: [PATCH net-next 3/4] net: check tunnel option type in tunnel flags
Date: Wed, 27 Jun 2018 11:08:24 +0800 [thread overview]
Message-ID: <201806271151.UaGfY1wW%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180626185308.3605-4-jakub.kicinski@netronome.com>
Hi Pieter,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/net-Geneve-options-support-for-TC-act_tunnel_key/20180627-030036
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> net/openvswitch/flow_netlink.c:2532:38: sparse: incorrect type in assignment (different base types) @@ expected int [signed] [assigned] dst_opt_type @@ got restrint [signed] [assigned] dst_opt_type @@
net/openvswitch/flow_netlink.c:2532:38: expected int [signed] [assigned] dst_opt_type
net/openvswitch/flow_netlink.c:2532:38: got restricted __be16 [usertype] <noident>
net/openvswitch/flow_netlink.c:2535:38: sparse: incorrect type in assignment (different base types) @@ expected int [signed] [assigned] dst_opt_type @@ got restrint [signed] [assigned] dst_opt_type @@
net/openvswitch/flow_netlink.c:2535:38: expected int [signed] [assigned] dst_opt_type
net/openvswitch/flow_netlink.c:2535:38: got restricted __be16 [usertype] <noident>
net/openvswitch/flow_netlink.c:2538:38: sparse: incorrect type in assignment (different base types) @@ expected int [signed] [assigned] dst_opt_type @@ got restrint [signed] [assigned] dst_opt_type @@
net/openvswitch/flow_netlink.c:2538:38: expected int [signed] [assigned] dst_opt_type
net/openvswitch/flow_netlink.c:2538:38: got restricted __be16 [usertype] <noident>
>> net/openvswitch/flow_netlink.c:2581:51: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be16 [usertype] flags @@ got icted __be16 [usertype] flags @@
net/openvswitch/flow_netlink.c:2581:51: expected restricted __be16 [usertype] flags
net/openvswitch/flow_netlink.c:2581:51: got int [signed] [assigned] dst_opt_type
net/openvswitch/flow_netlink.c:3064:39: sparse: expression using sizeof(void)
vim +2532 net/openvswitch/flow_netlink.c
2508
2509 static int validate_and_copy_set_tun(const struct nlattr *attr,
2510 struct sw_flow_actions **sfa, bool log)
2511 {
2512 struct sw_flow_match match;
2513 struct sw_flow_key key;
2514 struct metadata_dst *tun_dst;
2515 struct ip_tunnel_info *tun_info;
2516 struct ovs_tunnel_info *ovs_tun;
2517 struct nlattr *a;
2518 int err = 0, start, opts_type, dst_opt_type;
2519
2520 dst_opt_type = 0;
2521 ovs_match_init(&match, &key, true, NULL);
2522 opts_type = ip_tun_from_nlattr(nla_data(attr), &match, false, log);
2523 if (opts_type < 0)
2524 return opts_type;
2525
2526 if (key.tun_opts_len) {
2527 switch (opts_type) {
2528 case OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS:
2529 err = validate_geneve_opts(&key);
2530 if (err < 0)
2531 return err;
> 2532 dst_opt_type = TUNNEL_GENEVE_OPT;
2533 break;
2534 case OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS:
2535 dst_opt_type = TUNNEL_VXLAN_OPT;
2536 break;
2537 case OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS:
2538 dst_opt_type = TUNNEL_ERSPAN_OPT;
2539 break;
2540 }
2541 }
2542
2543 start = add_nested_action_start(sfa, OVS_ACTION_ATTR_SET, log);
2544 if (start < 0)
2545 return start;
2546
2547 tun_dst = metadata_dst_alloc(key.tun_opts_len, METADATA_IP_TUNNEL,
2548 GFP_KERNEL);
2549
2550 if (!tun_dst)
2551 return -ENOMEM;
2552
2553 err = dst_cache_init(&tun_dst->u.tun_info.dst_cache, GFP_KERNEL);
2554 if (err) {
2555 dst_release((struct dst_entry *)tun_dst);
2556 return err;
2557 }
2558
2559 a = __add_action(sfa, OVS_KEY_ATTR_TUNNEL_INFO, NULL,
2560 sizeof(*ovs_tun), log);
2561 if (IS_ERR(a)) {
2562 dst_release((struct dst_entry *)tun_dst);
2563 return PTR_ERR(a);
2564 }
2565
2566 ovs_tun = nla_data(a);
2567 ovs_tun->tun_dst = tun_dst;
2568
2569 tun_info = &tun_dst->u.tun_info;
2570 tun_info->mode = IP_TUNNEL_INFO_TX;
2571 if (key.tun_proto == AF_INET6)
2572 tun_info->mode |= IP_TUNNEL_INFO_IPV6;
2573 tun_info->key = key.tun_key;
2574
2575 /* We need to store the options in the action itself since
2576 * everything else will go away after flow setup. We can append
2577 * it to tun_info and then point there.
2578 */
2579 ip_tunnel_info_opts_set(tun_info,
2580 TUN_METADATA_OPTS(&key, key.tun_opts_len),
> 2581 key.tun_opts_len, dst_opt_type);
2582 add_nested_action_end(*sfa, start);
2583
2584 return err;
2585 }
2586
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2018-06-27 3:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 18:53 [PATCH net-next 0/4] net: Geneve options support for TC act_tunnel_key Jakub Kicinski
2018-06-26 18:53 ` [PATCH net-next 1/4] net/sched: act_tunnel_key: disambiguate metadata dst error cases Jakub Kicinski
2018-06-26 18:53 ` [PATCH net-next 2/4] net/sched: act_tunnel_key: add extended ack support Jakub Kicinski
2018-06-26 19:50 ` David Ahern
2018-06-26 18:53 ` [PATCH net-next 3/4] net: check tunnel option type in tunnel flags Jakub Kicinski
2018-06-27 3:08 ` kbuild test robot [this message]
2018-06-26 18:53 ` [PATCH net-next 4/4] net/sched: add tunnel option support to act_tunnel_key Jakub Kicinski
2018-06-28 7:17 ` [PATCH net-next 0/4] net: Geneve options support for TC act_tunnel_key David Miller
2018-06-28 16:39 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201806271151.UaGfY1wW%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=jbenc@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=pieter.jansenvanvuuren@netronome.com \
--cc=roopa@cumulusnetworks.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox