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: cpsw2g rx issue

Part Number: TDA4VM

hi experts:

                The soc we use is TDA4VM, sdk0703, We use cpsw2g to develop our network requirements. The network has been developed ok and can be pinged normally. However after many power-on and off tests, ping failed occasionally. After comparison and troubleshooting, we found that there is a problem with /proc/interrupt ethernet. Normally, there is a value. When a problem occurs, it is found that the value is 0.After dumping the register, I found that the mac failed. Check the attachment.

ethtool -S interface and cpsw2g reg value data,This is the information captured before. Let’s focus on the ethtool information. There is a lot of register information.

2744.ok.log1106.fail.log 

  • We have done tests here. After turning on the computer, we ran ifconfig eth0 down up and found that the problem disappeared.However, this method is not accepted and the root cause needs to be found and solved formally.

  • Hi, Gaston

    Thanks for your query.

    Hi, experts

    I am the interface of the customer of TI, the issue is urgent, please help to address ASAP. If you need any info, please let me know.

    Regards

    Zekun

  • Any updates here?

    Regards

    Zekun

  • HI Zekun 

    Are you using RTOS sdk or Linux ?

    Regards
    Diwakar

  • In the entire system, we use mcu10, mcu20, mcu30 and the linux side. SDK 0703 cpsw2g was developed on the linux side.

  • Hi,

    Are you using the IET MAC for your network? The register you have highlighted is used only for IET.

    Regards,
    Tanmay

  • After debugging, I found that IET MAC is not used, so the mac fail register does not seem to be a problem.

  • Hi,

    Lets take this from the beginning. Can you clarify the following things:

    • Whats the occurrence rate of the issue?
    • Do you see any difference in the boot logs for the pass and fail case.
    • Can you elaborate further on what is the issue with "/proc/interrupts"?
    • Do you have any VLAN configuration on the CPSW2G interface? If yes, how are they done? with a script post boot or by using systemd-networkd?

    Regards,
    Tanmay

  • Hi Tanmay:

    • Whats the occurrence rate of the issue?

                The probability of occurrence is uncertain. When doing power-on/off tests, sometimes it happens once a few hundred times, sometimes it happens thousands of times, and there are still times it happens more than 10,000 times.

             

    • Do you see any difference in the boot logs for the pass and fail case.

              I added debug to the slave_open callback function of the ifconfig corresponding code and found that the process is the same and no errors occurred. However, there is one thing that is a bit strange. I found that it will happen whether it can ping ok or when it fails. Probe twice, the first time it will display am65-cpsw-nuss 46000000.ethernet: Failed to request tx dma channel -517.

    • Can you elaborate further on what is the issue with "/proc/interrupts"?

                Screenshot of cat/proc/interrupt. The above is when the ping is successful. When the problem occurs below, by comparison, you can see that the ethernet was not interrupted when the problem occurred.

               

    • Do you have any VLAN configuration on the CPSW2G interface? If yes, how are they done? with a script post boot or by using systemd-networkd?

                    After we removed the vlan configuration, we found that the problem still existed, so it had nothing to do with the vlan configuration.

  • Hi,

    Probe twice, the first time it will display am65-cpsw-nuss 46000000.ethernet: Failed to request tx dma channel -517.

    This is fine. Some DMA resource is not available at the time of first probe, so the probe is being defered and being run the second time. "517" is the error code for EPROBE_DEFER. This is normal and is not a point of concern if its being observed in both pass and fail case.

    Can you try to include the following patch : https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_net_2D00_ti_2D00_am65_2D00_cpsw_2D00_nuss_2D00_Enable_2D00_RX_2D00_IRQ_2D00_during_2D00_ndo_2D00_open_2D00_.patch

    And see if the issue is resolved.

    Regards,
    Tanmay

  • Hi Tanmay:

                    I looked at the patch and found that the code that needs to be added to this patch is included by default in sdk0703. The flag rx_irq_disabled is included by default in the common structure.

                    

  • Hi,

    Sorry, it was not with the tag for 7.3 version. It might have been added while releasing hence the confusion.

    So it seems that you are receiving nothing on the rx side. Can you get the CPSW statistic by using "ethtool -S eth0" in both pass and fail case. We can see if there are any additional drops observed during the issue.

    Regards,
    Tanmay

  • hello :

                        ping ok:

                         NIC statistics:
    p0_rx_good_frames: 647
    p0_rx_broadcast_frames: 108
    p0_rx_multicast_frames: 239
    p0_rx_crc_errors: 0
    p0_rx_oversized_frames: 0
    p0_rx_undersized_frames: 0
    p0_ale_drop: 0
    p0_ale_overrun_drop: 0
    p0_rx_octets: 430265
    p0_tx_good_frames: 201
    p0_tx_broadcast_frames: 11
    p0_tx_multicast_frames: 24
    p0_tx_octets: 22378
    p0_tx_64B_frames: 118
    p0_tx_65_to_127B_frames: 390
    p0_tx_128_to_255B_frames: 60
    p0_tx_256_to_511B_frames: 18
    p0_tx_512_to_1023B_frames: 3
    p0_tx_1024B_frames: 259
    p0_net_octets: 452643
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0
    p0_ale_rate_limit_drop: 0
    p0_ale_vid_ingress_drop: 0
    p0_ale_da_eq_sa_drop: 0
    p0_ale_block_drop: 0
    p0_ale_secure_drop: 0
    p0_ale_auth_drop: 0
    p0_ale_unknown_ucast: 0
    p0_ale_unknown_ucast_bytes: 0
    p0_ale_unknown_mcast: 0
    p0_ale_unknown_mcast_bytes: 0
    p0_ale_unknown_bcast: 0
    p0_ale_unknown_bcast_bytes: 0
    p0_ale_pol_match: 0
    p0_ale_pol_match_red: 0
    p0_ale_pol_match_yellow: 0
    p0_ale_mcast_sa_drop: 0
    p0_ale_dual_vlan_drop: 0
    p0_ale_len_err_drop: 0
    p0_ale_ip_next_hdr_drop: 0
    p0_ale_ipv4_frag_drop: 0
    p0_tx_mem_protect_err: 0
    p0_tx_pri0: 0
    p0_tx_pri1: 0
    p0_tx_pri2: 0
    p0_tx_pri3: 0
    p0_tx_pri4: 0
    p0_tx_pri5: 0
    p0_tx_pri6: 0
    p0_tx_pri7: 0
    p0_tx_pri0_bcnt: 0
    p0_tx_pri1_bcnt: 0
    p0_tx_pri2_bcnt: 0
    p0_tx_pri3_bcnt: 0
    p0_tx_pri4_bcnt: 0
    p0_tx_pri5_bcnt: 0
    p0_tx_pri6_bcnt: 0
    p0_tx_pri7_bcnt: 0
    p0_tx_pri0_drop: 0
    p0_tx_pri1_drop: 0
    p0_tx_pri2_drop: 0
    p0_tx_pri3_drop: 0
    p0_tx_pri4_drop: 0
    p0_tx_pri5_drop: 0
    p0_tx_pri6_drop: 0
    p0_tx_pri7_drop: 0
    p0_tx_pri0_drop_bcnt: 0
    p0_tx_pri1_drop_bcnt: 0
    p0_tx_pri2_drop_bcnt: 0
    p0_tx_pri3_drop_bcnt: 0
    p0_tx_pri4_drop_bcnt: 0
    p0_tx_pri5_drop_bcnt: 0
    p0_tx_pri6_drop_bcnt: 0
    p0_tx_pri7_drop_bcnt: 0
    rx_good_frames: 224
    rx_broadcast_frames: 11
    rx_multicast_frames: 46
    rx_pause_frames: 0
    rx_crc_errors: 0
    rx_align_code_errors: 0
    rx_oversized_frames: 0
    rx_jabber_frames: 0
    rx_undersized_frames: 0
    rx_fragments: 0
    ale_drop: 23
    ale_overrun_drop: 0
    rx_octets: 26402
    tx_good_frames: 647
    tx_broadcast_frames: 108
    tx_multicast_frames: 239
    tx_pause_frames: 0
    tx_deferred_frames: 0
    tx_collision_frames: 0
    tx_single_coll_frames: 0
    tx_mult_coll_frames: 0
    tx_excessive_collisions: 0
    tx_late_collisions: 0
    rx_ipg_error: 0
    tx_carrier_sense_errors: 0
    tx_octets: 430265
    tx_64B_frames: 119
    tx_65_to_127B_frames: 392
    tx_128_to_255B_frames: 80
    tx_256_to_511B_frames: 18
    tx_512_to_1023B_frames: 3
    tx_1024B_frames: 259
    net_octets: 456667
    rx_bottom_fifo_drop: 0
    rx_port_mask_drop: 23
    rx_top_fifo_drop: 0
    ale_rate_limit_drop: 0
    ale_vid_ingress_drop: 0
    ale_da_eq_sa_drop: 0
    ale_block_drop: 0
    ale_secure_drop: 0
    ale_auth_drop: 0
    ale_unknown_ucast: 167
    ale_unknown_ucast_bytes: 18096
    ale_unknown_mcast: 46
    ale_unknown_mcast_bytes: 7152
    ale_unknown_bcast: 11
    ale_unknown_bcast_bytes: 1154
    ale_pol_match: 0
    ale_pol_match_red: 0
    ale_pol_match_yellow: 0
    ale_mcast_sa_drop: 0
    ale_dual_vlan_drop: 0
    ale_len_err_drop: 0
    ale_ip_next_hdr_drop: 0
    ale_ipv4_frag_drop: 0
    iet_rx_assembly_err: 0
    iet_rx_assembly_ok: 0
    iet_rx_smd_err: 0
    iet_rx_frag: 0
    iet_tx_hold: 0
    iet_tx_frag: 0
    tx_mem_protect_err: 0
    tx_pri0: 647
    tx_pri1: 0
    tx_pri2: 0
    tx_pri3: 0
    tx_pri4: 0
    tx_pri5: 0
    tx_pri6: 0
    tx_pri7: 0
    tx_pri0_bcnt: 430265
    tx_pri1_bcnt: 0
    tx_pri2_bcnt: 0
    tx_pri3_bcnt: 0
    tx_pri4_bcnt: 0
    tx_pri5_bcnt: 0
    tx_pri6_bcnt: 0
    tx_pri7_bcnt: 0
    tx_pri0_drop: 0
    tx_pri1_drop: 0
    tx_pri2_drop: 0
    tx_pri3_drop: 0
    tx_pri4_drop: 0
    tx_pri5_drop: 0
    tx_pri6_drop: 0
    tx_pri7_drop: 0
    tx_pri0_drop_bcnt: 0
    tx_pri1_drop_bcnt: 0
    tx_pri2_drop_bcnt: 0
    tx_pri3_drop_bcnt: 0
    tx_pri4_drop_bcnt: 0
    tx_pri5_drop_bcnt: 0
    tx_pri6_drop_bcnt: 0
    tx_pri7_drop_bcnt: 0

    ping fail:

    NIC statistics:
    p0_rx_good_frames: 86705
    p0_rx_broadcast_frames: 50617
    p0_rx_multicast_frames: 36088
    p0_rx_crc_errors: 0
    p0_rx_oversized_frames: 0
    p0_rx_undersized_frames: 0
    p0_ale_drop: 0
    p0_ale_overrun_drop: 0
    p0_rx_octets: 7638884
    p0_tx_good_frames: 0
    p0_tx_broadcast_frames: 0
    p0_tx_multicast_frames: 0
    p0_tx_octets: 0
    p0_tx_64B_frames: 50623
    p0_tx_65_to_127B_frames: 36037
    p0_tx_128_to_255B_frames: 33
    p0_tx_256_to_511B_frames: 12
    p0_tx_512_to_1023B_frames: 0
    p0_tx_1024B_frames: 0
    p0_net_octets: 7638884
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0
    p0_ale_rate_limit_drop: 0
    p0_ale_vid_ingress_drop: 48
    p0_ale_da_eq_sa_drop: 0
    p0_ale_block_drop: 0
    p0_ale_secure_drop: 0
    p0_ale_auth_drop: 0
    p0_ale_unknown_ucast: 0
    p0_ale_unknown_ucast_bytes: 0
    p0_ale_unknown_mcast: 0
    p0_ale_unknown_mcast_bytes: 0
    p0_ale_unknown_bcast: 0
    p0_ale_unknown_bcast_bytes: 0
    p0_ale_pol_match: 0
    p0_ale_pol_match_red: 0
    p0_ale_pol_match_yellow: 0
    p0_ale_mcast_sa_drop: 0
    p0_ale_dual_vlan_drop: 0
    p0_ale_len_err_drop: 0
    p0_ale_ip_next_hdr_drop: 0
    p0_ale_ipv4_frag_drop: 0
    p0_tx_mem_protect_err: 0
    p0_tx_pri0: 0
    p0_tx_pri1: 0
    p0_tx_pri2: 0
    p0_tx_pri3: 0
    p0_tx_pri4: 0
    p0_tx_pri5: 0
    p0_tx_pri6: 0
    p0_tx_pri7: 0
    p0_tx_pri0_bcnt: 0
    p0_tx_pri1_bcnt: 0
    p0_tx_pri2_bcnt: 0
    p0_tx_pri3_bcnt: 0
    p0_tx_pri4_bcnt: 0
    p0_tx_pri5_bcnt: 0
    p0_tx_pri6_bcnt: 0
    p0_tx_pri7_bcnt: 0
    p0_tx_pri0_drop: 0
    p0_tx_pri1_drop: 0
    p0_tx_pri2_drop: 0
    p0_tx_pri3_drop: 0
    p0_tx_pri4_drop: 0
    p0_tx_pri5_drop: 0
    p0_tx_pri6_drop: 0
    p0_tx_pri7_drop: 0
    p0_tx_pri0_drop_bcnt: 0
    p0_tx_pri1_drop_bcnt: 0
    p0_tx_pri2_drop_bcnt: 0
    p0_tx_pri3_drop_bcnt: 0
    p0_tx_pri4_drop_bcnt: 0
    p0_tx_pri5_drop_bcnt: 0
    p0_tx_pri6_drop_bcnt: 0
    p0_tx_pri7_drop_bcnt: 0
    rx_good_frames: 1883
    rx_broadcast_frames: 76
    rx_multicast_frames: 1800
    rx_pause_frames: 0
    rx_crc_errors: 0
    rx_align_code_errors: 0
    rx_oversized_frames: 0
    rx_jabber_frames: 0
    rx_undersized_frames: 0
    rx_fragments: 0
    ale_drop: 1883
    ale_overrun_drop: 0
    rx_octets: 407043
    tx_good_frames: 86705
    tx_broadcast_frames: 50617
    tx_multicast_frames: 36088
    tx_pause_frames: 0
    tx_deferred_frames: 0
    tx_collision_frames: 0
    tx_single_coll_frames: 0
    tx_mult_coll_frames: 0
    tx_excessive_collisions: 0
    tx_late_collisions: 0
    rx_ipg_error: 0
    tx_carrier_sense_errors: 0
    tx_octets: 7639076
    tx_64B_frames: 50683
    tx_65_to_127B_frames: 36043
    tx_128_to_255B_frames: 1847
    tx_256_to_511B_frames: 15
    tx_512_to_1023B_frames: 0
    tx_1024B_frames: 0
    net_octets: 8046119
    rx_bottom_fifo_drop: 0
    rx_port_mask_drop: 1883
    rx_top_fifo_drop: 0
    ale_rate_limit_drop: 0
    ale_vid_ingress_drop: 1883
    ale_da_eq_sa_drop: 0
    ale_block_drop: 0
    ale_secure_drop: 0
    ale_auth_drop: 0
    ale_unknown_ucast: 7
    ale_unknown_ucast_bytes: 472
    ale_unknown_mcast: 1800
    ale_unknown_mcast_bytes: 388531
    ale_unknown_bcast: 76
    ale_unknown_bcast_bytes: 18040
    ale_pol_match: 0
    ale_pol_match_red: 0
    ale_pol_match_yellow: 0
    ale_mcast_sa_drop: 0
    ale_dual_vlan_drop: 0
    ale_len_err_drop: 0
    ale_ip_next_hdr_drop: 0
    ale_ipv4_frag_drop: 0
    iet_rx_assembly_err: 0
    iet_rx_assembly_ok: 0
    iet_rx_smd_err: 0
    iet_rx_frag: 0
    iet_tx_hold: 0
    iet_tx_frag: 0
    tx_mem_protect_err: 0
    tx_pri0: 86705
    tx_pri1: 0
    tx_pri2: 0
    tx_pri3: 0
    tx_pri4: 0
    tx_pri5: 0
    tx_pri6: 0
    tx_pri7: 0
    tx_pri0_bcnt: 7638884
    tx_pri1_bcnt: 0
    tx_pri2_bcnt: 0
    tx_pri3_bcnt: 0
    tx_pri4_bcnt: 0
    tx_pri5_bcnt: 0
    tx_pri6_bcnt: 0
    tx_pri7_bcnt: 0
    tx_pri0_drop: 0
    tx_pri1_drop: 0
    tx_pri2_drop: 0
    tx_pri3_drop: 0
    tx_pri4_drop: 0
    tx_pri5_drop: 0
    tx_pri6_drop: 0
    tx_pri7_drop: 0
    tx_pri0_drop_bcnt: 0
    tx_pri1_drop_bcnt: 0
    tx_pri2_drop_bcnt: 0
    tx_pri3_drop_bcnt: 0
    tx_pri4_drop_bcnt: 0
    tx_pri5_drop_bcnt: 0
    tx_pri6_drop_bcnt: 0
    tx_pri7_drop_bcnt: 0

  • Hi,

     After we removed the vlan configuration, we found that the problem still existed, so it had nothing to do with the vlan configuration.

    From the logs in the fail case, it seems that all the received good packets (rx_good_frames = 1883) were dropped by ale due to no port being available for that vid (ale_vid_ingress_drop). Please  see the explanation for this statistic at section "12.2.2.4.6.19.1.19 ALE VLAN Ingress Check Drop" of the TRM. You can get TRM from here : https://www.ti.com/lit/zip/spruil1

    Can you see if there are any differences between the ALE table in the pass and the fail case. Use the command "switch-config -I eth0 -d" to dump the ALE table.

    Regards,
    Tanmay

  • hello :

                          The problem is still reoccurring, please wait patiently. The rx of p1 corresponds to the tx of p0, right?

  • Hi,

    The rx of p1 corresponds to the tx of p0, right?

    That is correct, so any ingress packet from external world to switch will take the following path:

    Rx at p1 ---> Pass/filter through ALE -----> Tx at p0 to host core

    Regards,
    Tanmay

  • hello :

                         There is indeed a gap in the ale table. You can check ok and fail. I compared it and found that when the ping was successful, I found that there was this entry. When the ping failed, there was no such entry.
    0: type: vlan, vid = 0, untag_force = 0x3, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3

                       ok log:

                         

    root@iDC-mid:~# switch-config --ndev eth0 -d
    0   : type: vlan , vid = 0, untag_force = 0x3, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    1   : type: ucast, addr = 44:46:4c:51:01:03, ucast_type = persistant, port_num = 0x0, Secure
    2   : type: mcast, vid = 0, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x3
    3   : type: vlan , vid = 4, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    4   : type: vlan , vid = 2, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    5   : type: vlan , vid = 6, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    6   : type: vlan , vid = 3, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    7   : type: vlan , vid = 5, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    8   : type: mcast, addr = 01:80:c2:00:00:21, mcast_state = f, no super, port_mask = 0x1
    9   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    10  : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = f, no super, port_mask = 0x1
    11  : type: mcast, addr = 01:80:c2:00:00:03, mcast_state = f, no super, port_mask = 0x1
    12  : type: mcast, addr = 01:80:c2:00:00:0e, mcast_state = f, no super, port_mask = 0x1
    13  : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    14  : type: mcast, addr = 33:33:ff:51:01:03, mcast_state = f, no super, port_mask = 0x1
    15  : type: mcast, addr = 01:00:5e:00:00:fc, mcast_state = f, no super, port_mask = 0x1
    16  : type: mcast, addr = 33:33:00:01:00:03, mcast_state = f, no super, port_mask = 0x1
    
    root@iDC-mid:~# print_ale
    ---------------------------------------------
    -------CPSWnG ALE TABLE----------------------
    ---------------------------------------------
    ---------------------------------------------
     Entry 0 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 300
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 1 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 400
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 2 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 401
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 3 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 402
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 4 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 403
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 5 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 404
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 6 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 405
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 7 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 406
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 8 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 407
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 9 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1ff
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = ffff ffffffff
    ---------------------------------------------
     Entry 10 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 0
    BLOCK            = 0
    SECURE           = 1
    TOUCH            = 0
    AGEABLE          = 0
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = 70ff 761d92c2
    Completed analysis of 1024 ALE entries
    

                         fail log:

                         

    root@iDC-mid:~# switch-config --ndev eth0 -d
    K3 cpsw dump version (1) len(6328)
    ALE table dump ents(64):
    0   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    1   : type: ucast, addr = 44:46:4c:51:01:03, ucast_type = persistant, port_num = 0x0, Secure
    2   : type: mcast, vid = 0, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x3
    3   : type: vlan , vid = 4, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    4   : type: vlan , vid = 2, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    5   : type: vlan , vid = 6, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    6   : type: vlan , vid = 3, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    7   : type: vlan , vid = 5, untag_force = 0x0, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3
    8   : type: mcast, addr = 01:80:c2:00:00:21, mcast_state = f, no super, port_mask = 0x1
    9   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    10  : type: mcast, addr = 33:33:ff:51:01:03, mcast_state = f, no super, port_mask = 0x1
    11  : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = f, no super, port_mask = 0x1
    12  : type: mcast, addr = 01:80:c2:00:00:03, mcast_state = f, no super, port_mask = 0x1
    13  : type: mcast, addr = 01:80:c2:00:00:0e, mcast_state = f, no super, port_mask = 0x1
    14  : type: mcast, addr = 01:00:5e:00:00:fc, mcast_state = f, no super, port_mask = 0x1
    15  : type: mcast, addr = 33:33:00:01:00:03, mcast_state = f, no super, port_mask = 0x1
    
    root@iDC-mid:~# print_ale
    ---------------------------------------------
    -------CPSWnG ALE TABLE----------------------
    ---------------------------------------------
    ---------------------------------------------
     Entry 0 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 300
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 1 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 400
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 2 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 401
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 3 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 402
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 4 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 403
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 5 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 404
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 6 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 405
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 7 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 406
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 8 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 407
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 511
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 9 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1ff
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = ffff ffffffff
    ---------------------------------------------
     Entry 10 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 0
    BLOCK            = 0
    SECURE           = 1
    TOUCH            = 0
    AGEABLE          = 0
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = 70ff 761d92c2
    Completed analysis of 1024 ALE entries
    

  • Hi Tanmay:

                      Regarding the rx issue, I adjusted the timing of adding ale table and am doing testing. Regarding the issue of adding vlan configuration and displaying error messages in dmesg, please help me take a look.
    am65-cpsw-nuss 46000000.ethernet: Adding vlan 100 to vlan filter
    [5.121994] am65-cpsw-nuss 46000000.ethernet: get: wrong ale fld id 2
    [5.128743] am65-cpsw-nuss 46000000.ethernet: get: wrong ale fld id 1

  • Hi,

    Sorry for the delay on this,

    0: type: vlan, vid = 0, untag_force = 0x3, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x3

    So this entry is being missed in the issue case. This is default entry added by driver. It is weird that this is missing.

    It is added by the function "cpsw_ale_add_vlan()" (defined in drivers/net/ethernet/ti/cpsw_ale.c). Can you add prints in this function and see when is it getting called for "vid 0". Please use "WARN_ON(1)" to print the call stack when it is called.

    Regards,
    Tanmay

  • Hi:

        After testing, it was found that cpsw_ale_add_vlan was executed when the problem occurred, and the parameters were ok. Regarding the failure to add ale table, I adjusted the timing of ale table and it improved. Regarding am65-cpsw-nuss 46000000.ethernet: get : wrong ale fld id 2. Can this kind of error be solved with crude comments, because it will not affect the use of functions?

  • Hi,

    Can this kind of error be solved with crude comments, because it will not affect the use of functions?

    I will look into this.

    Regarding the failure to add ale table, I adjusted the timing of ale table and it improved.

    What changes did you make? And is the issue not observed or it became less reprocucable?

    Regards,
    Tanmay 

  • Hi:

          What changes did you make? And is the issue not observed or it became less reprocucable?

           After testing, it is more stable to place the add ale table slightly behind. In addition to this, a lock is also added. After testing, the problem did not appear.

  • Hi, Tanmay

    [5.121994] am65-cpsw-nuss 46000000.ethernet: get: wrong ale fld id 2
    [5.128743] am65-cpsw-nuss 46000000.ethernet: get: wrong ale fld id 1

    Does this kind of log will cause any potential bugs if current application is not affected?

    Regards

    Zekun

  • Hi Zekun,

    Sorry for the delayed response.

    This is caused by initial get calls to ALE when it is not populated. Hence it will not cause any bugs.

    Regards,
    Tanmay

  • Thanks, Tanmay, close it.

    Regards

    Zekun