From: Veaceslav Falico <vfalico@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>
Cc: Jay Vosburgh <jay.vosburgh@canonical.com>,
netdev@vger.kernel.org, Andy Gospodarek <andy@greyhouse.net>,
Ding Tianhong <dingtianhong@huawei.com>,
Patric McHardy <kaber@trash.net>
Subject: Re: [PATCH v2 net] bonding: Fix stacked device detection in arp monitoring
Date: Wed, 7 May 2014 22:10:20 +0200 [thread overview]
Message-ID: <20140507201019.GW6295@redhat.com> (raw)
In-Reply-To: <20140507185937.GV6295@redhat.com>
On Wed, May 07, 2014 at 08:59:37PM +0200, Veaceslav Falico wrote:
>Anyway, so the only concern is:
>
>bond0 -> whatever1 -> vlan1 -> whatever2 -> vlan2 -> whatever3_IP
> \-> vlan3
>bond_check_path start==bond0 idx=0
>finds vlan1, tag[0] set, recursion start==vlan1 idx=1
>\->
> bond_check_path start==vlan1 idx=1
> finds vlan2, tag[1] set, recursion start==vlan2 idx=2
> \-> returns right away with false as idx >= 2.
>
> finds vlan3 (!!!) that isn't related with whatever_IP, tag[1] set with the
> wrong vlan, recursion start==vlan3 idx=2
> \-> return right away with false as idx >= 2.
>
> finds whatever3_IP, returns true.
>returns true
Here's a proof of concept (btw, if somebody wants this script - I can put
it somewhere), with your patch applied:
bond0 is configured in mode 1 with eth2 being the primary slave, and (one of)
the arp_ip_targets is 192.168.10.254 (bond2's subnet /24).
Initially everything works:
darkmag:~#/home/vfalico/tmp/asciinet/netstruct.pl
+---------------+ +-------------+ +--------------+
| bond1 | neighbour | bond1.11 | master | bond2 |
| 192.168.2.1 | ------------ | | <-------- | 192.168.10.1 |
+---------------+ +-------------+ +--------------+
|
| master
v
+---------------+ +-------------+ +--------------+ +------+
| bridge0.15 | neighbour | bridge0 | master | bond0 | master | eth2 |
| | ------------ | 192.168.3.1 | --------> | | --------> | |
+---------------+ +-------------+ +--------------+ +------+
|
| master
v
+---------------+ +--------------+
| dummy0 | | eth0 |
+---------------+ +--------------+
...
tcpdump from eth2:
21:57:54.990521 00:22:64:b9:87:05 > Broadcast, ethertype 802.1Q (0x8100), length 50: vlan 15, p 0, ethertype 802.1Q, vlan 11, p 0, ethertype ARP, Request who-has 192.168.10.254 tell 192.168.10.1, length 28
so, tag 11 (via bond1.11) and tag 15 (via bridge0.15), all fine.
Now:
darkmag:~#echo -bond2 > /sys/class/net/bonding_masters
darkmag:~#vconfig add bond1 12
Added VLAN with VID == 12 to IF -:bond1:-
darkmag:~#ifup bond2
Determining if ip address 192.168.10.1 is already in use for device bond2...
darkmag:~#/home/vfalico/tmp/asciinet/netstruct.pl
+-------------+ +---------------+ +----------+ +--------------+
| bridge0.15 | master | bond1 | neighbour | bond1.11 | master | bond2 |
| | <-------- | 192.168.2.1 | ------------ | | <-------- | 192.168.10.1 |
+-------------+ +---------------+ +----------+ +--------------+
| |
| neighbour | neighbour
| |
+-------------+ +---------------+
| bridge0 | | bond1.12 |
| 192.168.3.1 | | |
+-------------+ +---------------+
|
| master
v
+-------------+ master +---------------+
| bond0 | --------> | eth2 |
+-------------+ +---------------+
|
| master
v
+-------------+ +---------------+
| eth0 | | dummy0 |
+-------------+ +---------------+
...
and tcpdump shows:
21:58:44.136522 00:22:64:b9:87:05 > Broadcast, ethertype 802.1Q (0x8100), length 50: vlan 15, p 0, ethertype 802.1Q, vlan 12, p 0, ethertype ARP, Request who-has 192.168.10.254 tell 192.168.10.1, length 28
Notice vlan 12 instead of vlan 11.
So I guess that, till the end, we indeed can't guarantee the ordering and should,
actually, go via "the longest" route...
Hope that helps.
next prev parent reply other threads:[~2014-05-07 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 13:47 [PATCH v2 net] bonding: Fix stacked device detection in arp monitoring Vlad Yasevich
2014-05-07 16:43 ` Jay Vosburgh
2014-05-07 17:08 ` Vlad Yasevich
2014-05-07 17:49 ` Veaceslav Falico
2014-05-07 18:11 ` Veaceslav Falico
2014-05-07 18:47 ` Vlad Yasevich
2014-05-07 18:59 ` Veaceslav Falico
2014-05-07 19:40 ` Jay Vosburgh
2014-05-07 20:10 ` Veaceslav Falico [this message]
2014-05-08 4:25 ` Ding Tianhong
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=20140507201019.GW6295@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=dingtianhong@huawei.com \
--cc=jay.vosburgh@canonical.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=vyasevic@redhat.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;
as well as URLs for NNTP newsgroup(s).