net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink
authorMatthias Schiffer <mschiffer@universe-factory.net>
Sun, 25 Jun 2017 21:56:02 +0000 (23:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jun 2017 03:13:22 +0000 (23:13 -0400)
Add support for extended error reporting.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_netlink.c
include/net/rtnetlink.h
net/bridge/br_netlink.c
net/core/rtnetlink.c

index 0a9d78de61387e8ce7d86d4f4a61f43c78f1a998..a1b33aa6054a8b8f5115f57990d9efd7034ccfd2 100644 (file)
@@ -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;
index 11fe0ad60e43347ab665c1e219619abc96779b87..baf99e173dca9eddcdcc8d6db5dcf67c8e57a520 100644 (file)
@@ -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,
index 9af177ca4d318933abc9a43ae33e848b873b21aa..3bc890716c89cb5fdeafcbd3e5062ed9bb6a9882 100644 (file)
@@ -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;
index 7136588e65e98974098ba1f3438cc846ad9a50aa..658a48959fc44830c443eda9d3e0378d6738d200 100644 (file)
@@ -2631,7 +2631,8 @@ replay:
                                        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;