public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Moni Shoua <monis@voltaire.com>
Cc: Roland Dreier <rdreier@cisco.com>,
	Jay Vosburgh <fubar@us.ibm.com>,
	netdev@vger.kernel.org,
	OpenFabrics General <general@lists.openfabrics.org>
Subject: Re: [PATCH V6 5/9] net/bonding: Enable IP multicast for bonding IPoIB devices
Date: Mon, 24 Sep 2007 09:04:37 -0700	[thread overview]
Message-ID: <20070924090437.0406e147@freepuppy.rosehill> (raw)
In-Reply-To: <46F7D99C.3030602@voltaire.com>

On Mon, 24 Sep 2007 17:37:00 +0200
Moni Shoua <monis@voltaire.com> wrote:

> Allow to enslave devices when the bonding device is not up. Over the discussion
> held at the previous post this seemed to be the most clean way to go, where it
> is not expected to cause instabilities.
> 
> Normally, the bonding driver is UP before any enslavement takes place.
> Once a netdevice is UP, the network stack acts to have it join some multicast groups
> (eg the all-hosts 224.0.0.1). Now, since ether_setup() have set the bonding device
> type to be ARPHRD_ETHER and address len to be ETHER_ALEN, the net core code
> computes a wrong multicast link address. This is b/c ip_eth_mc_map() is called
> where for multicast joins taking place after the enslavement another ip_xxx_mc_map()
> is called (eg ip_ib_mc_map() when the bond type is ARPHRD_INFINIBAND)
> 
> Signed-off-by: Moni Shoua <monis at voltaire.com>
> Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
> ---
>  drivers/net/bonding/bond_main.c  |    5 +++--
>  drivers/net/bonding/bond_sysfs.c |    6 ++----
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> Index: net-2.6/drivers/net/bonding/bond_main.c
> ===================================================================
> --- net-2.6.orig/drivers/net/bonding/bond_main.c	2007-08-15 10:54:41.000000000 +0300
> +++ net-2.6/drivers/net/bonding/bond_main.c	2007-08-15 10:55:48.431862446 +0300
> @@ -1285,8 +1285,9 @@ int bond_enslave(struct net_device *bond
>  
>  	/* bond must be initialized by bond_open() before enslaving */
>  	if (!(bond_dev->flags & IFF_UP)) {
> -		dprintk("Error, master_dev is not up\n");
> -		return -EPERM;
> +		printk(KERN_WARNING DRV_NAME
> +			" %s: master_dev is not up in bond_enslave\n",
> +			bond_dev->name);
>  	}
>  
>  	/* already enslaved */
> Index: net-2.6/drivers/net/bonding/bond_sysfs.c
> ===================================================================
> --- net-2.6.orig/drivers/net/bonding/bond_sysfs.c	2007-08-15 10:08:58.000000000 +0300
> +++ net-2.6/drivers/net/bonding/bond_sysfs.c	2007-08-15 10:55:48.432862269 +0300
> @@ -266,11 +266,9 @@ static ssize_t bonding_store_slaves(stru
>  
>  	/* Quick sanity check -- is the bond interface up? */
>  	if (!(bond->dev->flags & IFF_UP)) {
> -		printk(KERN_ERR DRV_NAME
> -		       ": %s: Unable to update slaves because interface is down.\n",
> +		printk(KERN_WARNING DRV_NAME
> +		       ": %s: doing slave updates when interface is down.\n",
>  		       bond->dev->name);
> -		ret = -EPERM;
> -		goto out;
>  	}
>  

Please get rid of the warning. Make bonding work correctly and allow enslave/remove
of device when bonding is down.

  reply	other threads:[~2007-09-24 16:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 15:27 [PATCH V6 0/9] net/bonding: ADD IPoIB support for the bonding driver Moni Shoua
2007-09-24 15:29 ` [ofa-general] [PATCH V6 1/9] IB/ipoib: Bound the net device to the ipoib_neigh structue Moni Shoua
2007-09-24 15:30 ` [ofa-general] [PATCH V6 2/9] IB/ipoib: Verify address handle validity on send Moni Shoua
2007-09-24 15:32 ` [ofa-general] [PATCH V6 3/9] net/bonding: Enable bonding to enslave non ARPHRD_ETHER Moni Shoua
2007-09-24 15:36 ` [ofa-general] [PATCH V6 4/9] net/bonding: Enable bonding to enslave netdevices not supporting set_mac_address() Moni Shoua
2007-09-24 15:37 ` [ofa-general] [PATCH V6 5/9] net/bonding: Enable IP multicast for bonding IPoIB devices Moni Shoua
2007-09-24 16:04   ` Stephen Hemminger [this message]
2007-09-25  9:13     ` Moni Shoua
2007-09-24 15:40 ` [PATCH V6 6/9] net/bonding: Handlle wrong assumptions that slave is always an Ethernet device Moni Shoua
2007-09-24 15:46 ` [ofa-general] PATCH V6 7/9] net/bonding: Delay sending of gratuitous ARP to avoid failure Moni Shoua
2007-09-24 15:47 ` [PATCH V6 8/9] net/bonding: Destroy bonding master when last slave is gone Moni Shoua
2007-09-24 15:49 ` [PATCH 9/9] bonding: Optionally allow ethernet slaves to keep own MAC Moni Shoua
2007-09-25 11:01 ` [ofa-general] [PATCH V6 0/9] net/bonding: ADD IPoIB support for the bonding driver Moni Shoua
2007-09-25 15:24 ` Jay Vosburgh
2007-09-25 15:39   ` [ofa-general] " Roland Dreier
2007-10-02 15:49   ` Moni Shoua
2007-10-02 16:52     ` Jeff Garzik
2007-10-02 18:10       ` Jay Vosburgh
2007-10-09  7:24         ` Moni Shoua

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=20070924090437.0406e147@freepuppy.rosehill \
    --to=shemminger@linux-foundation.org \
    --cc=fubar@us.ibm.com \
    --cc=general@lists.openfabrics.org \
    --cc=monis@voltaire.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdreier@cisco.com \
    /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