Skip to content

Commit

Permalink
net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink
Browse files Browse the repository at this point in the history
Add support for extended error reporting.

Signed-off-by: Matthias Schiffer <[email protected]>
Acked-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
neocturne authored and davem330 committed Jun 27, 2017
1 parent a8b8a88 commit 17dd0ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion drivers/net/bonding/bond_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ static int bond_validate(struct nlattr *tb[], struct nlattr *data[],

static int bond_slave_changelink(struct net_device *bond_dev,
struct net_device *slave_dev,
struct nlattr *tb[], struct nlattr *data[])
struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{
struct bonding *bond = netdev_priv(bond_dev);
struct bond_opt_value newval;
Expand Down
3 changes: 2 additions & 1 deletion include/net/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ struct rtnl_link_ops {
int (*slave_changelink)(struct net_device *dev,
struct net_device *slave_dev,
struct nlattr *tb[],
struct nlattr *data[]);
struct nlattr *data[],
struct netlink_ext_ack *extack);
size_t (*get_slave_size)(const struct net_device *dev,
const struct net_device *slave_dev);
int (*fill_slave_info)(struct sk_buff *skb,
Expand Down
3 changes: 2 additions & 1 deletion net/bridge/br_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,8 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[],
static int br_port_slave_changelink(struct net_device *brdev,
struct net_device *dev,
struct nlattr *tb[],
struct nlattr *data[])
struct nlattr *data[],
struct netlink_ext_ack *extack)
{
struct net_bridge *br = netdev_priv(brdev);
int ret;
Expand Down
3 changes: 2 additions & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
return -EOPNOTSUPP;

err = m_ops->slave_changelink(master_dev, dev,
tb, slave_data);
tb, slave_data,
extack);
if (err < 0)
return err;
status |= DO_SETLINK_NOTIFY;
Expand Down

0 comments on commit 17dd0ec

Please sign in to comment.