Commit 020ec6ba authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

bridge: rename fdb_*_hw to fdb_*_hw_addr to avoid confusion

The current name might seem that this actually offloads the fdb entry to
hw. So rename it to clearly present that this for hardware address
addition/removal.
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarAndy Gospodarek <gospo@cumulusnetworks.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd4c910e
...@@ -90,7 +90,7 @@ static void fdb_rcu_free(struct rcu_head *head) ...@@ -90,7 +90,7 @@ static void fdb_rcu_free(struct rcu_head *head)
* are then updated with the new information. * are then updated with the new information.
* Called under RTNL. * Called under RTNL.
*/ */
static void fdb_add_hw(struct net_bridge *br, const unsigned char *addr) static void fdb_add_hw_addr(struct net_bridge *br, const unsigned char *addr)
{ {
int err; int err;
struct net_bridge_port *p; struct net_bridge_port *p;
...@@ -118,7 +118,7 @@ static void fdb_add_hw(struct net_bridge *br, const unsigned char *addr) ...@@ -118,7 +118,7 @@ static void fdb_add_hw(struct net_bridge *br, const unsigned char *addr)
* the ports with needed information. * the ports with needed information.
* Called under RTNL. * Called under RTNL.
*/ */
static void fdb_del_hw(struct net_bridge *br, const unsigned char *addr) static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr)
{ {
struct net_bridge_port *p; struct net_bridge_port *p;
...@@ -133,7 +133,7 @@ static void fdb_del_hw(struct net_bridge *br, const unsigned char *addr) ...@@ -133,7 +133,7 @@ static void fdb_del_hw(struct net_bridge *br, const unsigned char *addr)
static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f) static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f)
{ {
if (f->is_static) if (f->is_static)
fdb_del_hw(br, f->addr.addr); fdb_del_hw_addr(br, f->addr.addr);
hlist_del_rcu(&f->hlist); hlist_del_rcu(&f->hlist);
fdb_notify(br, f, RTM_DELNEIGH); fdb_notify(br, f, RTM_DELNEIGH);
...@@ -514,7 +514,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source, ...@@ -514,7 +514,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
return -ENOMEM; return -ENOMEM;
fdb->is_local = fdb->is_static = 1; fdb->is_local = fdb->is_static = 1;
fdb_add_hw(br, addr); fdb_add_hw_addr(br, addr);
fdb_notify(br, fdb, RTM_NEWNEIGH); fdb_notify(br, fdb, RTM_NEWNEIGH);
return 0; return 0;
} }
...@@ -754,19 +754,19 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr, ...@@ -754,19 +754,19 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
fdb->is_local = 1; fdb->is_local = 1;
if (!fdb->is_static) { if (!fdb->is_static) {
fdb->is_static = 1; fdb->is_static = 1;
fdb_add_hw(br, addr); fdb_add_hw_addr(br, addr);
} }
} else if (state & NUD_NOARP) { } else if (state & NUD_NOARP) {
fdb->is_local = 0; fdb->is_local = 0;
if (!fdb->is_static) { if (!fdb->is_static) {
fdb->is_static = 1; fdb->is_static = 1;
fdb_add_hw(br, addr); fdb_add_hw_addr(br, addr);
} }
} else { } else {
fdb->is_local = 0; fdb->is_local = 0;
if (fdb->is_static) { if (fdb->is_static) {
fdb->is_static = 0; fdb->is_static = 0;
fdb_del_hw(br, addr); fdb_del_hw_addr(br, addr);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment