提交 52ba57cf 编写于 作者: J Jiri Pirko 提交者: David S. Miller

switchdev: rename switchdev_obj_fdb to switchdev_obj_port_fdb

Make the struct name in sync with object id name.
Suggested-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Acked-by: NScott Feldman <sfeldma@gmail.com>
Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8f24f309
...@@ -4425,7 +4425,7 @@ static int rocker_port_vlans_add(struct rocker_port *rocker_port, ...@@ -4425,7 +4425,7 @@ static int rocker_port_vlans_add(struct rocker_port *rocker_port,
static int rocker_port_fdb_add(struct rocker_port *rocker_port, static int rocker_port_fdb_add(struct rocker_port *rocker_port,
struct switchdev_trans *trans, struct switchdev_trans *trans,
const struct switchdev_obj_fdb *fdb) const struct switchdev_obj_port_fdb *fdb)
{ {
__be16 vlan_id = rocker_port_vid_to_vlan(rocker_port, fdb->vid, NULL); __be16 vlan_id = rocker_port_vid_to_vlan(rocker_port, fdb->vid, NULL);
int flags = 0; int flags = 0;
...@@ -4496,7 +4496,7 @@ static int rocker_port_vlans_del(struct rocker_port *rocker_port, ...@@ -4496,7 +4496,7 @@ static int rocker_port_vlans_del(struct rocker_port *rocker_port,
static int rocker_port_fdb_del(struct rocker_port *rocker_port, static int rocker_port_fdb_del(struct rocker_port *rocker_port,
struct switchdev_trans *trans, struct switchdev_trans *trans,
const struct switchdev_obj_fdb *fdb) const struct switchdev_obj_port_fdb *fdb)
{ {
__be16 vlan_id = rocker_port_vid_to_vlan(rocker_port, fdb->vid, NULL); __be16 vlan_id = rocker_port_vid_to_vlan(rocker_port, fdb->vid, NULL);
int flags = ROCKER_OP_FLAG_NOWAIT | ROCKER_OP_FLAG_REMOVE; int flags = ROCKER_OP_FLAG_NOWAIT | ROCKER_OP_FLAG_REMOVE;
...@@ -4537,7 +4537,7 @@ static int rocker_port_obj_del(struct net_device *dev, ...@@ -4537,7 +4537,7 @@ static int rocker_port_obj_del(struct net_device *dev,
} }
static int rocker_port_fdb_dump(const struct rocker_port *rocker_port, static int rocker_port_fdb_dump(const struct rocker_port *rocker_port,
struct switchdev_obj_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(void *obj)) int (*cb)(void *obj))
{ {
struct rocker *rocker = rocker_port->rocker; struct rocker *rocker = rocker_port->rocker;
......
...@@ -83,7 +83,7 @@ struct switchdev_obj_ipv4_fib { ...@@ -83,7 +83,7 @@ struct switchdev_obj_ipv4_fib {
}; };
/* SWITCHDEV_OBJ_ID_PORT_FDB */ /* SWITCHDEV_OBJ_ID_PORT_FDB */
struct switchdev_obj_fdb { struct switchdev_obj_port_fdb {
const unsigned char *addr; const unsigned char *addr;
u16 vid; u16 vid;
u16 ndm_state; u16 ndm_state;
......
...@@ -133,7 +133,7 @@ static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr) ...@@ -133,7 +133,7 @@ static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr)
static void fdb_del_external_learn(struct net_bridge_fdb_entry *f) static void fdb_del_external_learn(struct net_bridge_fdb_entry *f)
{ {
struct switchdev_obj_fdb fdb = { struct switchdev_obj_port_fdb fdb = {
.addr = f->addr.addr, .addr = f->addr.addr,
.vid = f->vlan_id, .vid = f->vlan_id,
}; };
......
...@@ -341,7 +341,7 @@ static int dsa_slave_port_vlan_dump(struct net_device *dev, ...@@ -341,7 +341,7 @@ static int dsa_slave_port_vlan_dump(struct net_device *dev,
} }
static int dsa_slave_port_fdb_add(struct net_device *dev, static int dsa_slave_port_fdb_add(struct net_device *dev,
const struct switchdev_obj_fdb *fdb, const struct switchdev_obj_port_fdb *fdb,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_slave_priv *p = netdev_priv(dev);
...@@ -357,7 +357,7 @@ static int dsa_slave_port_fdb_add(struct net_device *dev, ...@@ -357,7 +357,7 @@ static int dsa_slave_port_fdb_add(struct net_device *dev,
} }
static int dsa_slave_port_fdb_del(struct net_device *dev, static int dsa_slave_port_fdb_del(struct net_device *dev,
const struct switchdev_obj_fdb *fdb) const struct switchdev_obj_port_fdb *fdb)
{ {
struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_slave_priv *p = netdev_priv(dev);
struct dsa_switch *ds = p->parent; struct dsa_switch *ds = p->parent;
...@@ -370,7 +370,7 @@ static int dsa_slave_port_fdb_del(struct net_device *dev, ...@@ -370,7 +370,7 @@ static int dsa_slave_port_fdb_del(struct net_device *dev,
} }
static int dsa_slave_port_fdb_dump(struct net_device *dev, static int dsa_slave_port_fdb_dump(struct net_device *dev,
struct switchdev_obj_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(void *obj)) int (*cb)(void *obj))
{ {
struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_slave_priv *p = netdev_priv(dev);
......
...@@ -819,7 +819,7 @@ int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], ...@@ -819,7 +819,7 @@ int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev, const unsigned char *addr, struct net_device *dev, const unsigned char *addr,
u16 vid, u16 nlm_flags) u16 vid, u16 nlm_flags)
{ {
struct switchdev_obj_fdb fdb = { struct switchdev_obj_port_fdb fdb = {
.addr = addr, .addr = addr,
.vid = vid, .vid = vid,
}; };
...@@ -843,7 +843,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[], ...@@ -843,7 +843,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev, const unsigned char *addr, struct net_device *dev, const unsigned char *addr,
u16 vid) u16 vid)
{ {
struct switchdev_obj_fdb fdb = { struct switchdev_obj_port_fdb fdb = {
.addr = addr, .addr = addr,
.vid = vid, .vid = vid,
}; };
...@@ -853,7 +853,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[], ...@@ -853,7 +853,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
EXPORT_SYMBOL_GPL(switchdev_port_fdb_del); EXPORT_SYMBOL_GPL(switchdev_port_fdb_del);
struct switchdev_fdb_dump { struct switchdev_fdb_dump {
struct switchdev_obj_fdb fdb; struct switchdev_obj_port_fdb fdb;
struct net_device *dev; struct net_device *dev;
struct sk_buff *skb; struct sk_buff *skb;
struct netlink_callback *cb; struct netlink_callback *cb;
...@@ -862,7 +862,7 @@ struct switchdev_fdb_dump { ...@@ -862,7 +862,7 @@ struct switchdev_fdb_dump {
static int switchdev_port_fdb_dump_cb(void *obj) static int switchdev_port_fdb_dump_cb(void *obj)
{ {
struct switchdev_obj_fdb *fdb = obj; struct switchdev_obj_port_fdb *fdb = obj;
struct switchdev_fdb_dump *dump = struct switchdev_fdb_dump *dump =
container_of(fdb, struct switchdev_fdb_dump, fdb); container_of(fdb, struct switchdev_fdb_dump, fdb);
u32 portid = NETLINK_CB(dump->cb->skb).portid; u32 portid = NETLINK_CB(dump->cb->skb).portid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册