提交 17dd0ec4 编写于 作者: M Matthias Schiffer 提交者: David S. Miller

net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

Add support for extended error reporting.
Signed-off-by: NMatthias Schiffer <mschiffer@universe-factory.net>
Acked-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a8b8a889
...@@ -132,7 +132,8 @@ static int bond_validate(struct nlattr *tb[], struct nlattr *data[], ...@@ -132,7 +132,8 @@ static int bond_validate(struct nlattr *tb[], struct nlattr *data[],
static int bond_slave_changelink(struct net_device *bond_dev, static int bond_slave_changelink(struct net_device *bond_dev,
struct net_device *slave_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 bonding *bond = netdev_priv(bond_dev);
struct bond_opt_value newval; struct bond_opt_value newval;
......
...@@ -95,7 +95,8 @@ struct rtnl_link_ops { ...@@ -95,7 +95,8 @@ struct rtnl_link_ops {
int (*slave_changelink)(struct net_device *dev, int (*slave_changelink)(struct net_device *dev,
struct net_device *slave_dev, struct net_device *slave_dev,
struct nlattr *tb[], struct nlattr *tb[],
struct nlattr *data[]); struct nlattr *data[],
struct netlink_ext_ack *extack);
size_t (*get_slave_size)(const struct net_device *dev, size_t (*get_slave_size)(const struct net_device *dev,
const struct net_device *slave_dev); const struct net_device *slave_dev);
int (*fill_slave_info)(struct sk_buff *skb, int (*fill_slave_info)(struct sk_buff *skb,
......
...@@ -897,7 +897,8 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[], ...@@ -897,7 +897,8 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[],
static int br_port_slave_changelink(struct net_device *brdev, static int br_port_slave_changelink(struct net_device *brdev,
struct net_device *dev, struct net_device *dev,
struct nlattr *tb[], struct nlattr *tb[],
struct nlattr *data[]) struct nlattr *data[],
struct netlink_ext_ack *extack)
{ {
struct net_bridge *br = netdev_priv(brdev); struct net_bridge *br = netdev_priv(brdev);
int ret; int ret;
......
...@@ -2631,7 +2631,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, ...@@ -2631,7 +2631,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
return -EOPNOTSUPP; return -EOPNOTSUPP;
err = m_ops->slave_changelink(master_dev, dev, err = m_ops->slave_changelink(master_dev, dev,
tb, slave_data); tb, slave_data,
extack);
if (err < 0) if (err < 0)
return err; return err;
status |= DO_SETLINK_NOTIFY; status |= DO_SETLINK_NOTIFY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册