netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	shemminger@linux-foundation.org, kaber@trash.net,
	fubar@us.ibm.com
Subject: Re: [patch net-next-2.6 3/4] bond: implement slave management operations
Date: Sat, 12 Feb 2011 14:16:18 +0100	[thread overview]
Message-ID: <4D568822.3010402@gmail.com> (raw)
In-Reply-To: <20110211152257.GC2763@psychotron.brq.redhat.com>

Le 11/02/2011 16:22, Jiri Pirko a écrit :
>
> Signed-off-by: Jiri Pirko<jpirko@redhat.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.

> +	.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.

  parent reply	other threads:[~2011-02-12 13:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11 15:21 [patch net-next-2.6 1/4] net: extend netlink interface to handle generic slave management Jiri Pirko
2011-02-11 15:22 ` [patch iproute2 2/4] implement slave management operations Jiri Pirko
2011-02-11 15:27   ` Jiri Pirko
2011-02-11 15:22 ` [patch net-next-2.6 3/4] bond: " Jiri Pirko
2011-02-11 17:19   ` Jay Vosburgh
2011-02-11 17:51     ` Jiri Pirko
2011-02-12 13:16   ` Nicolas de Pesloüan [this message]
2011-02-12 13:20     ` Jiri Pirko
2011-02-11 15:23 ` [patch net-next-2.6 4/4] bridge: " Jiri Pirko
2011-02-28 22:17   ` Stephen Hemminger
2011-02-28 22:45     ` Stephen Hemminger
2011-03-01  6:19       ` Jiri Pirko
2011-02-11 15:48 ` [patch net-next-2.6 1/4] net: extend netlink interface to handle generic slave management Patrick McHardy
2011-02-11 17:40   ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D568822.3010402@gmail.com \
    --to=nicolas.2p.debian@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=jpirko@redhat.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).