From: kernel test robot <lkp@intel.com>
To: Brian Vazquez <brianvv@google.com>,
Brian Vazquez <brianvv.kernel@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
"David S . Miller" <davem@davemloft.net>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] fib: use indirect call wrappers in the most common fib_rules_ops
Date: Sat, 25 Jul 2020 23:08:30 +0800 [thread overview]
Message-ID: <202007252345.bNXAYJv2%lkp@intel.com> (raw)
In-Reply-To: <20200725014909.614068-1-brianvv@google.com>
[-- Attachment #1: Type: text/plain, Size: 7165 bytes --]
Hi Brian,
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/Brian-Vazquez/fib-use-indirect-call-wrappers-in-the-most-common-fib_rules_ops/20200725-095008
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 8bf4c1f4fb257774f66c8cda07adc6c5e8668326)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/ipv4/fib_rules.c:107:29: warning: no previous prototype for function 'fib4_rule_action' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int fib4_rule_action(struct fib_rule *rule,
^
net/ipv4/fib_rules.c:107:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int fib4_rule_action(struct fib_rule *rule,
^
static
>> net/ipv4/fib_rules.c:143:30: warning: no previous prototype for function 'fib4_rule_suppress' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule,
^
net/ipv4/fib_rules.c:143:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule,
^
static
>> net/ipv4/fib_rules.c:175:29: warning: no previous prototype for function 'fib4_rule_match' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int fib4_rule_match(struct fib_rule *rule,
^
net/ipv4/fib_rules.c:175:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int fib4_rule_match(struct fib_rule *rule,
^
static
3 warnings generated.
--
>> net/ipv6/fib6_rules.c:259:29: warning: no previous prototype for function 'fib6_rule_action' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int fib6_rule_action(struct fib_rule *rule,
^
net/ipv6/fib6_rules.c:259:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int fib6_rule_action(struct fib_rule *rule,
^
static
>> net/ipv6/fib6_rules.c:269:30: warning: no previous prototype for function 'fib6_rule_suppress' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
^
net/ipv6/fib6_rules.c:269:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
^
static
>> net/ipv6/fib6_rules.c:302:29: warning: no previous prototype for function 'fib6_rule_match' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int fib6_rule_match(struct fib_rule *rule,
^
net/ipv6/fib6_rules.c:302:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int fib6_rule_match(struct fib_rule *rule,
^
static
3 warnings generated.
vim +/fib4_rule_action +107 net/ipv4/fib_rules.c
106
> 107 INDIRECT_CALLABLE_SCOPE int fib4_rule_action(struct fib_rule *rule,
108 struct flowi *flp, int flags,
109 struct fib_lookup_arg *arg)
110 {
111 int err = -EAGAIN;
112 struct fib_table *tbl;
113 u32 tb_id;
114
115 switch (rule->action) {
116 case FR_ACT_TO_TBL:
117 break;
118
119 case FR_ACT_UNREACHABLE:
120 return -ENETUNREACH;
121
122 case FR_ACT_PROHIBIT:
123 return -EACCES;
124
125 case FR_ACT_BLACKHOLE:
126 default:
127 return -EINVAL;
128 }
129
130 rcu_read_lock();
131
132 tb_id = fib_rule_get_table(rule, arg);
133 tbl = fib_get_table(rule->fr_net, tb_id);
134 if (tbl)
135 err = fib_table_lookup(tbl, &flp->u.ip4,
136 (struct fib_result *)arg->result,
137 arg->flags);
138
139 rcu_read_unlock();
140 return err;
141 }
142
> 143 INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule,
144 struct fib_lookup_arg *arg)
145 {
146 struct fib_result *result = (struct fib_result *) arg->result;
147 struct net_device *dev = NULL;
148
149 if (result->fi) {
150 struct fib_nh_common *nhc = fib_info_nhc(result->fi, 0);
151
152 dev = nhc->nhc_dev;
153 }
154
155 /* do not accept result if the route does
156 * not meet the required prefix length
157 */
158 if (result->prefixlen <= rule->suppress_prefixlen)
159 goto suppress_route;
160
161 /* do not accept result if the route uses a device
162 * belonging to a forbidden interface group
163 */
164 if (rule->suppress_ifgroup != -1 && dev && dev->group == rule->suppress_ifgroup)
165 goto suppress_route;
166
167 return false;
168
169 suppress_route:
170 if (!(arg->flags & FIB_LOOKUP_NOREF))
171 fib_info_put(result->fi);
172 return true;
173 }
174
> 175 INDIRECT_CALLABLE_SCOPE int fib4_rule_match(struct fib_rule *rule,
176 struct flowi *fl, int flags)
177 {
178 struct fib4_rule *r = (struct fib4_rule *) rule;
179 struct flowi4 *fl4 = &fl->u.ip4;
180 __be32 daddr = fl4->daddr;
181 __be32 saddr = fl4->saddr;
182
183 if (((saddr ^ r->src) & r->srcmask) ||
184 ((daddr ^ r->dst) & r->dstmask))
185 return 0;
186
187 if (r->tos && (r->tos != fl4->flowi4_tos))
188 return 0;
189
190 if (rule->ip_proto && (rule->ip_proto != fl4->flowi4_proto))
191 return 0;
192
193 if (fib_rule_port_range_set(&rule->sport_range) &&
194 !fib_rule_port_inrange(&rule->sport_range, fl4->fl4_sport))
195 return 0;
196
197 if (fib_rule_port_range_set(&rule->dport_range) &&
198 !fib_rule_port_inrange(&rule->dport_range, fl4->fl4_dport))
199 return 0;
200
201 return 1;
202 }
203
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75375 bytes --]
prev parent reply other threads:[~2020-07-25 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 1:49 [PATCH net-next] fib: use indirect call wrappers in the most common fib_rules_ops Brian Vazquez
2020-07-25 13:38 ` kernel test robot
2020-07-25 15:08 ` kernel test robot [this message]
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=202007252345.bNXAYJv2%lkp@intel.com \
--to=lkp@intel.com \
--cc=brianvv.kernel@gmail.com \
--cc=brianvv@google.com \
--cc=clang-built-linux@googlegroups.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).