Disable flooding on LS1028A (Networking)

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

Disable flooding on LS1028A (Networking)

812 Views
Jesus_Pacheco
Contributor I

Hello,

I'm using a custom board, this board has two LS1028A, and each processor has its modules separate. One of these modules is the Ethernet module, each Ethernet module has its switch (VSC8514), these switches are cross-connected by Port 0. The problem is that if one of the ports receives a packet for example, by Port 1, the switch or the processor resend this packet through all the other ports, creating a storm; is this the flooding behavior?.

So my question is, Is the processor or the switch doing that?, Could I disable that behavior?

Thanks

Tags (1)
0 Kudos
4 Replies

790 Views
yipingwang
NXP TechSupport
NXP TechSupport

In compliance with IEEE 802.1D and 802.1Q, if a unicast frame is received whose DMAC(+VID) is not already registered within the switch forwarding database (FDB), that frame is flooded to all ports except the ingress port. So it's the switch doing that.

You can change this behaviour. Depends what you want the switch to do with a frame that isn't in the FDB. Do you want to pass that frame to one of the local (internal) LS1028A CPU ports, or dropped entirely ?

In the switch, you're looking for register ES_ANA_ANA_FLOODING0. This controls the flooding behaviour for priority 0 frames. This is at:
base address: 1_FC00_0000h
ANA offset: 28_0000h
ANA:ANA: 89A0h
Flooding0: 0048h

0x1fc2889e8 : ES_ANA_ANA_FLOODING0

0x1fc2889e8 : Priority 0 PGID mask: bits 17-12 are FLD_UNICAST. This is the port group ID mask to which you want these frames to be sent.

This register is 0x3BFFC by default, so FLD_UNICAST=0x3B. PGID 0x3B is at 0x1fc288400 + (0x3B * 4) = 0x1fc2884ec.
By default, this is 0x7F = all switch ports. The PGID registers contain bitmasks for the switch ports.

By changing FLD_UNICAST to 0x4, this points at PGID 4.

base address: 1_FC00_0000h
ANA offset: 28_0000h
ANA:PGID: 8400h
PGID4: 10h (4 * 4)

0x1fc288410: PGID4

This register defaults to "0x00000010" = bitmask pointing to switch port 4, one of the internal switch<->CPU ports.

So you could try writing 0x1fc2889e8 to be 0x04FFC. This should prevent the flooding behaviour you see, and 'flood' unknown unicast frames only to the (internal) switch port 4. Note that this doesn't change the behaviour of Multicast or Broadcast frames.

Alternatively, you could tell it to not flood unicast frames by using PGID=6.
PGID=6 is at 0x1fc288418, and is 0x0 by default, so by changing 0x1fc2889e8 to be 0x06FFC, only unicast frames which are already in the FDB are forwarded. Any other unicast frame is dropped.

0 Kudos

782 Views
Jesus_Pacheco
Contributor I

Thanks for the information, I already tried it, but I still having problems with the frames storm.

Is there a way to disable the "flooding" behavior to all the frames type (unicast, multicast, and broadcast)?

I have been trying writing 0x0 in PGID[80:86] but when I do that I cannot send or receive any frame to the receive ring (RB0BAR0-RB0BAR1)  Do I missing an extra configuration?

I want when a frame arrives in Port-n, read the frame in my receive ring and don't forward it to any other Port. Is that possible?

I know that this is not a normal operation but to give you more context I'm cross-connecting all the ports between both switches, Port0Switch1-Port0Switch2, Port2Switch1-Port2Switch2, and Port3Switch1-Port3Switch2. So, I would like to avoid the storms caused for that cross-connection.

0 Kudos

773 Views
yipingwang
NXP TechSupport
NXP TechSupport

> Is there a way to disable the "flooding" behavior to all the frames type (unicast, multicast, and broadcast)?
Yes. 0x1fc2889e8 : ES_ANA_ANA_FLOODING0 has fields for these traffic types on priority 0. I'm assuming you are not using VLAN, and so all frames are priority zero.

