All of lore.kernel.org
 help / color / mirror / Atom feed
From: Moni Shoua <monisonlists@gmail.com>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: rdreier@cisco.com, davem@davemloft.net,
	general@lists.openfabrics.org, netdev@vger.kernel.org
Subject: Re: [ofa-general] Re: [PATCH V4 10/10] net/bonding: Destroy bonding master when last slave is gone
Date: Wed, 29 Aug 2007 17:06:21 +0300	[thread overview]
Message-ID: <46D57D5D.3060706@gmail.com> (raw)
In-Reply-To: <3403.1188343986@death>

Jay Vosburgh wrote:
> Moni Shoua <monis@voltaire.com> wrote:
> 
>> When bonding enslaves non Ethernet devices it takes pointers to functions 
>> in the module that owns the slaves. In this case it becomes unsafe
>> to keep the bonding master registered after last slave was unenslaved 
>> because we don't know if the pointers are still valid.  Destroying the bond when slave_cnt is zero
>> ensures that these functions be used anymore.
> 
> 	Would it not be simpler to run the bonding master through
> ether_setup() again when the final slave is released (to reset all of
> the pointers to their "ethernet" values)?  I'm presuming here the
> pointers of questionable validity are the ones set in the
> bond_setup_by_slave() copied from the slave_dev->hard_header, et al.
> 
> 	Having the bonding master disappear (but only sometimes) after
> the last slave is removed is a semantic change I'd rather not introduce
> if it's not necessary.

Thanks for the comments.

Having the master disappear is one way I could think of to solve the problem of leaving
the bonding module with pointers to illegal addresses.
The other way is to increase the usage count, with try_module_get(), of the module which owns of the slave.
To do that I  have to restore the field  owner in structure net_device (it was removed in 2.6).
Do you prefer the second approach? I wasn't sure about that.

  parent reply	other threads:[~2007-08-29 14:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 15:34 [PATCH V4 0/10] net/bonding: ADD IPoIB support for the bonding driver Moni Shoua
2007-08-20 15:42 ` [ofa-general] [PATCH V4 1/10] IB/ipoib: Export call to call_netdevice_notifiers and add new private flag Moni Shoua
2007-08-20 15:43 ` [ofa-general] [PATCH V4 2/10] IB/ipoib: Notify the world before doing unregister Moni Shoua
2007-08-20 15:44 ` [ofa-general] [PATCH V4 3/10] IB/ipoib: Bound the net device to the ipoib_neigh structue Moni Shoua
2007-08-20 15:46 ` [PATCH V4 4/10] IB/ipoib: Verify address handle validity on send Moni Shoua
2007-08-20 15:48 ` [PATCH V4 5/10] net/bonding: Enable bonding to enslave non ARPHRD_ETHER Moni Shoua
2007-08-20 15:49 ` [PATCH V4 6/10] net/bonding: Enable bonding to enslave netdevices not supporting set_mac_address() Moni Shoua
2007-08-20 15:51 ` [PATCH V4 7/10] net/bonding: Enable IP multicast for bonding IPoIB devices Moni Shoua
2007-08-20 15:52 ` [PATCH V4 8/10] net/bonding: Handlle wrong assumptions that slave is always an Ethernet device Moni Shoua
     [not found]   ` <416.1188343604@death>
2007-08-29 13:37     ` [ofa-general] " Moni Shoua
2007-08-20 15:53 ` [ofa-general] PATCH V4 9/10] net/bonding: Delay sending of gratuitous ARP to avoid failure Moni Shoua
2007-08-20 15:58 ` [PATCH V4 10/10] net/bonding: Destroy bonding master when last slave is gone Moni Shoua
     [not found]   ` <3403.1188343986@death>
2007-08-29 14:06     ` Moni Shoua [this message]
2007-08-29 19:50       ` [ofa-general] " Jay Vosburgh
2007-09-02 11:32         ` Moni Shoua
2007-09-01 20:19 ` [ofa-general] [PATCH V4 0/10] net/bonding: ADD IPoIB support for the bonding driver Or Gerlitz
2007-09-10 14:31 ` 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=46D57D5D.3060706@gmail.com \
    --to=monisonlists@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=general@lists.openfabrics.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.