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.

How to limit rate?

Other Parts Discussed in Thread: TDA4VM

Hi,

The link to the previous question:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1295305/how-to-realise-the-whilelist-based-on-the-bind-of-mac-and-ip

After policer 0 and policer 1 are added, only packets that satisfy policer 0 are sent to linux (A72). However, rate limiting via pir and cir did not work as well as expected. The value of pir is 20000000 (20Mbps) and cir is 10000000(10Mbps). 

[MCU2_0]  18774.190795 s: Function:CpswProxyServer_switch_tool_list_policer_helper,HostId:0,Handle:a32069fc,CoreKey:38acb7e6
[MCU2_0]  18774.190859 s: src/mod/cpsw_ale.c line[3805]:
[MCU2_0]  18774.190909 s: src/mod/cpsw_ale.c line[3915]:      0: Vlanid: 000a, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.190958 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 200a1f
[MCU2_0]  18774.190990 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191032 s: src/mod/cpsw_ale.c line[3915]:      1: Vlanid: 0190, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191078 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21901f
[MCU2_0]  18774.191109 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191149 s: src/mod/cpsw_ale.c line[3915]:      2: Vlanid: 0191, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191194 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21911f
[MCU2_0]  18774.191225 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191265 s: src/mod/cpsw_ale.c line[3915]:      3: Vlanid: 0193, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191337 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21931f
[MCU2_0]  18774.191373 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191415 s: src/mod/cpsw_ale.c line[3915]:      4: Vlanid: 0194, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191461 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21941f
[MCU2_0]  18774.191492 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191531 s: src/mod/cpsw_ale.c line[3915]:      5: Vlanid: 0195, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191576 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21951f
[MCU2_0]  18774.191607 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191647 s: src/mod/cpsw_ale.c line[3915]:      6: Vlanid: 0196, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191692 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21961f
[MCU2_0]  18774.191723 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191763 s: src/mod/cpsw_ale.c line[3915]:      7: Vlanid: 0197, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
[MCU2_0]  18774.191808 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 21971f
[MCU2_0]  18774.191839 s: src/mod/cpsw_ale.c line[4056]: f1 ff0001ff]
[MCU2_0]  18774.191887 s: src/mod/cpsw_ale.c line[3849]:      8: Address: ffffffffffff, Member:1ff Su=0 FWDSTLVL=0 IGNMBITS=0
[MCU2_0]  18774.191933 s: src/mod/cpsw_ale.c line[4051]:  RAW:[c 1000ff
[MCU2_0]  18774.191963 s: src/mod/cpsw_ale.c line[4056]: ff ffffffff]
[MCU2_0]  18774.192013 s: src/mod/cpsw_ale.c line[3870]:      9: Address: 48495241a19a, Port: 000 Se=1 Bl=0 TOUCH=0 AGE=0 TRUNK=0
[MCU2_0]  18774.192060 s: src/mod/cpsw_ale.c line[4051]:  RAW:[1 100048
[MCU2_0]  18774.192091 s: src/mod/cpsw_ale.c line[4056]: 49 5241a19a]
[MCU2_0]  18774.192138 s: src/mod/cpsw_ale.c line[3870]:     10: Address: 484952411081, Port: 003 Se=0 Bl=0 TOUCH=0 AGE=0 TRUNK=0
[MCU2_0]  18774.192184 s: src/mod/cpsw_ale.c line[4051]:  RAW:[c 100048
[MCU2_0]  18774.192215 s: src/mod/cpsw_ale.c line[4056]: 49 52411081]
[MCU2_0]  18774.192261 s: src/mod/cpsw_ale.c line[3870]:     11: Address: 48495241a199, Port: 000 Se=0 Bl=0 TOUCH=0 AGE=0 TRUNK=0
[MCU2_0]  18774.192326 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 100048
[MCU2_0]  18774.192359 s: src/mod/cpsw_ale.c line[4056]: 49 5241a199]
[MCU2_0]  18774.192400 s: src/mod/cpsw_ale.c line[3939]:     12: IPv4: Address: 192:168:04:129, IGNBITS:0
[MCU2_0]  18774.192441 s: src/mod/cpsw_ale.c line[4051]:  RAW:[1 a00000
[MCU2_0]  18774.192473 s: src/mod/cpsw_ale.c line[4056]: 00 c0a80481]
[MCU2_0]  18774.192513 s: src/mod/cpsw_ale.c line[3939]:     13: IPv4: Address: 192:168:04:153, IGNBITS:0
[MCU2_0]  18774.192553 s: src/mod/cpsw_ale.c line[4051]:  RAW:[1 a00000
[MCU2_0]  18774.192584 s: src/mod/cpsw_ale.c line[4056]: 00 c0a80499]
[MCU2_0]  18774.192625 s: src/mod/cpsw_ale.c line[3915]:     14: Vlanid: 0004, UTagged: 0, Mult: 9, UMult: 9, Member: 9
[MCU2_0]  18774.192668 s: src/mod/cpsw_ale.c line[4051]:  RAW:[0 200400
[MCU2_0]  18774.192699 s: src/mod/cpsw_ale.c line[4056]: 90 00009009]
[MCU2_0]  18774.192770 s: src/mod/cpsw_ale.c line[3870]:     32: Address: 484952412083, Port: 003 Se=0 Bl=0 TOUCH=1 AGE=1 TRUNK=0
[MCU2_0]  18774.192816 s: src/mod/cpsw_ale.c line[4051]:  RAW:[c d00a48
[MCU2_0]  18774.192847 s: src/mod/cpsw_ale.c line[4056]: 49 52412083]
[MCU2_0]  18774.194240 s: src/mod/cpsw_ale.c line[4061]:
[MCU2_0]  18774.194268 s: src/mod/cpsw_ale.c line[4062]: 1008 Free Entries
[MCU2_0]  18774.194315 s: src/mod/cpsw_ale.c line[5603]:
[MCU2_0]  18774.194348 s: src/mod/cpsw_ale.c line[5624]:     0: POLICER_PORT, PORT_NUM: 3 ISTRUNK:0
[MCU2_0]  18774.194388 s: src/mod/cpsw_ale.c line[5642]:     0: POLICER_DST_MAC,ALE Index: 11
[MCU2_0]  18774.194424 s: src/mod/cpsw_ale.c line[5648]:     0: POLICER_SRC_MAC,ALE Index: 10
[MCU2_0]  18774.194460 s: src/mod/cpsw_ale.c line[5672]:     0: POLICER_SRC_IP,ALE Index: 12
[MCU2_0]  18774.194496 s: src/mod/cpsw_ale.c line[5678]:     0: POLICER_DST_IP,ALE Index: 13
[MCU2_0]  18774.194531 s: src/mod/cpsw_ale.c line[5684]:     0: POLICER_THREAD,THREAD ID:0
[MCU2_0]  18774.194566 s: src/mod/cpsw_ale.c line[5692]:     0: POLICER_PIR_IDL_INC_VAL: 2048
[MCU2_0]  18774.194602 s: src/mod/cpsw_ale.c line[5701]:     0: POLICER_CIR_IDL_INC_VAL: 1024
[MCU2_0]  18774.194646 s: src/mod/cpsw_ale.c line[5729]:     0: POLICER_STATS: Hit: 1, RedHit: 1, YellowHit: 1
[MCU2_0]  18774.194692 s: src/mod/cpsw_ale.c line[5624]:     1: POLICER_PORT, PORT_NUM: 0 ISTRUNK:0
[MCU2_0]  18774.194733 s: src/mod/cpsw_ale.c line[5729]:     1: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
[MCU2_0]  18774.194972 s: src/mod/cpsw_ale.c line[5733]:
[MCU2_0]  18774.194997 s: src/mod/cpsw_ale.c line[5734]: 94 Free Entries
…
policerEn: 1, yellowDropEn: 1, redDropEn: 1, yellowThress: 0, policerNoMatchMode: 0, noMatchPolicer: -1558156804