> I want when a frame arrives in Port-n, read the frame in my receive ring and don't forward it to any other Port. Is that possible?
Yes. You want an incoming frame not in the FDB to be sent to CPU, and not to any other port. Therefore you want this frame to be sent to CPU port of the switch only.
FLOODING0 fields point to a PGID entry, and I don't see a PGID entry which points to CPU port only, so let's pick a PGID entry index to use.
PGID Index 8 is currently set to zero. So by setting this port map entry to 0x40 (CPU port only), and pointing FLOODING0 entries to this PGID index, we should flood to CPU port only.

Please try writing 0x1fc2889e8 to 0x00008208 and PGID 8: 0x1fc288420 to 0x00000040 .

btw apologies, I had previously indicated PGID Index 4 should be OK for this, but this masks in port 4 only rather than the CPU port.

In my testing with the settings here, it worked OK. I sent broadcast L2 frames (ARPs), which were 'flooded' only to the CPU port, and not to a connected external switch port.

Please try this out and let us know how you get on.

> I have been trying writing 0x0 in PGID[80:86]
These relate to mappings based on SMAC, rather than DMAC (so you can't tell whether this is a bcast, mcast, or unicast frame). A setting of zero in a PGID mask will mask out _all_ destination ports for traffic ingressing on port 0, so any frames will be dropped. See 16.4.3.1.16 Port Group Identifiers (ES_ANA_PGID_PGID0 - ES_ANA_PGID_PGID86) description of PGID field.

0 Kudos

768 Views
Jesus_Pacheco
Contributor I

>Please try writing 0x1fc2889e8 to 0x00008208 and PGID 8: 0x1fc288420 to 0x00000040.
I tried it but doing that I'm not able to send ARPs from the CPU through Port1 to my computer. I send it but looks like the frame is not going out, I cannot see it in my computer. And vice versa, if I send an ARP frame from my computer, I cannot see it in the CPU (RB0BAR0-RB0BAR1).

 

>I'm assuming you are not using VLAN, and so all frames are priority zero.
Yes, I'm not using VLAN.

 

Just FYI this is a table with the specific ports connection that I'm trying to use.

Ports Connection
Port 0 LS1028A (1)Port 0 LS1028A (2)
Port 1 LS1028A (1)PC
Port 1 LS1028A (2)PC
Port 2 LS1028A (1)Port 2 LS1028A (2)
Port 3 LS1028A (1)Port 3 LS1028A (2)

 

>btw apologies, I had previously indicated PGID Index 4 should be OK for this, but this masks in port 4 only rather than the CPU port.
No worries, thanks for your support and time, actually I read all the default values in the PGIDs registers in my LS1028A and this is the list:
0: 1
1: 2
2: 4
3: 8
4: 10
5: 20
6: 40
7: 3F
8: 3F
9: 3F
10: 3F
11: 3F
12: 3F
13: 3F
14: 3F
15: 3F
16: 3F
17: 3F
18: 3F
19: 3F
20: 3F
21: 3F
22: 3F
23: 3F
24: 3F
25: 3F
26: 3F
27: 3F
28: 3F
29: 3F
30: 3F
31: 3F
32: 3F
33: 3F
34: 3F
35: 3F
36: 3F
37: 3F
38: 3F
39: 3F
40: 3F
41: 3F
42: 3F
43: 3F
44: 3F
45: 3F
46: 3F
47: 3F
48: 3F
49: 3F
50: 3F
51: 3F
52: 3F
53: 3F
54: 3F
55: 3F
56: 3F
57: 3F
58: 3F
59: 3F
60: 3F
61: 3F
62: 3F
63: 3F
64: 3F
65: 3F
66: 3F
67: 3F
68: 3F
69: 3F
70: 3F
71: 3F
72: 3F
73: 3F
74: 3F
75: 3F
76: 3F
77: 3F
78: 3F
79: 3F
80: 3E
81: 3D
82: 3B
83: 37
84: 2F
85: 1F
86: 3F

0 Kudos