* [PATCH] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses @ 2024-05-29 14:22 Lukasz Majewski 2024-05-29 14:22 ` [PATCH] selftests: hsr: Extend the hsr_redbox.sh " Lukasz Majewski 2024-06-03 9:31 ` [PATCH] selftests: hsr: Extend the hsr_ping.sh " Hangbin Liu 0 siblings, 2 replies; 6+ messages in thread From: Lukasz Majewski @ 2024-05-29 14:22 UTC (permalink / raw) To: Jakub Kicinski, netdev, Paolo Abeni Cc: Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Hangbin Liu, Geliang Tang, Shuah Khan, Lukasz Majewski Fixed MAC addresses help with debugging as last four bytes identify the network namespace. Signed-off-by: Lukasz Majewski <lukma@denx.de> --- tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh b/tools/testing/selftests/net/hsr/hsr_ping.sh index 3684b813b0f6..f5d207fc770a 100755 --- a/tools/testing/selftests/net/hsr/hsr_ping.sh +++ b/tools/testing/selftests/net/hsr/hsr_ping.sh @@ -152,6 +152,15 @@ setup_hsr_interfaces() ip -net "$ns3" addr add 100.64.0.3/24 dev hsr3 ip -net "$ns3" addr add dead:beef:1::3/64 dev hsr3 nodad + ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1 + ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2 + + ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1 + ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2 + + ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1 + ip -net "$ns3" link set address 00:11:22:00:03:02 dev ns3eth2 + # All Links up ip -net "$ns1" link set ns1eth1 up ip -net "$ns1" link set ns1eth2 up -- 2.20.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses 2024-05-29 14:22 [PATCH] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses Lukasz Majewski @ 2024-05-29 14:22 ` Lukasz Majewski 2024-05-30 1:34 ` Hangbin Liu 2024-06-03 9:32 ` Hangbin Liu 2024-06-03 9:31 ` [PATCH] selftests: hsr: Extend the hsr_ping.sh " Hangbin Liu 1 sibling, 2 replies; 6+ messages in thread From: Lukasz Majewski @ 2024-05-29 14:22 UTC (permalink / raw) To: Jakub Kicinski, netdev, Paolo Abeni Cc: Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Hangbin Liu, Geliang Tang, Shuah Khan, Lukasz Majewski Fixed MAC addresses help with debugging as last four bytes identify the network namespace. Moreover, it allows to mimic the real life setup with for example bridge having the same MAC address on each port. Signed-off-by: Lukasz Majewski <lukma@denx.de> --- tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh index 1f36785347c0..998103502d5d 100755 --- a/tools/testing/selftests/net/hsr/hsr_redbox.sh +++ b/tools/testing/selftests/net/hsr/hsr_redbox.sh @@ -96,6 +96,21 @@ setup_hsr_interfaces() ip -n "${ns4}" link set ns4eth1 up ip -n "${ns5}" link set ns5eth1 up + ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1 + ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2 + + ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1 + ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2 + ip -net "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3 + + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1 + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2 + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3 + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1 + + ip -net "$ns4" link set address 00:11:22:00:04:01 dev ns4eth1 + ip -net "$ns5" link set address 00:11:22:00:05:01 dev ns5eth1 + ip -net "${ns1}" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version ${HSRv} proto 0 ip -net "${ns2}" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 interlink ns2eth3 supervision 45 version ${HSRv} proto 0 -- 2.20.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses 2024-05-29 14:22 ` [PATCH] selftests: hsr: Extend the hsr_redbox.sh " Lukasz Majewski @ 2024-05-30 1:34 ` Hangbin Liu 2024-06-03 7:03 ` Lukasz Majewski 2024-06-03 9:32 ` Hangbin Liu 1 sibling, 1 reply; 6+ messages in thread From: Hangbin Liu @ 2024-05-30 1:34 UTC (permalink / raw) To: Lukasz Majewski Cc: Jakub Kicinski, netdev, Paolo Abeni, Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Geliang Tang, Shuah Khan On Wed, May 29, 2024 at 04:22:32PM +0200, Lukasz Majewski wrote: > Fixed MAC addresses help with debugging as last four bytes identify the > network namespace. > > Moreover, it allows to mimic the real life setup with for example bridge > having the same MAC address on each port. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > --- > tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh > index 1f36785347c0..998103502d5d 100755 > --- a/tools/testing/selftests/net/hsr/hsr_redbox.sh > +++ b/tools/testing/selftests/net/hsr/hsr_redbox.sh > @@ -96,6 +96,21 @@ setup_hsr_interfaces() > ip -n "${ns4}" link set ns4eth1 up > ip -n "${ns5}" link set ns5eth1 up > > + ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1 > + ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2 > + > + ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1 > + ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2 > + ip -net "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3 > + > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1 The ns3's mac addresses are same, is it a copy-paste error? BTW, please add the target tree for the patch, e.g. [PATCH net-next] Thanks Hangbin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses 2024-05-30 1:34 ` Hangbin Liu @ 2024-06-03 7:03 ` Lukasz Majewski 0 siblings, 0 replies; 6+ messages in thread From: Lukasz Majewski @ 2024-06-03 7:03 UTC (permalink / raw) To: Hangbin Liu Cc: Jakub Kicinski, netdev, Paolo Abeni, Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Geliang Tang, Shuah Khan [-- Attachment #1: Type: text/plain, Size: 2072 bytes --] Hi Hangbin, > On Wed, May 29, 2024 at 04:22:32PM +0200, Lukasz Majewski wrote: > > Fixed MAC addresses help with debugging as last four bytes identify > > the network namespace. > > > > Moreover, it allows to mimic the real life setup with for example > > bridge having the same MAC address on each port. > > > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > > --- > > tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > > diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh > > b/tools/testing/selftests/net/hsr/hsr_redbox.sh index > > 1f36785347c0..998103502d5d 100755 --- > > a/tools/testing/selftests/net/hsr/hsr_redbox.sh +++ > > b/tools/testing/selftests/net/hsr/hsr_redbox.sh @@ -96,6 +96,21 @@ > > setup_hsr_interfaces() ip -n "${ns4}" link set ns4eth1 up > > ip -n "${ns5}" link set ns5eth1 up > > > > + ip -net "$ns1" link set address 00:11:22:00:01:01 dev > > ns1eth1 > > + ip -net "$ns1" link set address 00:11:22:00:01:02 dev > > ns1eth2 + > > + ip -net "$ns2" link set address 00:11:22:00:02:01 dev > > ns2eth1 > > + ip -net "$ns2" link set address 00:11:22:00:02:02 dev > > ns2eth2 > > + ip -net "$ns2" link set address 00:11:22:00:02:03 dev > > ns2eth3 + > > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev > > ns3eth1 > > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev > > ns3eth2 > > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev > > ns3eth3 > > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev > > ns3br1 > > The ns3's mac addresses are same, is it a copy-paste error? > No, it is to mimic the switch behaviour. > BTW, please add the target tree for the patch, e.g. > > [PATCH net-next] Ok. > > Thanks > Hangbin Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses 2024-05-29 14:22 ` [PATCH] selftests: hsr: Extend the hsr_redbox.sh " Lukasz Majewski 2024-05-30 1:34 ` Hangbin Liu @ 2024-06-03 9:32 ` Hangbin Liu 1 sibling, 0 replies; 6+ messages in thread From: Hangbin Liu @ 2024-06-03 9:32 UTC (permalink / raw) To: Lukasz Majewski Cc: Jakub Kicinski, netdev, Paolo Abeni, Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Geliang Tang, Shuah Khan On Wed, May 29, 2024 at 04:22:32PM +0200, Lukasz Majewski wrote: > Fixed MAC addresses help with debugging as last four bytes identify the > network namespace. > > Moreover, it allows to mimic the real life setup with for example bridge > having the same MAC address on each port. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > --- > tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh > index 1f36785347c0..998103502d5d 100755 > --- a/tools/testing/selftests/net/hsr/hsr_redbox.sh > +++ b/tools/testing/selftests/net/hsr/hsr_redbox.sh > @@ -96,6 +96,21 @@ setup_hsr_interfaces() > ip -n "${ns4}" link set ns4eth1 up > ip -n "${ns5}" link set ns5eth1 up > > + ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1 > + ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2 > + > + ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1 > + ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2 > + ip -net "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3 > + > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3 > + ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1 > + > + ip -net "$ns4" link set address 00:11:22:00:04:01 dev ns4eth1 > + ip -net "$ns5" link set address 00:11:22:00:05:01 dev ns5eth1 > + > ip -net "${ns1}" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version ${HSRv} proto 0 > ip -net "${ns2}" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 interlink ns2eth3 supervision 45 version ${HSRv} proto 0 > > -- > 2.20.1 > Tested-by: Hangbin Liu <liuhangbin@gmail.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses 2024-05-29 14:22 [PATCH] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses Lukasz Majewski 2024-05-29 14:22 ` [PATCH] selftests: hsr: Extend the hsr_redbox.sh " Lukasz Majewski @ 2024-06-03 9:31 ` Hangbin Liu 1 sibling, 0 replies; 6+ messages in thread From: Hangbin Liu @ 2024-06-03 9:31 UTC (permalink / raw) To: Lukasz Majewski Cc: Jakub Kicinski, netdev, Paolo Abeni, Eric Dumazet, Vladimir Oltean, David S. Miller, Oleksij Rempel, Tristram.Ha, Sebastian Andrzej Siewior, Ravi Gunasekaran, Simon Horman, Nikita Zhandarovich, Murali Karicheri, Arvid Brodin, Dan Carpenter, Ricardo B. Marliere, Casper Andersson, linux-kernel, linux-kselftest, Geliang Tang, Shuah Khan On Wed, May 29, 2024 at 04:22:31PM +0200, Lukasz Majewski wrote: > Fixed MAC addresses help with debugging as last four bytes identify the > network namespace. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > --- > tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh b/tools/testing/selftests/net/hsr/hsr_ping.sh > index 3684b813b0f6..f5d207fc770a 100755 > --- a/tools/testing/selftests/net/hsr/hsr_ping.sh > +++ b/tools/testing/selftests/net/hsr/hsr_ping.sh > @@ -152,6 +152,15 @@ setup_hsr_interfaces() > ip -net "$ns3" addr add 100.64.0.3/24 dev hsr3 > ip -net "$ns3" addr add dead:beef:1::3/64 dev hsr3 nodad > > + ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1 > + ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2 > + > + ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1 > + ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2 > + > + ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1 > + ip -net "$ns3" link set address 00:11:22:00:03:02 dev ns3eth2 > + > # All Links up > ip -net "$ns1" link set ns1eth1 up > ip -net "$ns1" link set ns1eth2 up > -- > 2.20.1 > Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-03 9:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-05-29 14:22 [PATCH] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses Lukasz Majewski 2024-05-29 14:22 ` [PATCH] selftests: hsr: Extend the hsr_redbox.sh " Lukasz Majewski 2024-05-30 1:34 ` Hangbin Liu 2024-06-03 7:03 ` Lukasz Majewski 2024-06-03 9:32 ` Hangbin Liu 2024-06-03 9:31 ` [PATCH] selftests: hsr: Extend the hsr_ping.sh " Hangbin Liu
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).