[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110212132040.GA12156@psychotron.redhat.com>
Date: Sat, 12 Feb 2011 14:20:42 +0100
From: Jiri Pirko <jpirko@...hat.com>
To: Nicolas de Pesloüan
<nicolas.2p.debian@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
shemminger@...ux-foundation.org, kaber@...sh.net, fubar@...ibm.com
Subject: Re: [patch net-next-2.6 3/4] bond: implement slave management
operations
Sat, Feb 12, 2011 at 02:16:18PM CET, nicolas.2p.debian@...il.com wrote:
>Le 11/02/2011 16:22, Jiri Pirko a écrit :
>>
>>Signed-off-by: Jiri Pirko<jpirko@...hat.com>
>>---
>> drivers/net/bonding/bond_main.c | 38 ++++++++++++++++++++++++++++++++++++++
>> 1 files changed, 38 insertions(+), 0 deletions(-)
>>
>>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>>index 1df9f0e..f8e59f9 100644
>>--- a/drivers/net/bonding/bond_main.c
>>+++ b/drivers/net/bonding/bond_main.c
>>@@ -4285,6 +4285,40 @@ unwind:
>> return res;
>> }
>>
>>+static int bond_add_slave(struct net_device *bond_dev,
>>+ struct net_device *slave_dev)
>>+{
>>+ return bond_enslave(bond_dev, slave_dev);
>>+}
>>+
>>+static int bond_del_slave(struct net_device *bond_dev,
>>+ struct net_device *slave_dev)
>>+{
>>+ return bond_release(bond_dev, slave_dev);
>>+}
>>+
>
>Hi Jiri,
>
>Why did you add another level of function nesting (bond_add_slave()
>and bond_del_slave()) instead of using bond_enslave() and
>bond_release() directly in the structure below ?
>
>The function prototypes are identical.
>
>Or may be, rename bond_enslave() to bond_add_slave() and
>bond_release() to bond_del_slave(), for consistency.
Yes you are right - I did it in bonding by copy & paste code I did in
bridge and I didn't see that here it isn't necessary... Will remake this
in respin patchset.
Thanks.
Jirka
>
>>+ .ndo_add_slave = bond_add_slave,
>>+ .ndo_del_slave = bond_del_slave,
>>+ .ndo_get_slave_count = bond_get_slave_count,
>>+ .ndo_get_slave = bond_get_slave,
>
> Nicolas.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists