From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: [ofa-general] Re: [PATCH 03/11] IB/ipoib: Bound the net device to the ipoib_neigh structue Date: Mon, 17 Sep 2007 15:23:58 -0700 Message-ID: References: <11898132301664-git-send-email-fubar@us.ibm.com> <11898132322950-git-send-email-fubar@us.ibm.com> <1189813234208-git-send-email-fubar@us.ibm.com> <11898132352341-git-send-email-fubar@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, general@lists.openfabrics.org, jgarzik@pobox.com, davem@davemloft.net To: Jay Vosburgh Return-path: In-Reply-To: <11898132352341-git-send-email-fubar@us.ibm.com> (Jay Vosburgh's message of "Fri, 14 Sep 2007 16:40:22 -0700") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org List-Id: netdev.vger.kernel.org Overall idea looks good... one comment: > + if (n->dev->flags & IFF_MASTER) { > + /* n->dev is not an IPoIB device and we have > + to take priv from elsewhere */ > + neigh = *to_ipoib_neigh(n); > + if (neigh) { > + priv = netdev_priv(neigh->dev); > + ipoib_dbg(priv, "neigh_destructor for bonding device: %s\n", > + n->dev->name); > + } else > + return; > + } seems like it would be cleaner not to worry about bonding here and just use neigh->dev all the time rather than having two ways to look up the device.