From: kbuild test robot <lkp@intel.com>
To: wenxu@ucloud.cn
Cc: kbuild-all@01.org, pablo@netfilter.org, fw@strlen.de,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v7 5/8] netfilter:nf_flow_table_core: Support bridge family flow offload
Date: Fri, 30 Aug 2019 20:12:42 +0800 [thread overview]
Message-ID: <201908302019.oGMJ7phJ%lkp@intel.com> (raw)
In-Reply-To: <1567138642-11446-6-git-send-email-wenxu@ucloud.cn>
[-- Attachment #1: Type: text/plain, Size: 5328 bytes --]
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/netfilter-Support-the-bridge-family-in-flow-table/20190830-172019
base: https://kernel.googlesource.com/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
In file included from net//netfilter/nf_flow_table_core.c:9:0:
net//netfilter/nf_flow_table_core.c: In function 'flow_offload_fill_dir':
>> include/net/ip6_route.h:322:26: warning: 'dst' may be used uninitialized in this function [-Wmaybe-uninitialized]
idev = __in6_dev_get(dst->dev);
~~~^~~~~
net//netfilter/nf_flow_table_core.c:62:20: note: 'dst' was declared here
struct dst_entry *dst;
^~~
>> net//netfilter/nf_flow_table_core.c:83:22: warning: 'dst_port' may be used uninitialized in this function [-Wmaybe-uninitialized]
ft->mtu = dst_port->dev->mtu;
~~~~~~~~^~~~~
--
In file included from net/netfilter/nf_flow_table_core.c:9:0:
net/netfilter/nf_flow_table_core.c: In function 'flow_offload_fill_dir':
>> include/net/ip6_route.h:322:26: warning: 'dst' may be used uninitialized in this function [-Wmaybe-uninitialized]
idev = __in6_dev_get(dst->dev);
~~~^~~~~
net/netfilter/nf_flow_table_core.c:62:20: note: 'dst' was declared here
struct dst_entry *dst;
^~~
net/netfilter/nf_flow_table_core.c:83:22: warning: 'dst_port' may be used uninitialized in this function [-Wmaybe-uninitialized]
ft->mtu = dst_port->dev->mtu;
~~~~~~~~^~~~~
vim +/dst_port +83 net//netfilter/nf_flow_table_core.c
> 9 #include <net/ip6_route.h>
10 #include <net/netfilter/nf_tables.h>
11 #include <net/netfilter/nf_flow_table.h>
12 #include <net/netfilter/nf_conntrack.h>
13 #include <net/netfilter/nf_conntrack_core.h>
14 #include <net/netfilter/nf_conntrack_tuple.h>
15
16 struct flow_offload_entry {
17 struct flow_offload flow;
18 struct nf_conn *ct;
19 struct rcu_head rcu_head;
20 };
21
22 static DEFINE_MUTEX(flowtable_lock);
23 static LIST_HEAD(flowtables);
24
25 static struct dst_entry *
26 flow_offload_fill_inet_dst(struct flow_offload_tuple *ft,
27 struct nf_flow_route *route,
28 enum flow_offload_tuple_dir dir)
29 {
30 struct dst_entry *other_dst = route->tuple[!dir].dst;
31 struct dst_entry *dst = route->tuple[dir].dst;
32
33 ft->iifidx = other_dst->dev->ifindex;
34 ft->dst.dst_cache = dst;
35
36 return dst;
37 }
38
39 static struct dst_br_port *
40 flow_offload_fill_bridge_dst(struct flow_offload_tuple *ft,
41 struct nf_flow_forward *forward,
42 enum flow_offload_tuple_dir dir)
43 {
44 struct dst_br_port other_dst_port = forward->tuple[!dir].dst_port;
45 struct dst_br_port dst_port = forward->tuple[dir].dst_port;
46
47 ft->iifidx = other_dst_port.dev->ifindex;
48 ft->dst.dst_port = dst_port;
49 ft->vlan_tag = forward->tuple[dir].vlan_tag;
50
51 return &ft->dst.dst_port;
52 }
53
54 static void
55 flow_offload_fill_dir(struct flow_offload *flow, struct nf_conn *ct,
56 struct nf_flow_dst *flow_dst,
57 enum flow_offload_tuple_dir dir)
58 {
59 struct flow_offload_tuple *ft = &flow->tuplehash[dir].tuple;
60 struct nf_conntrack_tuple *ctt = &ct->tuplehash[dir].tuple;
61 struct dst_br_port *dst_port;
62 struct dst_entry *dst;
63
64 switch (flow_dst->type) {
65 case FLOW_OFFLOAD_TYPE_INET:
66 dst = flow_offload_fill_inet_dst(ft, &flow_dst->route, dir);
67 break;
68 case FLOW_OFFLOAD_TYPE_BRIDGE:
69 dst_port = flow_offload_fill_bridge_dst(ft, &flow_dst->forward, dir);
70 break;
71 }
72
73 ft->dst.type = flow_dst->type;
74 ft->dir = dir;
75
76 switch (ctt->src.l3num) {
77 case NFPROTO_IPV4:
78 ft->src_v4 = ctt->src.u3.in;
79 ft->dst_v4 = ctt->dst.u3.in;
80 if (flow_dst->type == FLOW_OFFLOAD_TYPE_INET)
81 ft->mtu = ip_dst_mtu_maybe_forward(dst, true);
82 else
> 83 ft->mtu = dst_port->dev->mtu;
84 break;
85 case NFPROTO_IPV6:
86 ft->src_v6 = ctt->src.u3.in6;
87 ft->dst_v6 = ctt->dst.u3.in6;
88 ft->mtu = ip6_dst_mtu_forward(dst);
89 break;
90 }
91
92 ft->l3proto = ctt->src.l3num;
93 ft->l4proto = ctt->dst.protonum;
94 ft->src_port = ctt->src.u.tcp.port;
95 ft->dst_port = ctt->dst.u.tcp.port;
96 }
97
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 70228 bytes --]
next prev parent reply other threads:[~2019-08-30 12:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 4:17 [PATCH nf-next v7 0/8] netfilter: Support the bridge family in flow table wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 1/8] netfilter:nf_flow_table: Refactor flow_offload_tuple to destination wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 2/8] netfilter:nf_flow_table_core: Separate inet operation to single function wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 3/8] netfilter:nf_flow_table_ip: " wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 4/8] bridge: add br_vlan_get_info_rcu() wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 5/8] netfilter:nf_flow_table_core: Support bridge family flow offload wenxu
2019-08-30 12:12 ` kbuild test robot [this message]
2019-08-30 4:17 ` [PATCH nf-next v7 6/8] netfilter:nf_flow_table_ip: " wenxu
2019-08-30 13:30 ` kbuild test robot
2019-08-30 4:17 ` [PATCH nf-next v7 7/8] netfilter:nft_flow_offload: " wenxu
2019-08-30 4:17 ` [PATCH nf-next v7 8/8] netfilter: Support the bridge family in flow table wenxu
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=201908302019.oGMJ7phJ%lkp@intel.com \
--to=lkp@intel.com \
--cc=fw@strlen.de \
--cc=kbuild-all@01.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=wenxu@ucloud.cn \
/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;
as well as URLs for NNTP newsgroup(s).