All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: Ido Schimmel <idosch@mellanox.com>,
	Network Development <netdev@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: vxlan_asymmetric.sh test failed every time
Date: Tue, 13 Oct 2020 10:49:30 +0300	[thread overview]
Message-ID: <20201013074930.GA4024934@shredder> (raw)
In-Reply-To: <20201013043943.GL2531@dhcp-12-153.nay.redhat.com>

On Tue, Oct 13, 2020 at 12:39:43PM +0800, Hangbin Liu wrote:
> Hi Ido,
> 
> When run vxlan_asymmetric.sh on RHEL8, It failed every time. I though that
> it may failed because the kernel version is too old. But today I tried with
> latest kernel, it still failed. Would you please help check if I missed
> any configuration?

Works OK for me:

$ sudo ./vxlan_asymmetric.sh veth0 veth1 veth2 veth3 veth4 veth5
TEST: ping: local->local vid 10->vid 20                             [ OK ]
TEST: ping: local->remote vid 10->vid 10                            [ OK ]
TEST: ping: local->remote vid 20->vid 20                            [ OK ]
TEST: ping: local->remote vid 10->vid 20                            [ OK ]
TEST: ping: local->remote vid 20->vid 10                            [ OK ]
INFO: deleting neighbours from vlan interfaces
TEST: ping: local->local vid 10->vid 20                             [ OK ]
TEST: ping: local->remote vid 10->vid 10                            [ OK ]
TEST: ping: local->remote vid 20->vid 20                            [ OK ]
TEST: ping: local->remote vid 10->vid 20                            [ OK ]
TEST: ping: local->remote vid 20->vid 10                            [ OK ]
TEST: neigh_suppress: on / neigh exists: yes                        [ OK ]
TEST: neigh_suppress: on / neigh exists: no                         [ OK ]
TEST: neigh_suppress: off / neigh exists: no                        [ OK ]
TEST: neigh_suppress: off / neigh exists: yes                       [ OK ]

# uname -r
5.9.0-rc8-custom-36808-gccdf7fae3afa

# ip -V
ip utility, iproute2-5.8.0

# netsniff-ng -v
netsniff-ng 0.6.7 (Polygon Window), Git id: (none)

The first failure might be related to your rp_filter settings. Can you
please try with this patch?

diff --git a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
index a0b5f57d6bd3..0727e2012b68 100755
--- a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
+++ b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
@@ -215,10 +215,16 @@ switch_create()
 
        bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10
        bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20
+
+       sysctl_set net.ipv4.conf.all.rp_filter 0
+       sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0
+       sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0
 }
 
 switch_destroy()
 {
+       sysctl_restore net.ipv4.conf.all.rp_filter
+
        bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 20
        bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 10
 
@@ -359,6 +365,10 @@ ns_switch_create()
 
        bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10
        bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20
+
+       sysctl_set net.ipv4.conf.all.rp_filter 0
+       sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0
+       sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0
 }
 export -f ns_switch_create

> 
> # uname -r
> 5.9.0
> # ip -V
> ip utility, iproute2-ss200602
> # netsniff-ng -v
> netsniff-ng 0.6.6 (Syro), Git id: (none)
> # cp forwarding.config.sample forwarding.config
> 
> # ./vxlan_asymmetric.sh
> RTNETLINK answers: File exists
> TEST: ping: local->local vid 10->vid 20                             [FAIL]
> TEST: ping: local->remote vid 10->vid 10                            [ OK ]
> TEST: ping: local->remote vid 20->vid 20                            [ OK ]
> TEST: ping: local->remote vid 10->vid 20                            [FAIL]
> TEST: ping: local->remote vid 20->vid 10                            [FAIL]
> INFO: deleting neighbours from vlan interfaces
> TEST: ping: local->local vid 10->vid 20                             [FAIL]
> TEST: ping: local->remote vid 10->vid 10                            [ OK ]
> TEST: ping: local->remote vid 20->vid 20                            [ OK ]
> TEST: ping: local->remote vid 10->vid 20                            [FAIL]
> TEST: ping: local->remote vid 20->vid 10                            [FAIL]
> TEST: neigh_suppress: on / neigh exists: yes                        [ OK ]
> TEST: neigh_suppress: on / neigh exists: no                         [ OK ]
> TEST: neigh_suppress: off / neigh exists: no                        [ OK ]
> TEST: neigh_suppress: off / neigh exists: yes                       [ OK ]
> 
> # dmesg
> [...snip...]
> [ 1518.885526] device br1 entered promiscuous mode
> [ 1518.886211] device br1 left promiscuous mode
> [ 1518.890637] device br1 entered promiscuous mode
> [ 1518.941524] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1518.949522] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1519.165569] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1519.166900] IPv6: vlan10-v: IPv6 duplicate address fe80::200:5eff:fe00:101 used by 00:00:5e:00:01:01 detected!
> [ 1519.392633] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1519.741559] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1519.861641] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1519.862993] IPv6: vlan20-v: IPv6 duplicate address fe80::200:5eff:fe00:101 used by 00:00:5e:00:01:01 detected!
> [ 1520.181565] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1520.182739] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1524.853572] net_ratelimit: 4 callbacks suppressed
> [ 1524.854346] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1525.365565] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1533.557792] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1534.069921] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1550.965225] br1: received packet on vx20 with own address as source address (addr:00:00:5e:00:01:01, vlan:20)
> [ 1551.477294] br1: received packet on vx10 with own address as source address (addr:00:00:5e:00:01:01, vlan:10)
> [ 1558.064257] device w3 left promiscuous mode
> [ 1558.073279] br1: port 4(w3) entered disabled state
> [...snip...]
> 
> Thanks
> Hangbin

  reply	other threads:[~2020-10-13  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13  4:39 vxlan_asymmetric.sh test failed every time Hangbin Liu
2020-10-13  7:49 ` Ido Schimmel [this message]
2020-10-14  1:39   ` Hangbin Liu
2020-10-14 14:45     ` Ido Schimmel

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=20201013074930.GA4024934@shredder \
    --to=idosch@idosch.org \
    --cc=dsahern@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.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 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.