Message ID | 1445918676-45416-1-git-send-email-roopa@cumulusnetworks.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
Hi Roopa,
[auto build test ERROR on net-next/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Roopa-Prabhu/bridge-set-is_local-and-is_static-before-fdb-entry-is-added-to-the-fdb-hashtable/20151027-120635
config: i386-randconfig-x009-201543 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
net/bridge/br_fdb.c: In function 'br_fdb_external_learn_add':
>> net/bridge/br_fdb.c:1103:9: error: too few arguments to function 'fdb_create'
fdb = fdb_create(head, p, addr, vid);
^
net/bridge/br_fdb.c:495:37: note: declared here
static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head,
^
vim +/fdb_create +1103 net/bridge/br_fdb.c
3aeb6617 Jiri Pirko 2015-01-15 1097 ASSERT_RTNL();
cf6b8e1e Scott Feldman 2014-11-28 1098 spin_lock_bh(&br->hash_lock);
cf6b8e1e Scott Feldman 2014-11-28 1099
cf6b8e1e Scott Feldman 2014-11-28 1100 head = &br->hash[br_mac_hash(addr, vid)];
cf6b8e1e Scott Feldman 2014-11-28 1101 fdb = fdb_find(head, addr, vid);
cf6b8e1e Scott Feldman 2014-11-28 1102 if (!fdb) {
cf6b8e1e Scott Feldman 2014-11-28 @1103 fdb = fdb_create(head, p, addr, vid);
cf6b8e1e Scott Feldman 2014-11-28 1104 if (!fdb) {
cf6b8e1e Scott Feldman 2014-11-28 1105 err = -ENOMEM;
cf6b8e1e Scott Feldman 2014-11-28 1106 goto err_unlock;
:::::: The code at line 1103 was first introduced by commit
:::::: cf6b8e1eedffd9ef9a22c0c9453d752b07daf89a bridge: add API to notify bridge driver of learned FBD on offloaded device
:::::: TO: Scott Feldman <sfeldma@gmail.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
On 10/26/15, 9:16 PM, kbuild test robot wrote: > Hi Roopa, > > [auto build test ERROR on net-next/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base] > > url: https://github.com/0day-ci/linux/commits/Roopa-Prabhu/bridge-set-is_local-and-is_static-before-fdb-entry-is-added-to-the-fdb-hashtable/20151027-120635 > config: i386-randconfig-x009-201543 (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All errors (new ones prefixed by >>): > > net/bridge/br_fdb.c: In function 'br_fdb_external_learn_add': >>> net/bridge/br_fdb.c:1103:9: error: too few arguments to function 'fdb_create' > fdb = fdb_create(head, p, addr, vid); > ^ > net/bridge/br_fdb.c:495:37: note: declared here > static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head, > ^ > > vim +/fdb_create +1103 net/bridge/br_fdb.c > > 3aeb6617 Jiri Pirko 2015-01-15 1097 ASSERT_RTNL(); > cf6b8e1e Scott Feldman 2014-11-28 1098 spin_lock_bh(&br->hash_lock); > cf6b8e1e Scott Feldman 2014-11-28 1099 > cf6b8e1e Scott Feldman 2014-11-28 1100 head = &br->hash[br_mac_hash(addr, vid)]; > cf6b8e1e Scott Feldman 2014-11-28 1101 fdb = fdb_find(head, addr, vid); > cf6b8e1e Scott Feldman 2014-11-28 1102 if (!fdb) { > cf6b8e1e Scott Feldman 2014-11-28 @1103 fdb = fdb_create(head, p, addr, vid); > cf6b8e1e Scott Feldman 2014-11-28 1104 if (!fdb) { > cf6b8e1e Scott Feldman 2014-11-28 1105 err = -ENOMEM; > cf6b8e1e Scott Feldman 2014-11-28 1106 goto err_unlock; > > :::::: The code at line 1103 was first introduced by commit > :::::: cf6b8e1eedffd9ef9a22c0c9453d752b07daf89a bridge: add API to notify bridge driver of learned FBD on offloaded device > > :::::: TO: Scott Feldman <sfeldma@gmail.com> > :::::: CC: David S. Miller <davem@davemloft.net> > sorry, looks like i posted an older version. Re-posting. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index c88bd8e..35a1c7e 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -495,7 +495,9 @@ static struct net_bridge_fdb_entry *fdb_find_rcu(struct hlist_head *head, static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head, struct net_bridge_port *source, const unsigned char *addr, - __u16 vid) + __u16 vid, + unsigned char is_local, + unsigned char is_static) { struct net_bridge_fdb_entry *fdb; @@ -504,8 +506,8 @@ static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head, memcpy(fdb->addr.addr, addr, ETH_ALEN); fdb->dst = source; fdb->vlan_id = vid; - fdb->is_local = 0; - fdb->is_static = 0; + fdb->is_local = is_local; + fdb->is_static = is_static; fdb->added_by_user = 0; fdb->added_by_external_learn = 0; fdb->updated = fdb->used = jiffies; @@ -536,11 +538,10 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source, fdb_delete(br, fdb); } - fdb = fdb_create(head, source, addr, vid); + fdb = fdb_create(head, source, addr, vid, 1, 1); if (!fdb) return -ENOMEM; - fdb->is_local = fdb->is_static = 1; fdb_add_hw_addr(br, addr); fdb_notify(br, fdb, RTM_NEWNEIGH); return 0; @@ -597,7 +598,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, } else { spin_lock(&br->hash_lock); if (likely(!fdb_find(head, addr, vid))) { - fdb = fdb_create(head, source, addr, vid); + fdb = fdb_create(head, source, addr, vid, 0, 0); if (fdb) { if (unlikely(added_by_user)) fdb->added_by_user = 1; @@ -774,7 +775,7 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr, if (!(flags & NLM_F_CREATE)) return -ENOENT; - fdb = fdb_create(head, source, addr, vid); + fdb = fdb_create(head, source, addr, vid, 0, 0); if (!fdb) return -ENOMEM; diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index a9d424e..fcdb86d 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c @@ -141,7 +141,7 @@ EXPORT_SYMBOL_GPL(br_deliver); /* called with rcu_read_lock */ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) { - if (should_deliver(to, skb)) { + if (to && should_deliver(to, skb)) { if (skb0) deliver_clone(to, skb, __br_forward); else