From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Petr Machata <petrm@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
Woojung Huh <woojung.huh@microchip.com>,
Oleksij Rempel <linux@rempel-privat.de>,
Arun Ramadoss <arun.ramadoss@microchip.com>,
Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [RFC PATCH net-next 3/3] net: dsa: never skip VLAN configuration
Date: Thu, 7 Jul 2022 22:31:17 +0000 [thread overview]
Message-ID: <20220707223116.xc2ua4sznjhe6yqz@skbuf> (raw)
In-Reply-To: <CAFBinCBnYD59W3C+u_B6Y2GtLY1yS17711HAf049mstMF9_5eg@mail.gmail.com>
Hi Martin,
On Wed, Jul 06, 2022 at 09:57:40PM +0200, Martin Blumenstingl wrote:
> Hi Vladimir,
>
> On Wed, Jul 6, 2022 at 6:45 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> [...]
> > Somehow we should do something to make sure that the OpenWRT devices are
> > able to run the selftests, because there's a large number of DSA switches
> > intended for that segment and we should all be onboard (easily).
>
> I could work on this on the OpenWrt side.
> But this would require me to get any test working at all...
>
> I am struggling with not seeing any ping responses.
> Instead of adding VLANs and others to the mix I started with seemingly
> simple commands while connecting an Ethernet cable between lan1 and
> lan2 and another cable between lan3 and lan4:
> 1) give each port a unique MAC address, which is not the default on my
> device under test
> ip link set dev lan1 address 6a:88:f1:99:e1:81
> ip link set dev lan2 address 6a:88:f1:99:e1:82
> ip link set dev lan3 address 6a:88:f1:99:e1:83
> ip link set dev lan4 address 6a:88:f1:99:e1:84
>
> 2) set up IP addresses on LAN1 and LAN2
> ip addr add 192.168.2.1/24 brd + dev lan1
> ip addr add 192.168.2.2/24 brd + dev lan2
>
> 3) bring up the interfaces
> ip link set up dev lan1
> ip link set up dev lan2
>
> 4) start tcpdump on LAN1
> tcpdump -i lan1 &
>
> 5) start ping from LAN2 to LAN1
> ping -I lan2 192.168.2.1
>
> result:
> PING 192.168.2.1 (192.168.2.1): 56 data bytes
> 20:02:01.522977 ARP, Request who-has 192.168.2.1 tell 192.168.2.2, length 46
> 20:02:02.569234 ARP, Request who-has 192.168.2.1 tell 192.168.2.2, length 46
> 20:02:03.609132 ARP, Request who-has 192.168.2.1 tell 192.168.2.2, length 46
> 20:02:05.524200 ARP, Request who-has 192.168.2.1 tell 192.168.2.2, length 46
> 20:02:06.569226 ARP, Request who-has 192.168.2.1 tell 192.168.2.2, length 46
> ...repeats...
>
> So LAN1 can see the ARP request from the ping on LAN2.
> But I am not seeing Linux trying to send a reply.
It won't reply, you either need a network namespace or a VRF to do
loopback IP networking. A VRF is a bit more complicated to do, here's a
netns setup:
ip netns add ns0
ip link set lan2 netns ns0
ip -n ns0 link set lan2 up
ip -n ns0 addr add 192.168.2.2/24 dev lan2
ip netns exec ns0 tcpdump -i lan2 -e -n
ping 192.168.2.2
> I already verified that nftables doesn't have any rules active (if it
> was I think it would rather result in tcpdump not seeing the who-has
> request):
> # nft list tables
> #
>
> # grep "" /proc/sys/net/ipv4/icmp_echo_ignore_*
> /proc/sys/net/ipv4/icmp_echo_ignore_all:0
> /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts:1
>
> # ps | grep netif
> 3014 root 1308 S grep netif
> #
>
> To make things worse: if I let OpenWrt's netifd configure LAN1 and
> LAN2 as single ports with above IP addresses ping works.
> Something is odd and I am not sure how to find out what's wrong.
I'm not familiar with OpenWrt, sorry, I don't know what netifd does.
Also, it's curious that this works, are you sure that the ARP responses
and ICMP replies actually exit through the Ethernet port? ethtool -S
should show if the physical counters increment.
> > I wonder, would it be possible to set up a debian chroot?
>
> I'm thinking of packaging the selftests as OpenWrt package and also
> providing all needed dependencies as OpenWrt packages.
> I think (or I hope, not sure yet) the ping interval is just a matter
> of a busybox config option.
I think it depends on busybox version. At least the latest one
https://github.com/mirror/busybox/blob/master/networking/ping.c#L970
seems to support fractions of a second as intervals, I didn't see any
restriction to sub-second values. In any case, the iputils version
certainly does work.
next prev parent reply other threads:[~2022-07-07 22:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 17:31 [RFC PATCH net-next 0/3] Delete ds->configure_vlan_while_not_filtering Vladimir Oltean
2022-07-05 17:31 ` [RFC PATCH net-next 1/3] selftests: forwarding: add a vlan_deletion test to bridge_vlan_unaware Vladimir Oltean
2022-07-07 12:13 ` Ido Schimmel
2022-07-07 13:34 ` Martin Blumenstingl
2022-07-07 13:45 ` Vladimir Oltean
2022-07-05 17:31 ` [RFC PATCH net-next 2/3] net: dsa: ar9331: remove ds->configure_vlan_while_not_filtering Vladimir Oltean
2022-07-05 17:31 ` [RFC PATCH net-next 3/3] net: dsa: never skip VLAN configuration Vladimir Oltean
2022-07-06 10:51 ` Arun.Ramadoss
2022-07-06 11:12 ` Vladimir Oltean
2022-07-06 16:33 ` Martin Blumenstingl
2022-07-06 16:45 ` Vladimir Oltean
2022-07-06 19:57 ` Martin Blumenstingl
2022-07-07 22:31 ` Vladimir Oltean [this message]
2022-07-08 10:00 ` Martin Blumenstingl
2022-07-08 12:09 ` Vladimir Oltean
2022-07-08 22:27 ` Martin Blumenstingl
2022-07-14 10:46 ` Arun.Ramadoss
2022-07-14 15:12 ` Vladimir Oltean
2022-07-15 9:23 ` Arun.Ramadoss
2022-07-15 15:26 ` Vladimir Oltean
2022-07-18 14:34 ` Arun.Ramadoss
2022-07-18 16:24 ` Vladimir Oltean
2022-07-26 15:10 ` Arun.Ramadoss
2022-07-26 17:21 ` Vladimir Oltean
2022-09-12 15:30 ` Arun.Ramadoss
2022-09-12 15:42 ` Vladimir Oltean
2022-09-13 10:57 ` Arun.Ramadoss
2022-09-13 15:09 ` Vladimir Oltean
2022-07-06 20:04 ` Hauke Mehrtens
2022-07-07 22:54 ` Vladimir Oltean
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=20220707223116.xc2ua4sznjhe6yqz@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux@rempel-privat.de \
--cc=martin.blumenstingl@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=vivien.didelot@gmail.com \
--cc=woojung.huh@microchip.com \
--cc=xiaoliang.yang_1@nxp.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