diff mbox

[net-next,v2,4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

Message ID 498ff06f59d5ce13b2ad3e1c1902c3d348ca3c00.1498425679.git.mschiffer@universe-factory.net (mailing list archive)
State Deferred
Headers show

Commit Message

Matthias Schiffer June 25, 2017, 9:56 p.m. UTC
Add support for extended error reporting.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
 drivers/net/bonding/bond_netlink.c | 3 ++-
 include/net/rtnetlink.h            | 3 ++-
 net/bridge/br_netlink.c            | 3 ++-
 net/core/rtnetlink.c               | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

Comments

David Ahern June 26, 2017, 4:04 a.m. UTC | #1
On 6/25/17 3:56 PM, Matthias Schiffer wrote:
> Add support for extended error reporting.
> 
> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
> ---


Acked-by: David Ahern <dsahern@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Ahern June 26, 2017, 4:08 a.m. UTC | #2
On 6/25/17 10:04 PM, David Ahern wrote:
> On 6/25/17 3:56 PM, Matthias Schiffer wrote:
>> Add support for extended error reporting.
>>
>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>> ---
> 
> 
> Acked-by: David Ahern <dsahern@gmail.com>
> 

Actually, you are missing the chagne to br_port_slave_changelink.
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthias Schiffer June 26, 2017, 8:43 a.m. UTC | #3
On 06/26/2017 06:08 AM, David Ahern wrote:
> On 6/25/17 10:04 PM, David Ahern wrote:
>> On 6/25/17 3:56 PM, Matthias Schiffer wrote:
>>> Add support for extended error reporting.
>>>
>>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>>> ---
>>
>>
>> Acked-by: David Ahern <dsahern@gmail.com>
>>
> 
> Actually, you are missing the chagne to br_port_slave_changelink.
> 

I'm confused. I am changing br_port_slave_changelink? All my patches are
compile-tested.
David Ahern June 26, 2017, 1:33 p.m. UTC | #4
On 6/26/17 2:43 AM, Matthias Schiffer wrote:
> On 06/26/2017 06:08 AM, David Ahern wrote:
>> On 6/25/17 10:04 PM, David Ahern wrote:
>>> On 6/25/17 3:56 PM, Matthias Schiffer wrote:
>>>> Add support for extended error reporting.
>>>>
>>>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>>>> ---
>>>
>>>
>>> Acked-by: David Ahern <dsahern@gmail.com>
>>>
>>
>> Actually, you are missing the chagne to br_port_slave_changelink.
>>
> 
> I'm confused. I am changing br_port_slave_changelink? All my patches are
> compile-tested.
> 

You are changing the signature of slave_changelink, no?

net/bridge/br_netlink.c:
        .slave_changelink       = br_port_slave_changelink,
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthias Schiffer June 26, 2017, 1:45 p.m. UTC | #5
On 06/26/2017 03:33 PM, David Ahern wrote:
> On 6/26/17 2:43 AM, Matthias Schiffer wrote:
>> On 06/26/2017 06:08 AM, David Ahern wrote:
>>> On 6/25/17 10:04 PM, David Ahern wrote:
>>>> On 6/25/17 3:56 PM, Matthias Schiffer wrote:
>>>>> Add support for extended error reporting.
>>>>>
>>>>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>>>>> ---
>>>>
>>>>
>>>> Acked-by: David Ahern <dsahern@gmail.com>
>>>>
>>>
>>> Actually, you are missing the chagne to br_port_slave_changelink.
>>>
>>
>> I'm confused. I am changing br_port_slave_changelink? All my patches are
>> compile-tested.
>>
> 
> You are changing the signature of slave_changelink, no?
> 
> net/bridge/br_netlink.c:
>         .slave_changelink       = br_port_slave_changelink,
> 


Please read my patch again, I *am* changing br_port_slave_changelink to
match the new signature (this is the net/bridge/br_netlink.c change
appearing in the diffstat).
David Ahern June 26, 2017, 1:47 p.m. UTC | #6
On 6/26/17 7:45 AM, Matthias Schiffer wrote:
> 
> Please read my patch again, I *am* changing br_port_slave_changelink to
> match the new signature (this is the net/bridge/br_netlink.c change
> appearing in the diffstat).
> 

Hmmm.... right you are. sorry for the confusion.
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index 0a9d78de6138..a1b33aa6054a 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -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;
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 11fe0ad60e43..baf99e173dca 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -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,
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 9af177ca4d31..3bc890716c89 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -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;
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 7136588e65e9..658a48959fc4 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -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;