selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses
Subsystems (4)
PATCH 1/1 selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses
Fixed MAC addresses help with debugging as last four bytes identify the network namespace.
--- tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++ 1 file changed, 9 insertions(+)
tools/testing/selftests/net/hsr/hsr_ping.sh +9 -0
@@ -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
Signature · 1 line
2.20.1
PATCH 1/1 selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses
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.
--- tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
tools/testing/selftests/net/hsr/hsr_redbox.sh +15 -0
@@ -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
Signature · 1 line
2.20.1
Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses
Quoted 20 lines · 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 <[email protected]>--- tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+)tools/testing/selftests/net/hsr/hsr_redbox.sh +1
-0@@ -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
tools/testing/selftests/net/hsr/hsr_redbox.sh setup_hsr_interfaces() · line 109
Quoted 10 lines
tools/testing/selftests/net/hsr/hsr_redbox.sh +10
-0+ 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
Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses
Hi Hangbin,
Quoted 32 lines · Lukasz Majewski
Quoted 31 lines
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 <[email protected]>--- tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+)(quoted diff) +0
-0
b/tools/testing/selftests/net/hsr/hsr_redbox.shindex1f36785347c0..998103502d5d100755 ---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 uptools/testing/selftests/net/hsr/hsr_redbox.sh +1
-0ip -n "${ns5}" link set ns5eth1 up + ip -net "$ns1" link set address 00:11:22:00:01:01 devns1eth1
(quoted diff) +1
-0+ ip -net "$ns1" link set address 00:11:22:00:01:02 devns1eth2 +
(quoted diff) +1
-0+ ip -net "$ns2" link set address 00:11:22:00:02:01 devns2eth1
(quoted diff) +1
-0+ ip -net "$ns2" link set address 00:11:22:00:02:02 devns2eth2
(quoted diff) +1
-0+ ip -net "$ns2" link set address 00:11:22:00:02:03 devns2eth3 +
(quoted diff) +1
-0+ ip -net "$ns3" link set address 00:11:22:00:03:11 devns3eth1
Quoted 9 lines
Quoted 6 lines
(quoted diff) +1
-0+ ip -net "$ns3" link set address 00:11:22:00:03:11 devns3eth2
(quoted diff) +1
-0+ ip -net "$ns3" link set address 00:11:22:00:03:11 devns3eth3
(quoted diff) +1
-0+ ip -net "$ns3" link set address 00:11:22:00:03:11 devns3br1
The ns3's mac addresses are same, is it a copy-paste error?
No, it is to mimic the switch behaviour.
Quoted 3 lines
BTW, please add the target tree for the patch, e.g.
[PATCH net-next]
Ok.
Quoted 3 lines
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: [email protected]
Re: [PATCH] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses
In reply to Lukasz MajewskiQuoted 40 lines · 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 <[email protected]>--- tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+)tools/testing/selftests/net/hsr/hsr_redbox.sh +15
-0@@ -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 0Signature · 1 line
2.20.1
Quoted 31 lines · Lukasz Majewski
Fixed MAC addresses help with debugging as last four bytes identify the network namespace.
Signed-off-by Lukasz Majewski <[email protected]>--- tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++ 1 file changed, 9 insertions(+)tools/testing/selftests/net/hsr/hsr_ping.sh +9
-0@@ -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 upSignature · 1 line
2.20.1