Re: [PATCH] ipmr: ip6mr: Create new sockopt to clear mfc cache only

From: kbuild test robot
Date: Wed Jan 30 2019 - 00:42:48 EST


Hi Callum,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net/master]
[also build test ERROR on v5.0-rc4 next-20190129]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Callum-Sinclair/ipmr-ip6mr-Create-new-sockopt-to-clear-mfc-cache-only/20190130-104146
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=arm

All errors (new ones prefixed by >>):

net/ipv4/ipmr.c: In function 'mroute_clean_cache':
>> net/ipv4/ipmr.c:1312:3: error: 'cache' undeclared (first use in this function); did you mean 'cacheid'?
cache = (struct mfc_cache *)c;
^~~~~
cacheid
net/ipv4/ipmr.c:1312:3: note: each undeclared identifier is reported only once for each function it appears in
net/ipv4/ipmr.c:1313:33: error: 'net' undeclared (first use in this function)
call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, cache,
^~~
net/ipv4/ipmr.c: In function 'mroute_clean_tables':
net/ipv4/ipmr.c:1334:14: warning: unused variable 'net' [-Wunused-variable]
struct net *net = read_pnet(&mrt->net);
^~~

vim +1312 net/ipv4/ipmr.c

^1da177e4 Linus Torvalds 2005-04-16 1300
7ba7b80d1 Callum Sinclair 2019-01-30 1301 /* Clear the vif tables */
7ba7b80d1 Callum Sinclair 2019-01-30 1302 static void mroute_clean_cache(struct mr_table *mrt, bool all)
^1da177e4 Linus Torvalds 2005-04-16 1303 {
494fff563 Yuval Mintz 2018-02-28 1304 struct mr_mfc *c, *tmp;
^1da177e4 Linus Torvalds 2005-04-16 1305
a8cb16dd9 Eric Dumazet 2010-10-01 1306 /* Wipe the cache */
8fb472c09 Nikolay Aleksandrov 2017-01-12 1307 list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
0e615e960 Nikolay Aleksandrov 2015-11-20 1308 if (!all && (c->mfc_flags & MFC_STATIC))
^1da177e4 Linus Torvalds 2005-04-16 1309 continue;
8fb472c09 Nikolay Aleksandrov 2017-01-12 1310 rhltable_remove(&mrt->mfc_hash, &c->mnode, ipmr_rht_params);
a8c9486b8 Eric Dumazet 2010-10-01 1311 list_del_rcu(&c->list);
494fff563 Yuval Mintz 2018-02-28 @1312 cache = (struct mfc_cache *)c;
494fff563 Yuval Mintz 2018-02-28 1313 call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, cache,
b362053a7 Yotam Gigi 2017-09-27 1314 mrt->id);
494fff563 Yuval Mintz 2018-02-28 1315 mroute_netlink_event(mrt, cache, RTM_DELROUTE);
8c13af2a2 Yuval Mintz 2018-03-26 1316 mr_cache_put(c);
^1da177e4 Linus Torvalds 2005-04-16 1317 }
^1da177e4 Linus Torvalds 2005-04-16 1318
0c12295a7 Patrick McHardy 2010-04-13 1319 if (atomic_read(&mrt->cache_resolve_queue_len) != 0) {
^1da177e4 Linus Torvalds 2005-04-16 1320 spin_lock_bh(&mfc_unres_lock);
8fb472c09 Nikolay Aleksandrov 2017-01-12 1321 list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) {
862465f2e Patrick McHardy 2010-04-13 1322 list_del(&c->list);
494fff563 Yuval Mintz 2018-02-28 1323 cache = (struct mfc_cache *)c;
494fff563 Yuval Mintz 2018-02-28 1324 mroute_netlink_event(mrt, cache, RTM_DELROUTE);
494fff563 Yuval Mintz 2018-02-28 1325 ipmr_destroy_unres(mrt, cache);
^1da177e4 Linus Torvalds 2005-04-16 1326 }
^1da177e4 Linus Torvalds 2005-04-16 1327 spin_unlock_bh(&mfc_unres_lock);
^1da177e4 Linus Torvalds 2005-04-16 1328 }
^1da177e4 Linus Torvalds 2005-04-16 1329 }
^1da177e4 Linus Torvalds 2005-04-16 1330

:::::: The code at line 1312 was first introduced by commit
:::::: 494fff56379c4ad5b8fe36a5b7ffede4044ca7bb ipmr, ip6mr: Make mfc_cache a common structure

:::::: TO: Yuval Mintz <yuvalm@xxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip