netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <haliu@redhat.com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Phil Sutter <phil@nwl.cc>, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH iproute2] ip link: fix up bond/bridge slave id
Date: Wed, 7 Sep 2016 21:57:08 +0800	[thread overview]
Message-ID: <20160907135708.GB2861@leo.usersys.redhat.com> (raw)
In-Reply-To: <7515B4FB-81C4-4B70-8DCF-AD2D88097C8C@cumulusnetworks.com>

On Tue, Sep 06, 2016 at 11:31:24AM +0300, Nikolay Aleksandrov wrote:
> NAK, this will actually force the iplink slave logic to always lookup the linkutil symbol. Please check iplink.c and how slave linkutil structs are found.
> The first part of the “bridge/bond_slave” is extracted from the requested type (e.g. bond_slave -> bond) and is
> looked up with the slave flag set to true, in case that fails the symbol (%s_slave_link_util) is looked up and added to the
> linkutil list for later use, but in this case we can end up with linkutil list head pointing to itself (the same slave link util added twice if f.e. we have
> more than 1 slave of that type) and since it doesn’t match - we’ll loop forever.
> 
> Just try adding 2 or more bond slaves with this patch and then do:
> ip -d link show
> 

Ohh, my bad. Thanks for the detailed explanation. I will go through the code
and check it again.

Thanks
Hangbin

      reply	other threads:[~2016-09-07 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06  7:44 [PATCH iproute2] ip link: fix up bond/bridge slave id Hangbin Liu
2016-09-06  8:31 ` Nikolay Aleksandrov
2016-09-07 13:57   ` Hangbin Liu [this message]

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=20160907135708.GB2861@leo.usersys.redhat.com \
    --to=haliu@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=phil@nwl.cc \
    --cc=stephen@networkplumber.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).