when enable RSTP,unplug 1 port the packets will loss always

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

when enable RSTP,unplug 1 port the packets will loss always

Jump to solution
6,076 Views
xu
Contributor II

Hi:

I have 2 board with a LS1028, LSDKUG_Rev20.04_290520

A swp3 ----TEST center port 1

B swp3-----test center port 2

A swp0---- B swp0

A swp1-----B swp1

1.enable rstp on board A,board B,use https://github.com/mstpd/mstpd to enable the rstp

2.send the traffic 900Mbps/s from TEST center port 1<------>test center port 2 ,the B swp0 is the root, B swp1 will discard by rstp.

3.then I unplug the B swp0,then I found the traffic will be down to 0,all packets will be dropped on A  swp3,shows drop_tail on A swp3 and B swp3 when use the "ethtool -S swp3"

when I send the traffic with 4 Mbps/s dont have this issue.

Is there some issues with the flow control on the swp ports or some other bugs?can you tell me the solution for this scenario

Best regards

0 Kudos
1 Solution
5,942 Views
yipingwang
NXP TechSupport
NXP TechSupport

I think this is relate to the RTP package lost trapping to CPU port. This is very likely with PTP packages lost when heavy network bandwidth.

 Could you try the kernel:

Could you test the latest stable kernel

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/

plus this patch:

https://patchwork.kernel.org/project/netdevbpf/patch/20210929115226.1383925-1-vladimir.oltean@nxp.co...

and run extra commands:

ip link set eno2 down

echo "ocelot-8021q" > /sys/devices/platform/soc/1f0000000.pcie/pci0000:00/0000:00:00.2/net/eno2/dsa/tagging# We are running this command due to on folder named /sys/class/eno2/dsa/tagging

ifconfig eno2 up

ip link set swp0 up

ip link set swp1 up

ip link set swp2 up

ip link add Bridge up type bridge vlan_filtering 1 ip link set swp0 master Bridge ip link set swp1 master Bridge ip link set swp2 master Bridge

 

and try your stp commands?

View solution in original post

9 Replies
6,061 Views
yipingwang
NXP TechSupport
NXP TechSupport

Can you share your logs? This is not clear to me what have you done.

Could you also try the Real-time edge v2.1 for the same steps and share the result.

0 Kudos
6,055 Views
xu
Contributor II

hi yiping

 thanks for your help.

here is my top:

1.create a bridge on both board A,B,add all ports to this bridge,enable rstp on both board,board B is the root ,the traffic will be passed through the swp0, the swp1 is discarded by rstp

2.board A's swp0 connect to board B's swp0

3.board A's swp1 connect to board B's swp1

4.board A's swp3 connect to test center's port0

5.board B's swp3 connect to test center's port1

6.first send the traffic from test center's port0 to port1, and from port1 to port0,all traffic can be received.

7.unplug the board B's swp0,we except that traffic will be passed through the swp1.but all traffic is drop tail on the both board's swp3.

d1.jpg is the normal traffic

d2.jpg is when I unplug the board B's swp0

d3.jpg is the drop tail packets when I use ethtool -S swp3 on both board

 

best regards

0 Kudos
6,019 Views
yipingwang
NXP TechSupport
NXP TechSupport

",enable rstp on both board,"

Can you guild me how the config the RSTP software which is not included in the sdk.

 

"board B is the root "

How to set the root node?

 

Can't get steps on the readme file.

6,015 Views
xu
Contributor II

1.create a bridge named Bridge,add all ports to this bridge,command is:

ip link set dev swp0 up
ip link set dev swp1 up
ip link set dev swp2 up
ip link set dev swp3 up
ip link add Bridge up type bridge vlan_filtering 1
ip link set swp0 master Bridge
ip link set swp1 master Bridge
ip link set swp2 master Bridge
ip link set swp3 master Bridge
ip link set eno0 master Bridge

2.download mstpd from https://github.com/mstpd/mstpd

$(NETDIR)/mstpd is where downloaded mstpd folder,bellow is the makefile:

cd $(NETDIR)/mstpd && \
./autogen.sh && \
./configure CC=aarch64-linux-gnu-gcc --host=aarch64-linux-gnu --prefix=/usr/local/ && \
$(MAKE) clean && $(MAKE) && $(MAKE) install DESTDIR=$(DESTDIR)

then we can install the mstpctl,mstpd,mstp_restart in the /sbin/ folder

3.enable the stp in the both board,command is:

brctl stp Bridge on

mstpctl addbridge Bridge

4.then you can type these commands to get the rstp info and port's role and so on:

mstpctl showbridge Bridge

mstpctl showportdetail Bridge swp0

5."board B is the root ",no need to config the root,when board A connected to board B,there  will be a board to be a root role,just enable the stp use the mstpctl tool is enough.

