This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Does CPSW9g support IP and MAC filtering?

Part Number: TDA4VM

Use sdk8.6

We want to implement the whitelist function on the switch.

Only the specified IP and MAC addresses can access the switch, and other devices that are not in the whitelist cannot access the switch.

Does CPSW9g support IP and MAC filtering? How to configure?

 

  • Hi,

    Does CPSW9g support IP and MAC filtering? How to configure?

    Yes, CPSW support IP & MAC filtering.

    Please refer to below E2E, we have supported this one of customer using CPSW9G with EthFw model.
    e2e.ti.com/.../faq-how-to-realise-the-whilelist-based-on-the-bind-of-mac-and-ip

    Best Regards,
    Sudheer

  • I'm using SDK8.6 with a PC connected to Port 3

    The expected effects are:
    Only PC 172.20.0.2AA :BB:CC:DD:EE:01 can ping A72

    The actual effect is:
    A PC can ping A72 through any IP address or MAC address

    What's wrong with my configuration?

        const uint8_t mac_add[6] = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0x01};
    
        polInArgs.policerMatch.policerMatchEnMask = 0;    
        polInArgs.policerMatch.policerMatchEnMask |= CPSW_ALE_POLICER_MATCH_PORT;
        polInArgs.policerMatch.portNum = 0;
        polInArgs.policerMatch.portIsTrunk = false;
    
        polInArgs.policerMatch.policerMatchEnMask |= CPSW_ALE_POLICER_MATCH_MACDST;    
        polInArgs.policerMatch.dstMacAddrInfo.portNum = 3;
        polInArgs.policerMatch.dstMacAddrInfo.addr.vlanId = 0;
        EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mac_add[0]);
    
        polInArgs.policerMatch.policerMatchEnMask |= CPSW_ALE_POLICER_MATCH_IPDST;
        polInArgs.policerMatch.dstIpInfo.ipAddrType = CPSW_ALE_IPADDR_CLASSIFIER_IPV4;
        polInArgs.policerMatch.dstIpInfo.ipv4Info.ipv4Addr[0] = 172;
        polInArgs.policerMatch.dstIpInfo.ipv4Info.ipv4Addr[1] = 20;
        polInArgs.policerMatch.dstIpInfo.ipv4Info.ipv4Addr[2] = 0;
        polInArgs.policerMatch.dstIpInfo.ipv4Info.ipv4Addr[3] = 2;
        polInArgs.policerMatch.dstIpInfo.ipv4Info.numLSBIgnoreBits = 0;
    
        polInArgs.threadIdEn = 0;
        polInArgs.threadId = 0;
        polInArgs.peakRateInBitsPerSec = 0;
        polInArgs.commitRateInBitsPerSec = 0;
    
        ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
        status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
        if (status != ENET_SOK)
        {
            appLogPrintf("Enet_ioctl() failed CPSW_ALE_IOCTL_SET_POLICER: %d\n", status);
        }

  • Hi,

    In your use case you are not adding the policer for the client A72 thread.


    Can you please refer to FAQ [How to configure ALE for A72].

    Also, In above E2E I have mentioned to comment the allocation of resources to clients. Default EthFw will allocate MAC, UDMA channels to clients and add a policer with MAC address based.

    So, if any packet seen at ALE with client MAC address will reach to A72.

    Best Regard,
    Sudheer

  • I have added policer to the A72 thread.
    I still don't understand how to disable ALE and Policer registration under the CpswProxyServer_registerMacHandlerCb API.
    Is the case ENET_IOCTL_REGISTER_DSTMAC_RX_FLOW in cpsw.c?

  • Hi,

    I still don't understand how to disable ALE and Policer registration under the CpswProxyServer_registerMacHandlerCb API.

    You have to modify EthFw for this, such that it will not register any policers when client is attaching to it.
    Because whitelisting is not supported directly from SDK and EthFw acting as server when client is registered it will register policer with client's MAC address.

    You can comment out "EnetAppUtils_regDstMacRxFlow" from CpswProxyServer_registerMacHandlerCb function so, no default policer will be created when client is attaching to server.

    Best Regards,
    Sudheer

  • I commented out EnetAppUtils_regDstMacRxFlow, but A72 cannot be pinged from any ip.
    I use WireShark on the PC to view icmp packets. I find that the request of A72 is sent and the response is sent from the PC. However, A72 does not receive the response packet from the PC.

  • Hi,

    is the MAC Address in response is same as policer registered? If not packets will not be routed and will be dropped.
    Can you please share ALE dump, and the Wireshark log.

    For dumping ALE table, Please refer to FAQ [How to get statistics of CPSW] and integrate the patch with Ethfw and enable "ENABLE_ALE_POLICER_DUMP" and "ENABLE_ALE_DUMP".

    Best Regards,
    Sudheer

  • ALE_Wireshark_log.zip

    The path "app_remoteswitchcfg_server/mcu_2_0/main.c" needs to be modified in "vision_apps/utils/ethfw/src/app_ethfw_freertos.c" to print the ALE log.
    The wireshark packet and ALE log are attached.

  • HI,

    From Logs I could see multiple ALE entries are available and policers as well.

    You need to disable all ALE entries related to VLAN and all and enable only required entries.

    You can comment out "EthHwInterVlan_setOpenPrms" and configure ALE as VLAN disable.
    Also configure Drop read, yellow marked frames from ALE POLICERCTRL register.

    Best Regards,
    Sudheer

  • Are whitelists and vlans mutually exclusive? I need both whitelisting and VLAN. Can't I implement both?

  • Hi,

    Are whitelists and vlans mutually exclusive? I need both whitelisting and VLAN. Can't I implement both?

    Packets will be forwarded based on VLAN as well.

    You can configure ALE and policer as required, H/W acts as per configuration.

    Please refer to TRM about ALE forwarding process, Egress operation, Ingress operation for better understanding of ALE functionality.
    As per your requirement you can add ALE & Policer entries.

    Best Regards,
    Sudheer

  • What is TRM? Is it convenient to send me a link?

  • Hi,

    What is TRM? Is it convenient to send me a link?

    TRM Is Technical Reference Manual, which is available in SOC Page on ti.com
    TRM Link: https://www.ti.com/lit/zip/spruil1

    Best Regards,
    Sudheer

  • Check the ALE log,
    Port 0 of A72: alePolicyMatch has a count, but not alePolicyMatchRed or alePolicyMatchYellow.
    A72 For PCS connected through Port3, do packets that do not match the discarded packets count in port0 or Port3?

    Read the CPSW_ALE_POLICECONTROL register with a value of 0:
    # devmem2 0x4603e124
    /dev/mem opened.
    Memory mapped at address 0xffffbbdea000.
    Read at address 0x4603E124 (0xffffbbdea124): 0x00000000

    ping test:
    When the PC uses the ip address and mac address configured in policer and A72 uses the wireshark to ping the PC, the PC can view the ICMP reply from the PC, but the A72 cannot capture the ICMP reply from the PC using the tcpdump, as shown in the previous wireshark packet upload.
    If the PC does not use the ip address and mac address configured in policer and A72 uses wireshark to ping the PC, the PC can use Wireshark to capture the packet and A72 cannot capture the PC's ICMP reply using tcpdump.

    According to the analysis of the above test results:
    RedHit or YellowHit does not count, what is wrong with my configuration Policer?
    If a match is matched, how do I configure whether to discard it? Where in the code is the CPSW_ALE_POLICECONTROL register configured?

    20240611
    
    [MCU2_0]   5128.100922 s:      0: Address: ffffffffffff, Member:1ff Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]   5128.100984 s:  RAW:[7fc 1000ff
    [MCU2_0]   5128.101031 s: ff ffffffff]
    [MCU2_0]   5128.101120 s:      1: Address: 70ff761d92c2, Port: 000 Se=1 Bl=0 TOUCH=0 AGE=0 TRUNK=0
    [MCU2_0]   5128.101185 s:  RAW:[1 100070
    [MCU2_0]   5128.101233 s: ff 761d92c2]
    [MCU2_0]   5128.101294 s:      2: IPv4: Address: 172:20:00:02, IGNBITS:0
    [MCU2_0]   5128.101347 s:  RAW:[1 a00000
    [MCU2_0]   5128.101396 s: 00 ac140002]
    [MCU2_0]   5128.101480 s:      3: Address: aabbccddee01, Port: 003 Se=0 Bl=0 TOUCH=0 AGE=0 TRUNK=0
    [MCU2_0]   5128.101541 s:  RAW:[c 1000aa
    [MCU2_0]   5128.101589 s: bb ccddee01]
    [MCU2_0]   5128.101666 s:      4: Address: 01005e000001, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]   5128.101836 s:  RAW:[ec 100001
    [MCU2_0]   5128.101891 s: 00 5e000001]
    [MCU2_0]   5128.101972 s:      5: Address: 0180c2000000, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]   5128.102033 s:  RAW:[ec 100001
    [MCU2_0]   5128.102084 s: 80 c2000000]
    [MCU2_0]   5128.102162 s:      6: Address: 0180c2000003, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]   5128.102221 s:  RAW:[ec 100001
    [MCU2_0]   5128.102270 s: 80 c2000003]
    [MCU2_0]   5128.102347 s:      7: Address: 0180c200000e, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]   5128.102406 s:  RAW:[ec 100001
    [MCU2_0]   5128.102452 s: 80 c200000e]
    [MCU2_0]   5128.102548 s:     16: Address: aabbccddee05, Port: 005 Se=0 Bl=0 TOUCH=1 AGE=1 TRUNK=0
    [MCU2_0]   5128.102609 s:  RAW:[14 d003aa
    [MCU2_0]   5128.102658 s: bb ccddee05]
    [MCU2_0]   5128.104220 s:
    [MCU2_0]   5128.104272 s: 1015 Free Entries
    [MCU2_0]   5128.104321 s:
    [MCU2_0]   5128.104375 s:     0: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]   5128.104424 s:     0: POLICER_DST_MAC,ALE Index: 3
    [MCU2_0]   5128.104471 s:     0: POLICER_DST_IP,ALE Index: 2
    [MCU2_0]   5128.104514 s:     0: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.104571 s:     0: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.104630 s:     1: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]   5128.104675 s:     1: POLICER_DST_MAC,ALE Index: 3
    [MCU2_0]   5128.104820 s:     1: POLICER_DST_IP,ALE Index: 2
    [MCU2_0]   5128.104868 s:     1: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.104925 s:     1: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.104983 s:     2: POLICER_DST_MAC,ALE Index: 4
    [MCU2_0]   5128.105031 s:     2: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.105086 s:     2: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.105143 s:     3: POLICER_DST_MAC,ALE Index: 5
    [MCU2_0]   5128.105190 s:     3: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.105243 s:     3: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.105295 s:     4: POLICER_DST_MAC,ALE Index: 6
    [MCU2_0]   5128.105340 s:     4: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.105390 s:     4: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.105442 s:     5: POLICER_DST_MAC,ALE Index: 7
    [MCU2_0]   5128.105486 s:     5: POLICER_THREAD,THREAD ID:0
    [MCU2_0]   5128.105537 s:     5: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]   5128.105909 s:
    [MCU2_0]   5128.105960 s: 90 Free Entries
    [MCU2_0]   5128.106195 s:
    [MCU2_0]  Port 0 Statistics
    [MCU2_0]   5128.106237 s: -----------------------------------------
    [MCU2_0]   5128.106272 s:   rxGoodFrames            = 47
    [MCU2_0]   5128.106311 s:   rxBcastFrames           = 30
    [MCU2_0]   5128.106348 s:   aleDrop                 = 30
    [MCU2_0]   5128.106385 s:   rxOctets                = 3654
    [MCU2_0]   5128.106420 s:   txGoodFrames            = 49
    [MCU2_0]   5128.106455 s:   txOctets                = 4426
    [MCU2_0]   5128.106489 s:   octetsFrames64          = 30
    [MCU2_0]   5128.106524 s:   octetsFrames65to127     = 66
    [MCU2_0]   5128.106560 s:   netOctets               = 8080
    [MCU2_0]   5128.106596 s:   portMaskDrop            = 30
    [MCU2_0]   5128.106632 s:   aleUnknownUcast         = 3
    [MCU2_0]   5128.106668 s:   aleUnknownUcastBcnt     = 306
    [MCU2_0]   5128.106811 s:   aleUnknownBcast         = 10
    [MCU2_0]   5128.106857 s:   aleUnknownBcastBcnt     = 640
    [MCU2_0]   5128.106894 s:   alePolicyMatch          = 17
    [MCU2_0]   5128.106933 s:   txPri[0]                = 49
    [MCU2_0]   5128.106973 s:   txPriBcnt[0]            = 4230
    [MCU2_0]   5128.107100 s:
    [MCU2_0]  External Port 3 Statistics
    [MCU2_0]   5128.107318 s: -----------------------------------------
    [MCU2_0]   5128.107353 s:   rxGoodFrames            = 2386
    [MCU2_0]   5128.107388 s:   rxBcastFrames           = 74
    [MCU2_0]   5128.107423 s:   rxMcastFrames           = 2263
    [MCU2_0]   5128.107460 s:   aleDrop                 = 2337
    [MCU2_0]   5128.107494 s:   rxOctets                = 429793
    [MCU2_0]   5128.107530 s:   txGoodFrames            = 17
    [MCU2_0]   5128.107567 s:   txOctets                = 1802
    [MCU2_0]   5128.107603 s:   octetsFrames64          = 214
    [MCU2_0]   5128.107638 s:   octetsFrames65to127     = 940
    [MCU2_0]   5128.107673 s:   octetsFrames128to255    = 1177
    [MCU2_0]   5128.107822 s:   octetsFrames1024        = 72
    [MCU2_0]   5128.107864 s:   netOctets               = 431595
    [MCU2_0]   5128.107901 s:   portMaskDrop            = 2337
    [MCU2_0]   5128.107940 s:   alePolicyMatch          = 26
    [MCU2_0]   5128.107979 s:   txPri[0]                = 17
    [MCU2_0]   5128.108019 s:   txPriBcnt[0]            = 1734
    
    
    
    Check the ALE log,
    Port 0 of A72: alePolicyMatch has a count, but not alePolicyMatchRed or alePolicyMatchYellow.
    A72 For PCS connected through Port3, do packets that do not match the discarded packets count in port0 or Port3?
    
    Read the CPSW_ALE_POLICECONTROL register with a value of 0:
    # devmem2 0x4603e124
    /dev/mem opened.
    Memory mapped at address 0xffffbbdea000.
    Read at address  0x4603E124 (0xffffbbdea124): 0x00000000
    
    ping test:
    When the PC uses the ip address and mac address configured in policer and A72 uses the wireshark to ping the PC, the PC can view the ICMP reply from the PC, but the A72 cannot capture the ICMP reply from the PC using the tcpdump, as shown in the previous wireshark packet upload.
    If the PC does not use the ip address and mac address configured in policer and A72 uses wireshark to ping the PC, the PC can use Wireshark to capture the packet and A72 cannot capture the PC's ICMP reply using tcpdump.
    
    According to the analysis of the above test results:
    RedHit or YellowHit does not count, what is wrong with my configuration Policer?
    If a match is matched, how do I configure whether to discard it? Where in the code is the CPSW_ALE_POLICECONTROL register configured?
    
    

  • Hi,

    If a match is matched, how do I configure whether to discard it? Where in the code is the CPSW_ALE_POLICECONTROL register configured?

    ALE Policer control is configured in below from ethfw init.

    If you have commented "EthHwInterVlan_setOpenPrms", you can update configuration from EthHwInterVlan_setOpenPrms into ethfw init API itself.

    As informed above, If VLAN is enabled then you need VLAN ALE entry with required port mask.
    If VLAN entry not available forwarding rules will be based on unknown VLAN configuration.

    Best Regards,
    Sudheer

  • From Logs I could see multiple ALE entries are available and policers as well.

    I see that RedHit and YellowHit in the ALE log remain 0,
    Does this mean that no rules are hit?As a result, the ip and mac outside the rules can communicate without being filtered and discarded?
    What causes the miss?

  • Hi,

    I see that RedHit and YellowHit in the ALE log remain 0,
    Does this mean that no rules are hit?As a result, the ip and mac outside the rules can communicate without being filtered and discarded?
    What causes the miss?

    If any policer rules has to apply mean packet should be valid not should be ALE Drop.

    If no ALE Drop packet will be marked as either GREEN/YELLOW/RED based on policer.
    IF policer also matches then packet will be GREEN/YELLO based on no.of packets and incoming flow, if not then it will be RED.

    As per my understanding you have not added VLAN entry, so the packet will be ALE Drop.
    This is the reason where you are not receiving the packets to A72.

    Best Regards,
    Sudheer

  • I opened EthHwInterVlan_setOpenPrms,
    Check the CPSW_CONTROL_REG register and find that the current VLAN aware mode is displayed.
    The VLAN 3 entry for Prot3 was added and vlan3 was also configured for dstMacAddrInfo, but there were previous issues.Attached is the current code and ALE log.

    0612_log_code.zip

  • Hi,

    I could not see any packets sent from A72 to Host Port as Host Port Rxpacket is not available.
    Can you add policer with Host Port to forward all packets to Host Port from A72.


    Best Regards,
    Sudheer

  • These 3 lines of code have been added and can be seen in the zip package.
    We understand whether there is a deviation. Now A72 can send packets, but A72 cannot receive packets.

  • Hi,

    Can you provide the reply message from PC captured in wireshark + ALE & polcier dump to check.

    If you are sending the packet with valid ALE Entry and have policer to route to A72 it should reach A72.

    Best Regards,
    Sudheer 

  • The compressed package contains ALE policer Dump information and packet information on the PC and TDA4.
    TDA4 ping PC,You can filter ICMP packets.
    The packet information is 172.20.3.2 aa:bb:cc:dd:ee:01 configured in policer.
    However, no icmp reply was received in tda4_tcpdump.ALEandETHmessage_0614.zip

  • Hi,

    From logs I can see, 
    there is no ALE MAC entry for A72s? So, ping reply from PC will get dropped as there is match of MAC address.

    Ping request from A72's message Destination MAC is there in ALE so, packet sent out on Port-3.





    Ping reply from PC's message Destination MAC is not in ALE (which is A72s MAC). So, Packet may be dropped.

    Also, I could see many ALE entries with different VLANs? is all required for your use-case? If not, remove all and have only required.

    Also, Please go through the TRM for ALE & Policer Ingres/egress operations. 

    Best Regards,
    Sudheer

  • I added the A72's IP&MAC ALE, but the effect didn't change.
    I need to use vlans with these different ids, so I added these vlans.

  • Hi,

    I added the A72's IP&MAC ALE, but the effect didn't change.

    Can you please share the ALE entries added for A72's MAC.
    Also, please check the VLAN configuration of Port which is connected to external PC.
    You need to have the VLAN entry of same with Port mask of external PC connected Port.

    Best Regards,
    Sudheer

  • You can look at lines 45 and 51 of the log,
    aabbccddee01 is the MAC of the PC, connected to port3
    aabbccddee0a is the MAC of A72 and connects to port0
    port0 and port3 are configured with vlan3

    [MCU2_0]  ====== Iteration 124 =====
    [MCU2_0]    633.789082 s:
    [MCU2_0]    633.789165 s:      0: Vlanid: 012c, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0]    633.789233 s:  RAW:[0 212c1f
    [MCU2_0]    633.789281 s: f1 ff0001ff]
    [MCU2_0]    633.789349 s:      1: Vlanid: 0001, UTagged: 3b, Mult: 3b, UMult: 0, Member: 3b
    [MCU2_0]    633.789409 s:  RAW:[0 200103
    [MCU2_0]    633.789458 s: b0 3b00003b]
    [MCU2_0]    633.789519 s:      2: Vlanid: 0191, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0]    633.789583 s:  RAW:[0 21911f
    [MCU2_0]    633.789630 s: f1 ff0001ff]
    [MCU2_0]    633.789696 s:      3: Vlanid: 0195, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0]    633.789759 s:  RAW:[0 21951f
    [MCU2_0]    633.789806 s: f1 ff0001ff]
    [MCU2_0]    633.789871 s:      4: Vlanid: 0196, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0]    633.789933 s:  RAW:[0 21961f
    [MCU2_0]    633.790087 s: f1 ff0001ff]
    [MCU2_0]    633.790168 s:      5: Vlanid: 0197, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0]    633.790233 s:  RAW:[0 21971f
    [MCU2_0]    633.790284 s: f1 ff0001ff]
    [MCU2_0]    633.790372 s:      6: Address: ffffffffffff, Member:1ff Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.790433 s:  RAW:[7fc 1000ff
    [MCU2_0]    633.790482 s: ff ffffffff]
    [MCU2_0]    633.790573 s:      7: Address: 70ff761d92c2, Port: 000 Se=1 Bl=0 TOUCH=0 AGE=0 TRUNK=0
    [MCU2_0]    633.790635 s:  RAW:[1 100070
    [MCU2_0]    633.790684 s: ff 761d92c2]
    [MCU2_0]    633.790748 s:      8: Vlanid: 0002, UTagged: 0, Mult: b, UMult: b, Member: b
    [MCU2_0]    633.790808 s:  RAW:[2 200200
    [MCU2_0]    633.790859 s: b0 0000b00b]
    [MCU2_0]    633.790924 s:      9: Vlanid: 0003, UTagged: 0, Mult: 3b, UMult: 3b, Member: 3b
    [MCU2_0]    633.791089 s:  RAW:[2 200303
    [MCU2_0]    633.791152 s: b0 0003b03b]
    [MCU2_0]    633.791223 s:     10: Vlanid: 0004, UTagged: 0, Mult: b, UMult: b, Member: b
    [MCU2_0]    633.791285 s:  RAW:[2 200400
    [MCU2_0]    633.791333 s: b0 0000b00b]
    [MCU2_0]    633.791398 s:     11: Vlanid: 0005, UTagged: 0, Mult: 2b, UMult: 2b, Member: 2b
    [MCU2_0]    633.791460 s:  RAW:[2 200502
    [MCU2_0]    633.791509 s: b0 0002b02b]
    [MCU2_0]    633.791574 s:     12: Vlanid: 0006, UTagged: 0, Mult: b, UMult: b, Member: b
    [MCU2_0]    633.791634 s:  RAW:[2 200600
    [MCU2_0]    633.791682 s: b0 0000b00b]
    [MCU2_0]    633.791744 s:     13: IPv4: Address: 172:20:03:02, IGNBITS:0
    [MCU2_0]    633.791799 s:  RAW:[1 a00000
    [MCU2_0]    633.791849 s: 00 ac140302]
    [MCU2_0]    633.791946 s:     14: VlanId:003, Address: aabbccddee01, Port: 003 Se=0 Bl=0 TOUCH=0 AGE=0 TRUNK=0
    [MCU2_0]    633.792111 s:  RAW:[c 3003aa
    [MCU2_0]    633.792168 s: bb ccddee01]
    [MCU2_0]    633.792236 s:     15: IPv4: Address: 172:20:03:11, IGNBITS:0
    [MCU2_0]    633.792292 s:  RAW:[1 a00000
    [MCU2_0]    633.792343 s: 00 ac14030b]
    [MCU2_0]    633.792440 s:     16: VlanId:003, Address: aabbccddee0a, Port: 000 Se=0 Bl=0 TOUCH=0 AGE=0 TRUNK=0
    [MCU2_0]    633.792506 s:  RAW:[0 3003aa
    [MCU2_0]    633.792556 s: bb ccddee0a]
    [MCU2_0]    633.792648 s:     17: Address: aabbccddee05, Port: 005 Se=0 Bl=0 TOUCH=1 AGE=1 TRUNK=0
    [MCU2_0]    633.792711 s:  RAW:[14 d003aa
    [MCU2_0]    633.792762 s: bb ccddee05]
    [MCU2_0]    633.792843 s:     18: Address: 01005e000001, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.792904 s:  RAW:[ec 100001
    [MCU2_0]    633.793024 s: 00 5e000001]
    [MCU2_0]    633.793131 s:     19: Address: 0180c2000000, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.793196 s:  RAW:[ec 100001
    [MCU2_0]    633.793248 s: 80 c2000000]
    [MCU2_0]    633.793330 s:     20: Address: 0180c2000003, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.793392 s:  RAW:[ec 100001
    [MCU2_0]    633.793443 s: 80 c2000003]
    [MCU2_0]    633.793524 s:     21: Address: 0180c200000e, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.793585 s:  RAW:[ec 100001
    [MCU2_0]    633.793632 s: 80 c200000e]
    [MCU2_0]    633.793712 s:     22: Address: 0180c2000021, Member:03b Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0]    633.793771 s:  RAW:[ec 100001
    [MCU2_0]    633.793819 s: 80 c2000021]
    [MCU2_0]    633.795345 s:
    [MCU2_0]    633.795400 s: 1001 Free Entries
    [MCU2_0]    633.795444 s:
    [MCU2_0]    633.795495 s:     0: POLICER_VLAN,ALE Index: 8
    [MCU2_0]    633.795544 s:     0: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.795604 s:     0: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.795657 s:     1: POLICER_VLAN,ALE Index: 9
    [MCU2_0]    633.795697 s:     1: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.795748 s:     1: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.795797 s:     2: POLICER_VLAN,ALE Index: 10
    [MCU2_0]    633.795838 s:     2: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.795889 s:     2: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.795937 s:     3: POLICER_VLAN,ALE Index: 11
    [MCU2_0]    633.796073 s:     3: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796139 s:     3: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.796195 s:     4: POLICER_VLAN,ALE Index: 12
    [MCU2_0]    633.796237 s:     4: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796287 s:     4: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.796342 s:     5: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]    633.796384 s:     5: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796432 s:     5: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.796482 s:     6: POLICER_DST_MAC,ALE Index: 14
    [MCU2_0]    633.796523 s:     6: POLICER_DST_IP,ALE Index: 13
    [MCU2_0]    633.796565 s:     6: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796612 s:     6: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.796664 s:     7: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]    633.796707 s:     7: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796756 s:     7: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.796803 s:     8: POLICER_DST_MAC,ALE Index: 16
    [MCU2_0]    633.796843 s:     8: POLICER_DST_IP,ALE Index: 15
    [MCU2_0]    633.796881 s:     8: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.796929 s:     8: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797067 s:     9: POLICER_VLAN,ALE Index: 8
    [MCU2_0]    633.797121 s:     9: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797178 s:     9: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797231 s:    10: POLICER_VLAN,ALE Index: 9
    [MCU2_0]    633.797274 s:    10: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797328 s:    10: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797381 s:    11: POLICER_VLAN,ALE Index: 10
    [MCU2_0]    633.797421 s:    11: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797469 s:    11: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797518 s:    12: POLICER_VLAN,ALE Index: 11
    [MCU2_0]    633.797557 s:    12: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797605 s:    12: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797653 s:    13: POLICER_VLAN,ALE Index: 12
    [MCU2_0]    633.797692 s:    13: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797739 s:    13: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797791 s:    14: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]    633.797832 s:    14: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.797880 s:    14: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.797930 s:    15: POLICER_DST_MAC,ALE Index: 14
    [MCU2_0]    633.798061 s:    15: POLICER_DST_IP,ALE Index: 13
    [MCU2_0]    633.798112 s:    15: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798163 s:    15: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.798218 s:    16: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
    [MCU2_0]    633.798262 s:    16: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798311 s:    16: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.798363 s:    17: POLICER_DST_MAC,ALE Index: 16
    [MCU2_0]    633.798403 s:    17: POLICER_DST_IP,ALE Index: 15
    [MCU2_0]    633.798443 s:    17: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798491 s:    17: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.798541 s:    18: POLICER_DST_MAC,ALE Index: 18
    [MCU2_0]    633.798582 s:    18: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798630 s:    18: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.798678 s:    19: POLICER_DST_MAC,ALE Index: 19
    [MCU2_0]    633.798719 s:    19: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798767 s:    19: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.798815 s:    20: POLICER_DST_MAC,ALE Index: 20
    [MCU2_0]    633.798856 s:    20: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.798904 s:    20: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.799019 s:    21: POLICER_DST_MAC,ALE Index: 21
    [MCU2_0]    633.799087 s:    21: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.799144 s:    21: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.799198 s:    22: POLICER_DST_MAC,ALE Index: 22
    [MCU2_0]    633.799240 s:    22: POLICER_THREAD,THREAD ID:0
    [MCU2_0]    633.799289 s:    22: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0]    633.799520 s:
    [MCU2_0]    633.799547 s: 73 Free Entries
    [MCU2_0]    633.799647 s:
    [MCU2_0]  Port 0 Statistics
    [MCU2_0]    633.799678 s: -----------------------------------------
    [MCU2_0]    633.799710 s:   rxGoodFrames            = 345
    [MCU2_0]    633.799745 s:   rxBcastFrames           = 66
    [MCU2_0]    633.799779 s:   aleDrop                 = 292
    [MCU2_0]    633.799814 s:   rxOctets                = 50358
    [MCU2_0]    633.799848 s:   txGoodFrames            = 3000
    [MCU2_0]    633.799882 s:   txBcastFrames           = 10
    [MCU2_0]    633.799915 s:   txMcastFrames           = 2990
    [MCU2_0]    633.799948 s:   txOctets                = 2644878
    [MCU2_0]    633.800083 s:   octetsFrames64          = 6
    [MCU2_0]    633.800118 s:   octetsFrames65to127     = 1617
    [MCU2_0]    633.800152 s:   octetsFrames256to511    = 70
    [MCU2_0]    633.800213 s:   octetsFrames1024        = 1652
    [MCU2_0]    633.800252 s:   netOctets               = 2695236
    [MCU2_0]    633.800287 s:   portMaskDrop            = 292
    [MCU2_0]    633.800348 s:   aleUnknownBcast         = 25
    [MCU2_0]    633.800388 s:   aleUnknownBcastBcnt     = 7948
    [MCU2_0]    633.800422 s:   alePolicyMatch          = 345
    [MCU2_0]    633.800460 s:   txPri[0]                = 3016
    [MCU2_0]    633.800500 s:   txPriBcnt[0]            = 2654926
    [MCU2_0]    633.800542 s:   txPriDrop[0]            = 53291
    [MCU2_0]    633.800583 s:   txPriDropBcnt[0]        = 47021095
    [MCU2_0]    633.800706 s:
    [MCU2_0]  External Port 1 Statistics
    [MCU2_0]    633.800748 s: -----------------------------------------
    [MCU2_0]    633.800863 s:
    [MCU2_0]  External Port 3 Statistics
    [MCU2_0]    633.800904 s: -----------------------------------------
    [MCU2_0]    633.800936 s:   rxGoodFrames            = 67
    [MCU2_0]    633.801083 s:   rxMcastFrames           = 40
    [MCU2_0]    633.801135 s:   aleDrop                 = 8
    [MCU2_0]    633.801172 s:   rxOctets                = 11398
    [MCU2_0]    633.801208 s:   txGoodFrames            = 15714
    [MCU2_0]    633.801242 s:   txBcastFrames           = 24
    [MCU2_0]    633.801278 s:   txMcastFrames           = 15669
    [MCU2_0]    633.801315 s:   txOctets                = 13850734
    [MCU2_0]    633.801354 s:   octetsFrames64          = 12
    [MCU2_0]    633.801390 s:   octetsFrames65to127     = 7054
    [MCU2_0]    633.801425 s:   octetsFrames128to255    = 40
    [MCU2_0]    633.801459 s:   octetsFrames256to511    = 18
    [MCU2_0]    633.801496 s:   octetsFrames1024        = 8657
    [MCU2_0]    633.801531 s:   netOctets               = 13862132
    [MCU2_0]    633.801569 s:   portMaskDrop            = 8
    [MCU2_0]    633.801602 s:   rxTopOfFifoDrop         = 59
    [MCU2_0]    633.801638 s:   aleUnknownUcast         = 2
    [MCU2_0]    633.801672 s:   aleUnknownUcastBcnt     = 128
    [MCU2_0]    633.801707 s:   aleUnknownMcast         = 1
    [MCU2_0]    633.801740 s:   aleUnknownMcastBcnt     = 221
    [MCU2_0]    633.801776 s:   alePolicyMatch          = 53
    [MCU2_0]    633.801810 s:   txPri[0]                = 15714
    [MCU2_0]    633.801854 s:   txPriBcnt[0]            = 13850734
    [MCU2_0]    633.802062 s:
    [MCU2_0]  External Port 5 Statistics
    [MCU2_0]    633.802120 s: -----------------------------------------
    [MCU2_0]    633.802154 s:   rxGoodFrames            = 56226
    [MCU2_0]    633.802191 s:   rxMcastFrames           = 56226
    [MCU2_0]    633.802230 s:   aleDrop                 = 9
    [MCU2_0]    633.802264 s:   rxOctets                = 49666572
    [MCU2_0]    633.802302 s:   txGoodFrames            = 60
    [MCU2_0]    633.802335 s:   txBcastFrames           = 52
    [MCU2_0]    633.802369 s:   txMcastFrames           = 8
    [MCU2_0]    633.802405 s:   txOctets                = 17845
    [MCU2_0]    633.802443 s:   octetsFrames64          = 6
    [MCU2_0]    633.802477 s:   octetsFrames65to127     = 25164
    [MCU2_0]    633.802513 s:   octetsFrames128to255    = 9
    [MCU2_0]    633.802547 s:   octetsFrames256to511    = 45
    [MCU2_0]    633.802582 s:   octetsFrames1024        = 31062
    [MCU2_0]    633.802618 s:   netOctets               = 49684417
    [MCU2_0]    633.802654 s:   portMaskDrop            = 9
    [MCU2_0]    633.802688 s:   rxTopOfFifoDrop         = 53211
    [MCU2_0]    633.802722 s:   aleVidIngressDrop       = 9
    [MCU2_0]    633.802757 s:   aleUnknownMcast         = 10
    [MCU2_0]    633.802792 s:   aleUnknownMcastBcnt     = 12332
    [MCU2_0]    633.802827 s:   alePolicyMatch          = 56217
    [MCU2_0]    633.802863 s:   txPri[0]                = 60
    [MCU2_0]    633.802903 s:   txPriBcnt[0]            = 17845

  • Hi,

    From ALE Table & CPSW statistics.
    It looks Host Port received the packets & sent to A72 as policer side Hit is set.


    If you still not receiving the packets to A72 then it could be VLAN relates Issue.
    If VLAN also configured fine, then Ping should work.

    Best Regards,
    Sudheer

  • Do not comment EnetAppUtils_regDstMacRxFlow(),And set bit1 of register 0x0C03E008 to 1,Can implement ip and mac filtering.
    How do I modify register 0x0C03E008 in code?

  • Hi,

    And set bit1 of register 0x0C03E008 to 1,Can implement ip and mac filtering.
    How do I modify register 0x0C03E008 in code?

    It will be set from ALE configuration.
    If you set bit1 in 0x0C03E008, ALE will not learn the MAC addresses. S/W has provide the ALE table update.
    As per that description, destination to be Multicast address and SRC Address of packet to be added in ALE.
    Also, in case if multicast address super bit has to be set, it indicates that this address can be received in port state other than forwarding.

    We haven't explored much with above option.

    Best Regards,
    Sudheer

  • If you set bit1 in 0x0C03E008, ALE will not learn the MAC addresses. S/W has provide the ALE table update.

    My goal is to only communicate with ALE internal devices, not with ALE external devices. 

    Also, in case if multicast address super bit has to be set, it indicates that this address can be received in port state other than forwarding.

     I don't understand the "multicast address super bit", as through experimentation, even after configuring 0x0C03E008 bit1, the A72 can still receive multicast packets.

  • Hi,

    If you set bit1 in 0x0C03E008, ALE will not learn the MAC addresses. S/W has provide the ALE table update.

    My goal is to only communicate with ALE internal devices, not with ALE external devices.

    I mean here, ALE will not auto learn external MAC addresses and forward the packets to the learned Port.

    Also, in case if multicast address super bit has to be set, it indicates that this address can be received in port state other than forwarding.

     I don't understand the "multicast address super bit", as through experimentation, even after configuring 0x0C03E008 bit1, the A72 can still receive multicast packets.

    Yes, it will receive the Multicast Destination Addresses packets, if there is an ALE entry for that MAC Addresses.
    If you haven't registered any ALE entries then it will not.

    Best Regards,
    Sudheer