tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: b9aaec8f0be518096d1377082e0abe6a85e86ff3 [12053/13260] fib: use indirect call
wrappers in the most common fib_rules_ops
config: i386-randconfig-a006-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout b9aaec8f0be518096d1377082e0abe6a85e86ff3
# 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(a)intel.com>
All errors (new ones prefixed by >>):
ld: net/core/fib_rules.o: in function `fib_rule_match':
net/core/fib_rules.c:271: undefined reference to `fib6_rule_match'
ld: net/core/fib_rules.c:271: undefined reference to `fib6_rule_match'
ld: net/core/fib_rules.c:271: undefined reference to `fib6_rule_match'
ld: net/core/fib_rules.o: in function `fib_rules_lookup':
net/core/fib_rules.c:305: undefined reference to `fib6_rule_action'
ld: net/core/fib_rules.c:305: undefined reference to `fib6_rule_action'
ld: net/core/fib_rules.c:305: undefined reference to `fib6_rule_action'
ld: net/core/fib_rules.c:310: undefined reference to `fib6_rule_suppress'
ld: net/core/fib_rules.c:310: undefined reference to `fib6_rule_suppress'
ld: net/core/fib_rules.c:310: undefined reference to `fib6_rule_suppress'
ld: net/core/fib_rules.o: in function `fib_rule_match':
> net/core/fib_rules.c:271: undefined reference to
`fib4_rule_match'
> ld: net/core/fib_rules.c:271: undefined reference to `fib4_rule_match'
> ld: net/core/fib_rules.c:271: undefined reference to `fib4_rule_match'
ld: net/core/fib_rules.o: in function `fib_rules_lookup':
> net/core/fib_rules.c:305: undefined reference to
`fib4_rule_action'
> ld: net/core/fib_rules.c:305: undefined reference to `fib4_rule_action'
> ld: net/core/fib_rules.c:305: undefined reference to `fib4_rule_action'
> ld: net/core/fib_rules.c:310: undefined reference to `fib4_rule_suppress'
> ld: net/core/fib_rules.c:310: undefined reference to `fib4_rule_suppress'
> ld: net/core/fib_rules.c:310: undefined reference to `fib4_rule_suppress'
vim +271 net/core/fib_rules.c
245
246 static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
247 struct flowi *fl, int flags,
248 struct fib_lookup_arg *arg)
249 {
250 int ret = 0;
251
252 if (rule->iifindex && (rule->iifindex != fl->flowi_iif))
253 goto out;
254
255 if (rule->oifindex && (rule->oifindex != fl->flowi_oif))
256 goto out;
257
258 if ((rule->mark ^ fl->flowi_mark) & rule->mark_mask)
259 goto out;
260
261 if (rule->tun_id && (rule->tun_id != fl->flowi_tun_key.tun_id))
262 goto out;
263
264 if (rule->l3mdev && !l3mdev_fib_rule_match(rule->fr_net, fl, arg))
265 goto out;
266
267 if (uid_lt(fl->flowi_uid, rule->uid_range.start) ||
268 uid_gt(fl->flowi_uid, rule->uid_range.end))
269 goto out;
270
271 ret = INDIRECT_CALL_INET(ops->match,
272
fib6_rule_match,
273 fib4_rule_match,
274 rule, fl, flags);
275 out:
276 return (rule->flags & FIB_RULE_INVERT) ? !ret : ret;
277 }
278
279 int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl,
280 int flags, struct fib_lookup_arg *arg)
281 {
282 struct fib_rule *rule;
283 int err;
284
285 rcu_read_lock();
286
287 list_for_each_entry_rcu(rule, &ops->rules_list, list) {
288 jumped:
289 if (!fib_rule_match(rule, ops, fl, flags, arg))
290 continue;
291
292 if (rule->action == FR_ACT_GOTO) {
293 struct fib_rule *target;
294
295 target = rcu_dereference(rule->ctarget);
296 if (target == NULL) {
297 continue;
298 } else {
299 rule = target;
300 goto jumped;
301 }
302 } else if (rule->action == FR_ACT_NOP)
303 continue;
304 else
305 err = INDIRECT_CALL_INET(ops->action,
306
fib6_rule_action,
307 fib4_rule_action,
308 rule, fl, flags, arg);
309
310 if (!err && ops->suppress &&
INDIRECT_CALL_INET(ops->suppress,
311 fib6_rule_suppress,
312 fib4_rule_suppress,
313 rule, arg))
314 continue;
315
316 if (err != -EAGAIN) {
317 if ((arg->flags & FIB_LOOKUP_NOREF) ||
318 likely(refcount_inc_not_zero(&rule->refcnt))) {
319 arg->rule = rule;
320 goto out;
321 }
322 break;
323 }
324 }
325
326 err = -ESRCH;
327 out:
328 rcu_read_unlock();
329
330 return err;
331 }
332 EXPORT_SYMBOL_GPL(fib_rules_lookup);
333
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org