6.then follow the top I write on the above 

regards

0 Kudos
5,964 Views
yipingwang
NXP TechSupport
NXP TechSupport

Since LSDK20.04 is too old. I tested on the Real-time Edge 2.1 version kernel. The Rstp can recover properly when unplug the cable swp0.

root@LS1028ARDB-Ubuntu:~# mstpctl showbridge Bridge Bridge CIST info

  enabled         yes

  bridge id       8.000.CA:6F:D6:DB:68:DC

  designated root 8.000.9E:43:DA:D3:1D:42

  regional root   8.000.CA:6F:D6:DB:68:DC

  root port       swp0 (#1)

  path cost     20000      internal path cost   0

  max age       20         bridge max age       20

  forward delay 15         bridge forward delay 15

  tx hold count 6          max hops             20

  hello time    2          ageing time          300

  force protocol version     rstp

  time since topology change 302

  topology change count      1

  topology change            no

  topology change port       None

  last topology change port  swp0

 

When unplug the swp0 cable, you can see:

64 bytes from 192.168.0.11: icmp_seq=481 ttl=64 time=0.228 ms

64 bytes from 192.168.0.11: icmp_seq=482 ttl=64 time=0.220 ms

64 bytes from 192.168.0.11: icmp_seq=483 ttl=64 time=0.229 ms

 

 

64 bytes from 192.168.0.11: icmp_seq=489 ttl=64 time=0.447 ms

64 bytes from 192.168.0.11: icmp_seq=490 ttl=64 time=0.245 ms

64 bytes from 192.168.0.11: icmp_seq=491 ttl=64 time=0.219 ms

 

There are some frames lost, then recover.

 

I suggest your update the kernel. You can refer:

https://github.com/real-time-edge-sw/real-time-edge-linux

0 Kudos
5,952 Views
xu
Contributor II

 Hi yipingwang

      thank you for your reply,this issue will be reproduced while have more than 100Mbps/s I think.

      do you have some test tools?can you try it while send the traffic more than 800Mbps/s?

regards

 

0 Kudos
5,943 Views
yipingwang
NXP TechSupport
NXP TechSupport

I think this is relate to the RTP package lost trapping to CPU port. This is very likely with PTP packages lost when heavy network bandwidth.

 Could you try the kernel:

Could you test the latest stable kernel

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/

plus this patch:

https://patchwork.kernel.org/project/netdevbpf/patch/20210929115226.1383925-1-vladimir.oltean@nxp.co...

and run extra commands:

ip link set eno2 down

echo "ocelot-8021q" > /sys/devices/platform/soc/1f0000000.pcie/pci0000:00/0000:00:00.2/net/eno2/dsa/tagging# We are running this command due to on folder named /sys/class/eno2/dsa/tagging

ifconfig eno2 up

ip link set swp0 up

ip link set swp1 up

ip link set swp2 up

ip link add Bridge up type bridge vlan_filtering 1 ip link set swp0 master Bridge ip link set swp1 master Bridge ip link set swp2 master Bridge

 

and try your stp commands?

5,937 Views
xu
Contributor II

   

    thank you for the answer,we will have a try.

best regards

0 Kudos
5,841 Views
yipingwang
NXP TechSupport
NXP TechSupport

I tested on the Real-time Edge 2.1 version kernel. two ls1028ardb boards links two cables. The Rstp can recover properly when unplug one of the cable .

root@LS1028ARDB-Ubuntu:~# mstpctl showbridge Bridge Bridge CIST info

  enabled         yes

  bridge id       8.000.CA:6F:D6:DB:68:DC

  designated root 8.000.9E:43:DA:D3:1D:42

  regional root   8.000.CA:6F:D6:DB:68:DC

  root port       swp0 (#1)

  path cost     20000      internal path cost   0

  max age       20         bridge max age       20

  forward delay 15         bridge forward delay 15

  tx hold count 6          max hops             20

  hello time    2          ageing time          300

  force protocol version     rstp

  time since topology change 302

  topology change count      1

  topology change            no

  topology change port       None

  last topology change port  swp0

 

When unplug the swp0 cable, you can see:

64 bytes from 192.168.0.11: icmp_seq=481 ttl=64 time=0.228 ms

64 bytes from 192.168.0.11: icmp_seq=482 ttl=64 time=0.220 ms

64 bytes from 192.168.0.11: icmp_seq=483 ttl=64 time=0.229 ms

 

 

64 bytes from 192.168.0.11: icmp_seq=489 ttl=64 time=0.447 ms

64 bytes from 192.168.0.11: icmp_seq=490 ttl=64 time=0.245 ms

64 bytes from 192.168.0.11: icmp_seq=491 ttl=64 time=0.219 ms

 

There are some frames lost, then recover. total about 6 seconds.

 

0 Kudos