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, 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 21:38:02 +0800 [thread overview]
Message-ID: <202007252133.wEhVlenR%lkp@intel.com> (raw)
In-Reply-To: <20200725014909.614068-1-brianvv@google.com>
[-- Attachment #1: Type: text/plain, Size: 5277 bytes --]
Hi Brian,
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/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: i386-randconfig-a011-20200724 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: net/core/fib_rules.o: in function `fib_rule_match':
>> net/core/fib_rules.c:275: undefined reference to `fib6_rule_match'
>> ld: net/core/fib_rules.c:275: undefined reference to `fib6_rule_match'
ld: net/core/fib_rules.c:275: undefined reference to `fib4_rule_match'
ld: net/core/fib_rules.c:275: undefined reference to `fib4_rule_match'
ld: net/core/fib_rules.o: in function `fib_rules_lookup':
>> net/core/fib_rules.c:319: undefined reference to `fib6_rule_action'
>> ld: net/core/fib_rules.c:319: undefined reference to `fib6_rule_action'
ld: net/core/fib_rules.c:319: undefined reference to `fib4_rule_action'
ld: net/core/fib_rules.c:319: undefined reference to `fib4_rule_action'
>> ld: net/core/fib_rules.c:324: undefined reference to `fib6_rule_suppress'
>> ld: net/core/fib_rules.c:324: undefined reference to `fib6_rule_suppress'
ld: net/core/fib_rules.c:324: undefined reference to `fib4_rule_suppress'
ld: net/core/fib_rules.c:324: undefined reference to `fib4_rule_suppress'
vim +275 net/core/fib_rules.c
245
246 INDIRECT_CALLABLE_DECLARE(int fib6_rule_match(struct fib_rule *rule,
247 struct flowi *fl, int flags));
248 INDIRECT_CALLABLE_DECLARE(int fib4_rule_match(struct fib_rule *rule,
249 struct flowi *fl, int flags));
250 static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
251 struct flowi *fl, int flags,
252 struct fib_lookup_arg *arg)
253 {
254 int ret = 0;
255
256 if (rule->iifindex && (rule->iifindex != fl->flowi_iif))
257 goto out;
258
259 if (rule->oifindex && (rule->oifindex != fl->flowi_oif))
260 goto out;
261
262 if ((rule->mark ^ fl->flowi_mark) & rule->mark_mask)
263 goto out;
264
265 if (rule->tun_id && (rule->tun_id != fl->flowi_tun_key.tun_id))
266 goto out;
267
268 if (rule->l3mdev && !l3mdev_fib_rule_match(rule->fr_net, fl, arg))
269 goto out;
270
271 if (uid_lt(fl->flowi_uid, rule->uid_range.start) ||
272 uid_gt(fl->flowi_uid, rule->uid_range.end))
273 goto out;
274
> 275 ret = INDIRECT_CALL_INET(ops->match,
276 fib6_rule_match,
277 fib4_rule_match,
278 rule, fl, flags);
279 out:
280 return (rule->flags & FIB_RULE_INVERT) ? !ret : ret;
281 }
282
283 INDIRECT_CALLABLE_DECLARE(int fib6_rule_action(struct fib_rule *rule,
284 struct flowi *flp, int flags,
285 struct fib_lookup_arg *arg));
286 INDIRECT_CALLABLE_DECLARE(int fib4_rule_action(struct fib_rule *rule,
287 struct flowi *flp, int flags,
288 struct fib_lookup_arg *arg));
289 INDIRECT_CALLABLE_DECLARE(bool fib6_rule_suppress(struct fib_rule *rule,
290 struct fib_lookup_arg *arg));
291 INDIRECT_CALLABLE_DECLARE(bool fib4_rule_suppress(struct fib_rule *rule,
292 struct fib_lookup_arg *arg));
293 int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl,
294 int flags, struct fib_lookup_arg *arg)
295 {
296 struct fib_rule *rule;
297 int err;
298
299 rcu_read_lock();
300
301 list_for_each_entry_rcu(rule, &ops->rules_list, list) {
302 jumped:
303 if (!fib_rule_match(rule, ops, fl, flags, arg))
304 continue;
305
306 if (rule->action == FR_ACT_GOTO) {
307 struct fib_rule *target;
308
309 target = rcu_dereference(rule->ctarget);
310 if (target == NULL) {
311 continue;
312 } else {
313 rule = target;
314 goto jumped;
315 }
316 } else if (rule->action == FR_ACT_NOP)
317 continue;
318 else
> 319 err = INDIRECT_CALL_INET(ops->action,
320 fib6_rule_action,
321 fib4_rule_action,
322 rule, fl, flags, arg);
323
> 324 if (!err && ops->suppress && INDIRECT_CALL_INET(ops->suppress,
325 fib6_rule_suppress,
326 fib4_rule_suppress,
327 rule, arg))
328 continue;
329
330 if (err != -EAGAIN) {
331 if ((arg->flags & FIB_LOOKUP_NOREF) ||
332 likely(refcount_inc_not_zero(&rule->refcnt))) {
333 arg->rule = rule;
334 goto out;
335 }
336 break;
337 }
338 }
339
340 err = -ESRCH;
341 out:
342 rcu_read_unlock();
343
344 return err;
345 }
346 EXPORT_SYMBOL_GPL(fib_rules_lookup);
347
---
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: 34184 bytes --]
next prev parent reply other threads:[~2020-07-25 13:47 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 [this message]
2020-07-25 15:08 ` kernel test robot
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=202007252133.wEhVlenR%lkp@intel.com \
--to=lkp@intel.com \
--cc=brianvv.kernel@gmail.com \
--cc=brianvv@google.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