2403837_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2403837_en-US

2403837_en-US

MAC Forwarding Configuration on the SJA1110 switch

Hello,


I would like to set up an L2 Forwarding rule in the SJA1110 switch where:

- The traffic is received at Port 7,

source MAC address: 00:00:01:00:00:10,

destination MAC address: 00:00:01:00:00:50,

VLAN ID 10,

PCP 7;

- The traffic is then forwarded to the Port 5 of SJA1110 switch for output.


When the SJA1110 detects that a packet with destination MAC address 00:00:01:00:00:50 is injected from the port 7, it only needs to forward this packet out through the port 5; the gating on the port 5 can be controlled simply by identifying the PCP in the packet.
 
However, I am not sure how to configure it on the SJA1110 SDK for S32DS.
I have tried to set a new L2 Lookup Table entry as follows:
GuilhermeS32G_0-1786505280150.png


Also have tried to set VING_MIRR and VEGR_MIRR in the VLAN Lookup Table:

GuilhermeS32G_1-1786505432456.png

Also have set the MIRR_PORT to 5 in General Parameters:

GuilhermeS32G_2-1786505483489.png

In the MAC Configuration Table, I have set the ING_MIRR of port 7 to 1 and the EGR_MIRR of port 5 to 1.

But it did not work.

What is the correct approach for this configuration?


Thank you very much for your support,


Guilherme

Re: MAC Forwarding Configuration on the SJA1110 switch

Hello @GuilhermeS32G ,

Yes, that is correct. Since the SJA1110 SDK field does not accept the colon-separated MAC address format, the MAC address 00:00:01:00:00:50 can be entered either as a decimal or hexadecimal value, i.e. 16777296 or 0x1000050.

Leading zeros do not change the value, so 0x1000050 is equivalent to 0x000001000050.

Regarding the MASK field, the mask defines which parts of the L2 Lookup key are used for matching and which parts are treated as wildcards. A bit set to 1 means that the corresponding bit is compared, while a bit set to 0 means that the corresponding bit is ignored.

So if you want to match only the MAC address and ignore IOTAG, VLANID and SRCPORT, your proposed mask is correct:

  • MASK = 0x0000FFFFFFFFFFFF0

In this case, the L2 Lookup entry would match the configured MACADDR regardless of the ingress port and VLAN ID.

For your original use case, where you want to match:

  • VLANID = 10
  • MACADDR = 00:00:01:00:00:50
  • SRCPORT = 7

but not explicitly match IOTAG, the recommended mask would be:

  • MASK = 0x0FFFFFFFFFFFFFFFF

Then the L2 Lookup entry should be configured as follows:

  • VLANID = 10
  • MACADDR = 0x000001000050
  • SRCPORT = 7
  • DESTPORTS = port 5
  • MASK = 0x0FFFFFFFFFFFFFFFF

Please also remember that the final destination vector from the L2 Lookup Table is still filtered by the L2 Forwarding Table. Therefore, for traffic received on port 7, port 5 must also be allowed in the corresponding REACH_PORT configuration.

Best regards,

Pavel

Re: MAC Forwarding Configuration on the SJA1110 switch

Hello @PavelL ,


Thanks for your support once again.


Just to clarify, in the SJA1110 SDK for S32DS, the field MACADDR supports inputs as integer or hexadecimal, I am not able to type: 00:00:01:00:00:50 due to the colons. So I may convert it to the integer format: 16777296 or use as input 0x1000050. Is that correct?


Then, for the MASK field, it seems to support integer format with a value between 0 and  36893488147419103231 (0x1FFFFFFFFFFFFFFFF in hexadecimal).

But I did not understand very well these MASK wildcards.

If I want to match the MAC Address only, but not source port and VLAN ID should I use:
MASK = 0x0000FFFFFFFFFFFF0 ?


And what about if I want to match to VLAN ID 10 and source port 7?


Best regards,

Guilherme


Re: MAC Forwarding Configuration on the SJA1110 switch

Hello @GuilhermeS32G ,

Please refer to the relevant chapters in UM11107 and AN12925 for the detailed description of the SJA1110 forwarding tables. The used field names follow the terminology used in the S32DS SJA1110 SDK configuration.
 

For this use case, the correct approach is to use the L2 Lookup Table, not the mirroring functionality.

If the requirement is to forward frames received on port 7 with destination MAC address 00:00:01:00:00:50 and VLAN ID 10 to port 5, you should create an L2 Lookup Table entry matching this destination MAC address, VLAN ID and source port and set DESTPORTS to port 5.

Please also check the following points:

1. The MACADDR field should correspond to the MAC address you want to match. For your example, this should be the destination MAC address 00:00:01:00:00:50, not a different value.

2. Please review the MASK field. The mask defines which parts of the L2 lookup key are compared. For an exact match, the mask must not wildcard the relevant fields such as MAC address, VLAN ID and source port. Based on UM11107, MASK is composed of the following bits:

PavelL_0-1786518971668.png

3. Please check the L2 Forwarding Table as well. The destination vector from the L2 Lookup Table is still filtered by the REACH_PORT field for the ingress port. Therefore, for traffic received on port 7, port 5 must be allowed in the corresponding L2 Forwarding Table entry.

4. The mirroring-related settings such as VING_MIRR, VEGR_MIRR, MIRR_PORT, ING_MIRR and EGR_MIRR are not required for normal forwarding. These settings are intended for traffic mirroring, not for defining the standard forwarding path.

Regarding PCP 7, if the frame is already VLAN-tagged with PCP 7, the forwarding decision can still be made by the L2 Lookup Table. The PCP can then be used by the egress priority/scheduling/gating configuration on port 5. It does not need to be part of the L2 Lookup rule unless you specifically want to classify traffic based on PCP as well.

Best regards,

Pavel

タグ(1)
評価なし
バージョン履歴
最終更新日:
木曜日
更新者: