Skip to content

Commit

Permalink
switchdev: remove old switchdev_port_bridge_setlink
Browse files Browse the repository at this point in the history
New attr-based bridge_setlink can recurse lower devs and recover on err, so
remove old wrapper (including ndo_dflt_switchdev_port_bridge_setlink).

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed May 12, 2015
1 parent fc8f40d commit e71f220
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
9 changes: 0 additions & 9 deletions include/net/switchdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ int switchdev_port_bridge_dellink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags);
int ndo_dflt_switchdev_port_bridge_dellink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags);
int ndo_dflt_switchdev_port_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags);
int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
u8 tos, u8 type, u32 nlflags, u32 tb_id);
int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
Expand Down Expand Up @@ -204,13 +202,6 @@ static inline int ndo_dflt_switchdev_port_bridge_dellink(struct net_device *dev,
return 0;
}

static inline int ndo_dflt_switchdev_port_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh,
u16 flags)
{
return 0;
}

static inline int switchdev_fib_ipv4_add(u32 dst, int dst_len,
struct fib_info *fi,
u8 tos, u8 type,
Expand Down
30 changes: 0 additions & 30 deletions net/switchdev/switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,36 +536,6 @@ int switchdev_port_bridge_dellink(struct net_device *dev,
}
EXPORT_SYMBOL_GPL(switchdev_port_bridge_dellink);

/**
* ndo_dflt_switchdev_port_bridge_setlink - default ndo bridge setlink
* op for master devices
*
* @dev: port device
* @nlh: netlink msg with bridge port attributes
* @flags: bridge setlink flags
*
* Notify master device slaves of bridge port attributes
*/
int ndo_dflt_switchdev_port_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags)
{
struct net_device *lower_dev;
struct list_head *iter;
int ret = 0, err = 0;

if (!(dev->features & NETIF_F_HW_SWITCH_OFFLOAD))
return ret;

netdev_for_each_lower_dev(dev, lower_dev, iter) {
err = switchdev_port_bridge_setlink(lower_dev, nlh, flags);
if (err && err != -EOPNOTSUPP)
ret = err;
}

return ret;
}
EXPORT_SYMBOL_GPL(ndo_dflt_switchdev_port_bridge_setlink);

/**
* ndo_dflt_switchdev_port_bridge_dellink - default ndo bridge dellink
* op for master devices
Expand Down

0 comments on commit e71f220

Please sign in to comment.