The test result:

Best Regards,

Ruijie

  • Hi, 

    Will check and get back to you soon. 

    Best regards, 

    Sudheer

  • Hi,

    Sorry for delayed response. we are also facing issue of rate limit not working it is because of red drop is not enabled in our case due to which are not getting rate limiting.

    After enabling the red drop we are observing rate limit is working as configured but, using iperf TCP you may not observe it as iperf TCP will try to resend the same traffic due to which you will get less throughput in Kbps. The same is observed on your log.

    In your case red drop is enabled. It was working but your are checking iperf TCP above might be reason for less throughput.

    Can you check UDP, where you will observe the throughput as per rate limit on A72 client side.

    Best Regards,
    Sudheer

  • Hi,

    It doesn't work as expected. 1 and 2 is the test result of iperf3 using tcp. 3 and 4 is the test result of iperf3 using udp. The ale entry and policer are in the same configuration as before.

    Is this a chip problem or a sdk problem?

    Best Regards,

    Lei

  • Hi,

    I have tested at our end, It was working as expected in UDP.
    As I have mentioned in TCP it was due to Handshake we are not getting the desired rate.

    Are you running client on remote side i.e. PC side or not? If not, can you check by running client on PC side.
    You have to run from PC side as policer is created on match from SA of PC, DA of SOC A72 client.

    Best Regards,
    Sudheer

  • Hi,

    The global policer configuration is as follows. 

    policerEn: 1, yellowDropEn: 1, redDropEn: 1, yellowThress: 0, policerNoMatchMode: 0, noMatchPolicer: -1558156804

    hit 1 indicates that this policer setting has been hit via the log file. In this policer, it can be seen that some of the packets are colored yellow and red. According to our global configuration, all yellow and red colored packets should be discarded. cir is set to 10000000 (10M) and pir is set to 20000000 (20M). So the udp speed tested by iperf3 should be 10M to be reasonable, but the experimental results show that it is only about 6M. And the tcp speed tested via iperf3 is just illogical. 

    [MCU2_0]  18774.194348 s: src/mod/cpsw_ale.c line[5624]:     0: POLICER_PORT, PORT_NUM: 3 ISTRUNK:0
    [MCU2_0]  18774.194388 s: src/mod/cpsw_ale.c line[5642]:     0: POLICER_DST_MAC,ALE Index: 11
    [MCU2_0]  18774.194424 s: src/mod/cpsw_ale.c line[5648]:     0: POLICER_SRC_MAC,ALE Index: 10
    [MCU2_0]  18774.194460 s: src/mod/cpsw_ale.c line[5672]:     0: POLICER_SRC_IP,ALE Index: 12
    [MCU2_0]  18774.194496 s: src/mod/cpsw_ale.c line[5678]:     0: POLICER_DST_IP,ALE Index: 13
    [MCU2_0]  18774.194531 s: src/mod/cpsw_ale.c line[5684]:     0: POLICER_THREAD,THREAD ID:0
    [MCU2_0]  18774.194566 s: src/mod/cpsw_ale.c line[5692]:     0: POLICER_PIR_IDL_INC_VAL: 2048
    [MCU2_0]  18774.194602 s: src/mod/cpsw_ale.c line[5701]:     0: POLICER_CIR_IDL_INC_VAL: 1024
    [MCU2_0]  18774.194646 s: src/mod/cpsw_ale.c line[5729]:     0: POLICER_STATS: Hit: 1, RedHit: 1, YellowHit: 1

    Does this mean there is no way to speed limit tcp via the chip?

    As I have mentioned in TCP it was due to Handshake we are not getting the desired rate.

    Finally I would like to ask if this is a software problem or a chip problem? If it's a software problem, is it possible to fix the problem in sdk0703?

    Best Regards,
    Lei

  • Hi,

    And the tcp speed tested via iperf3 is just illogical. 

    I have rechecked at our end, The packet rate sent from iperf running on PC itself is less.

    Does this mean there is no way to speed limit tcp via the chip?

    If Application is sending more than the rate limited in H/W then it will limit the packet rate as per configuration.

    As I have mentioned in TCP it was due to Handshake we are not getting the desired rate.

    Finally I would like to ask if this is a software problem or a chip problem? If it's a software problem, is it possible to fix the problem in sdk0703?

    As informed above, It is not the issue with the S/W or Chip. As pointed above PC transmission it self is lees.

    Pease check the below data:


    Please check stats at your end as well, while running iperf in both UDP & TCP.

    Best Regards,
    Sudheer

  • Hi,

    When we tested it before, tda4 A72 was the receiver (iperf3 -s) and another ecu was the sender (iperf3 -c 192.168.4.153 -b 40M -t 10s). After I reversed them today, the test results did not change.

    I have two questions about the speed limit.

    First, why is it that I set pir to 20Mb,cir to 10Mb, but the test result via iperf3 about udp is only about 6Mb. Isn't the difference too big?

    Secondly, why is it that as long as pir and cir are set, the tcp sender's speed is very low, but as long as pir and cir are not set, the tested speed about tcp is the speed set by iperf3.

    Best Regards,
    Lei

  • Hi,

    When we tested it before, tda4 A72 was the receiver (iperf3 -s) and another ecu was the sender (iperf3 -c 192.168.4.153 -b 40M -t 10s). After I reversed them today, the test results did not change.

    It is not the issue with the ECU or chip.
    As TCP Is handshake mechanism, iperf application iself not pumping the data while negotiation with client, also you can observe the retries in case of TCP.
    If you are sending custom TCP packet without using standard applications like iperf then you can able to observe the rate liming from chip.

    First, why is it that I set pir to 20Mb,cir to 10Mb, but the test result via iperf3 about udp is only about 6Mb. Isn't the difference too big?

    Can you check the throughput using the CPSW stats it might be close to 10Mbps + 1/2Mbps as these are bits per second but drop will be in packets, If you are sending small size packets with then you may be observe the throughput close to it.
    Also, even when you are setting pir 20Mb the frames after 10Mbps are marked as yellow, as per your setting yellow also dropped so your throughput is limited to 10Mbps (10M bits per second)
    Please refer to below from TRM.



    Best Regards,
    Sudheer

  • Hi,

    I've done other chip speed limits before and haven't had problems like tcp.

    If you are sending custom TCP packet without using standard applications like iperf then you can able to observe the rate liming from chip.

    Can you recommend a software to test tcp?

    I tested udp using the iperf3 parameter -l, changing the packet size. but the best test result was about 7M. This is still a bit different from the cir 10M. Can you recommend the parameters that should be set for -l (iperf3 --c 192.168.4.153 -b 40M -t 10s -l 1000) ?

    The test result of (iperf3 --c 192.168.4.153 -b 40M -t 10s -l 64):

    The test result of (iperf3 --c 192.168.4.153 -b 40M -t 10s -l 200):

    The test reulst of (iperf3 --c 192.168.4.153 -b 40M -t 10s -l 1000):

    Best Regards,
    Lei

  • Hi,

    I've done other chip speed limits before and haven't had problems like tcp.

    Have you used similar test environment for testing the same. If so, kindly check whether flow control might be enabled in that case or not.

    If you are sending custom TCP packet without using standard applications like iperf then you can able to observe the rate liming from chip.

    Can you recommend a software to test tcp?

    What I suggested is pushing more TCP traffic, which is as good as pushing any traffic as the processing of all types frames will be same at H/W and S/W only application it will be differ based on usage.
    As we see UDP case we are almost getting 8Mbps throughput.

    I tested udp using the iperf3 parameter -l, changing the packet size. but the best test result was about 7M. This is still a bit different from the cir 10M. Can you recommend the parameters that should be set for -l (iperf3 --c 192.168.4.153 -b 40M -t 10s -l 1000) ?

    As we can see 8Mbps is achieving with UDP, as per internal discussion dropping of packets not at exactly choppy when huge data is receiving so, you may get some difference.
    Also, you can check by sending traffic with less bandwidth request like "-b 15M" you may get better result.

    Also, can you perform report using the CPSW statistics similar to what I have shared earlier.
    Please refer to FAQ [ How to collect /get CPSW Ethernet statistics].


    Best Regards,
    Sudheer

  • Hi,

    Also, you can check by sending traffic with less bandwidth request like "-b 15M" you may get better result.

    I have tested it and the result is as follow:

    The first picture is tda4vm and the second is another ecu. The statistic is as follow:

    [MCU2_0]  Port 0 Statistics
    [MCU2_0]   2611.987818 s: -----------------------------------------
    [MCU2_0]   2611.987869 s:   rxGoodFrames            = 498
    [MCU2_0]   2611.987915 s:   rxBcastFrames           = 47
    [MCU2_0]   2611.987953 s:   rxMcastFrames           = 272
    [MCU2_0]   2611.987990 s:   aleDrop                 = 421
    [MCU2_0]   2611.988049 s:   rxOctets                = 42976
    [MCU2_0]   2611.988088 s:   txGoodFrames            = 124480
    [MCU2_0]   2611.988129 s:   txOctets                = 149971126
    [MCU2_0]   2611.988167 s:   octetsFrames64          = 77
    [MCU2_0]   2611.988203 s:   octetsFrames65to127     = 471
    [MCU2_0]   2611.988239 s:   octetsFrames128to255    = 17
    [MCU2_0]   2611.988275 s:   octetsFrames256to511    = 6
    [MCU2_0]   2611.988312 s:   octetsFrames1024        = 124407
    [MCU2_0]   2611.988352 s:   netOctets               = 150014102
    [MCU2_0]   2611.988390 s:   portMaskDrop            = 421
    [MCU2_0]   2611.988427 s:   aleVidIngressDrop       = 377
    [MCU2_0]   2611.988463 s:   aleUnknownUcast         = 22
    [MCU2_0]   2611.988500 s:   aleUnknownUcastBcnt     = 1804
    [MCU2_0]   2611.988536 s:   aleUnknownMcast         = 19
    [MCU2_0]   2611.988571 s:   aleUnknownMcastBcnt     = 1633
    [MCU2_0]   2611.988614 s:   txPri[0]                = 124480
    [MCU2_0]   2611.988656 s:   txPriBcnt[0]            = 149971126
    [MCU2_0]   2611.988684 s:
    [MCU2_0]   2611.988756 s:
    [MCU2_0]  External Port 0 Statistics
    [MCU2_0]   2611.988780 s: -----------------------------------------
    [MCU2_0]   2611.988815 s:
    [MCU2_0]   2611.988879 s:
    [MCU2_0]  External Port 1 Statistics
    [MCU2_0]   2611.988904 s: -----------------------------------------
    [MCU2_0]   2611.988931 s:
    [MCU2_0]   2611.988989 s:
    [MCU2_0]  External Port 2 Statistics
    [MCU2_0]   2611.989038 s: -----------------------------------------
    [MCU2_0]   2611.989091 s:   rxGoodFrames            = 126254
    [MCU2_0]   2611.989133 s:   rxBcastFrames           = 28
    [MCU2_0]   2611.989169 s:   rxMcastFrames           = 1438
    [MCU2_0]   2611.989205 s:   aleDrop                 = 1774
    [MCU2_0]   2611.989243 s:   rxOctets                = 150136733
    [MCU2_0]   2611.989279 s:   txGoodFrames            = 77
    [MCU2_0]   2611.989313 s:   txMcastFrames           = 10
    [MCU2_0]   2611.989351 s:   txOctets                = 7642
    [MCU2_0]   2611.989388 s:   octetsFrames64          = 49
    [MCU2_0]   2611.989423 s:   octetsFrames65to127     = 1802
    [MCU2_0]   2611.989456 s:   octetsFrames128to255    = 67
    [MCU2_0]   2611.989489 s:   octetsFrames256to511    = 6
    [MCU2_0]   2611.989524 s:   octetsFrames1024        = 124407
    [MCU2_0]   2611.989560 s:   netOctets               = 150144375
    [MCU2_0]   2611.989597 s:   portMaskDrop            = 1774
    [MCU2_0]   2611.989632 s:   aleVidIngressDrop       = 1751
    [MCU2_0]   2611.989667 s:   aleUnknownUcast         = 269
    [MCU2_0]   2611.989702 s:   aleUnknownUcastBcnt     = 21794
    [MCU2_0]   2611.989738 s:   aleUnknownMcast         = 785
    [MCU2_0]   2611.989775 s:   aleUnknownMcastBcnt     = 75469
    [MCU2_0]   2611.989809 s:   aleUnknownBcast         = 20
    [MCU2_0]   2611.989844 s:   aleUnknownBcastBcnt     = 1280
    [MCU2_0]   2611.989879 s:   alePolicyMatch          = 124478
    [MCU2_0]   2611.989915 s:   txPri[0]                = 77
    [MCU2_0]   2611.989951 s:   txPriBcnt[0]            = 7642
    [MCU2_0]   2611.989974 s:
    [MCU2_0]   2611.990056 s:
    [MCU2_0]  External Port 3 Statistics
    [MCU2_0]   2611.990085 s: -----------------------------------------
    [MCU2_0]   2611.990113 s:
    [MCU2_0]   2611.990174 s:
    [MCU2_0]  External Port 4 Statistics
    [MCU2_0]   2611.990196 s: -----------------------------------------
    [MCU2_0]   2611.990222 s:
    [MCU2_0]   2611.990281 s:
    [MCU2_0]  External Port 5 Statistics
    [MCU2_0]   2611.990302 s: -----------------------------------------
    [MCU2_0]   2611.990329 s:
    [MCU2_0]   2611.990386 s:
    [MCU2_0]  External Port 6 Statistics
    [MCU2_0]   2611.990406 s: -----------------------------------------
    [MCU2_0]   2611.990432 s:
    [MCU2_0]   2611.990489 s:
    [MCU2_0]  External Port 7 Statistics
    [MCU2_0]   2611.990509 s: -----------------------------------------
    [MCU2_0]   2611.990534 s:
    
    After the test of iperf3:
    
    [MCU2_0]  Port 0 Statistics
    [MCU2_0]   2659.907760 s: -----------------------------------------
    [MCU2_0]   2659.907813 s:   rxGoodFrames            = 541
    [MCU2_0]   2659.907858 s:   rxBcastFrames           = 47
    [MCU2_0]   2659.907895 s:   rxMcastFrames           = 274
    [MCU2_0]   2659.907931 s:   aleDrop                 = 446
    [MCU2_0]   2659.907967 s:   rxOctets                = 46727
    [MCU2_0]   2659.908004 s:   txGoodFrames            = 134001
    [MCU2_0]   2659.908064 s:   txMcastFrames           = 1
    [MCU2_0]   2659.908103 s:   txOctets                = 159949091
    [MCU2_0]   2659.908142 s:   octetsFrames64          = 79
    [MCU2_0]   2659.908177 s:   octetsFrames65to127     = 528
    [MCU2_0]   2659.908213 s:   octetsFrames128to255    = 19
    [MCU2_0]   2659.908247 s:   octetsFrames256to511    = 8
    [MCU2_0]   2659.908284 s:   octetsFrames1024        = 133908
    [MCU2_0]   2659.908324 s:   netOctets               = 159995818
    [MCU2_0]   2659.908361 s:   portMaskDrop            = 446
    [MCU2_0]   2659.908397 s:   aleVidIngressDrop       = 402
    [MCU2_0]   2659.908433 s:   aleUnknownUcast         = 22
    [MCU2_0]   2659.908469 s:   aleUnknownUcastBcnt     = 1804
    [MCU2_0]   2659.908503 s:   aleUnknownMcast         = 19
    [MCU2_0]   2659.908538 s:   aleUnknownMcastBcnt     = 1633
    [MCU2_0]   2659.908580 s:   txPri[0]                = 134001
    [MCU2_0]   2659.908621 s:   txPriBcnt[0]            = 159949091
    [MCU2_0]   2659.908648 s:
    [MCU2_0]   2659.908717 s:
    [MCU2_0]  External Port 0 Statistics
    [MCU2_0]   2659.908742 s: -----------------------------------------
    [MCU2_0]   2659.908778 s:
    [MCU2_0]   2659.908841 s:
    [MCU2_0]  External Port 1 Statistics
    [MCU2_0]   2659.908862 s: -----------------------------------------
    [MCU2_0]   2659.908888 s:
    [MCU2_0]   2659.908944 s:
    [MCU2_0]  External Port 2 Statistics
    [MCU2_0]   2659.908967 s: -----------------------------------------
    [MCU2_0]   2659.909030 s:   rxGoodFrames            = 145268
    [MCU2_0]   2659.909079 s:   rxBcastFrames           = 32
    [MCU2_0]   2659.909116 s:   rxMcastFrames           = 1640
    [MCU2_0]   2659.909152 s:   aleDrop                 = 2019
    [MCU2_0]   2659.909190 s:   rxOctets                = 169847796
    [MCU2_0]   2659.909227 s:   txGoodFrames            = 95
    [MCU2_0]   2659.909261 s:   txMcastFrames           = 11
    [MCU2_0]   2659.909299 s:   txOctets                = 9347
    [MCU2_0]   2659.909335 s:   octetsFrames64          = 57
    [MCU2_0]   2659.909370 s:   octetsFrames65to127     = 2065
    [MCU2_0]   2659.909407 s:   octetsFrames128to255    = 77
    [MCU2_0]   2659.909440 s:   octetsFrames256to511    = 8
    [MCU2_0]   2659.909474 s:   octetsFrames1024        = 143156
    [MCU2_0]   2659.909511 s:   netOctets               = 169857143
    [MCU2_0]   2659.909548 s:   portMaskDrop            = 11267
    [MCU2_0]   2659.909583 s:   aleVidIngressDrop       = 1996
    [MCU2_0]   2659.909620 s:   aleUnknownUcast         = 299
    [MCU2_0]   2659.909656 s:   aleUnknownUcastBcnt     = 24134
    [MCU2_0]   2659.909691 s:   aleUnknownMcast         = 825
    [MCU2_0]   2659.909727 s:   aleUnknownMcastBcnt     = 79197
    [MCU2_0]   2659.909762 s:   aleUnknownBcast         = 22
    [MCU2_0]   2659.909797 s:   aleUnknownBcastBcnt     = 1408
    [MCU2_0]   2659.909832 s:   alePolicyMatch          = 143246
    [MCU2_0]   2659.909867 s:   alePolicyMatchRed       = 8752
    [MCU2_0]   2659.909902 s:   alePolicyMatchYellow    = 496
    [MCU2_0]   2659.909939 s:   txPri[0]                = 95
    [MCU2_0]   2659.909976 s:   txPriBcnt[0]            = 9347
    [MCU2_0]   2659.910000 s:
    [MCU2_0]   2659.910082 s:
    [MCU2_0]  External Port 3 Statistics
    [MCU2_0]   2659.910111 s: -----------------------------------------
    [MCU2_0]   2659.910142 s:
    [MCU2_0]   2659.910205 s:
    [MCU2_0]  External Port 4 Statistics
    [MCU2_0]   2659.910227 s: -----------------------------------------
    [MCU2_0]   2659.910255 s:
    [MCU2_0]   2659.910314 s:
    [MCU2_0]  External Port 5 Statistics
    [MCU2_0]   2659.910336 s: -----------------------------------------
    [MCU2_0]   2659.910362 s:
    [MCU2_0]   2659.910422 s:
    [MCU2_0]  External Port 6 Statistics
    [MCU2_0]   2659.910443 s: -----------------------------------------
    [MCU2_0]   2659.910469 s:
    [MCU2_0]   2659.910528 s:
    [MCU2_0]  External Port 7 Statistics
    [MCU2_0]   2659.910549 s: -----------------------------------------
    [MCU2_0]   2659.910575 s:

    Best Regards,
    Lei

  • Hi,

    I could see ~8Mbps throughput from the CPSW statistics, also some Port Mask drop in your case.
    Please refer to below.


    Best Regards,
    Sudheer

  • Hi,

    The rate limit is 10Mbps but the test result is 8Mbps through the CPSW statistics. I think the gap is is still a bit wide. Is there something wrong with my settings, or is there something wrong with this sdk0703? 

    some Port Mask drop in your case.

    I don't know why some Port Mask drop in my case. Even with the addition of these few dropped packets, this rate is still about 8Mbps.

    Best Regards,
    Lei

  • Hi,

    Sorry for delay.
    We are confirming internally with experts about the gap in policer rate limiting and get back to you on this.

    Best Regards,
    Sudheer

  • Hi,

    Sorry for delayed response.

    We got below information from H/W Team.

    Policing prevents any sender from exceeding the specified rate.

    Violating Rate limit (i.e. sending traffic beyond the limit) can cause to drop and result in a limit that is as low as 50% of the programmed limit i.e. if your ingress rate is 1% above the expected rate we would drop every other packet, resulting in 50.5% of the limit. This is because the packet arrives just before the limiter has reached the pass state.

    If the offered load is above the rate, you do not necessarily get the rate, that is if you set the rate to 9Mbps and you offer a continuous 9.1Mbps, every other packet is dropped. The reason is that when you receive the packet just after a GREEN, the counters have not gotten back to GREEN, so the packet is dropped.

    See the diagram of continuous ingress rate versus egress rate example below.

    The offered load is at the bottom, and the forwarded rate is the left indices.


    We would not get back to 99% of the limit till send just under two times the traffic. That is if the rate limiter is allowing 100Mbits, but you send 101Mbits, you would see 50.5Mbits.
    If you run a test with ever increasing rate, you will see the below result. This is the expected behavior of the IEEE and IET rate limiting.

    Above will be the reason for, not achieving the configured/programmed rate limit.
     
    Best Regards,
    Sudheer

  • Hi,

    why it's 50.5%. If the ingress rate is 10% above the expected rate, is the rate 60% of the limit? I don't really understand the logic.

    . if your ingress rate is 1% above the expected rate we would drop every other packet, resulting in 50.5% of the limit.

    Best regards,

    Lei

  • Hi, 

    Above is the HW behavior, and it was same as IEEE & IET rate limiting process.

    Best Regards, 

    Sudheer