Packet drops in l2fwd example code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Packet drops in l2fwd example code

6,902 次查看
nagurvalisayyad
Contributor I

Hi,

    I am using DPDK l2fwd application in the LS1046ARDB kit. I have used spirent to generate traffic on one port and receive on other port. When I send the traffic from spirent, the tx and rx count is not matching, but the l2fwd port statistics showing the same count as spirent sent. For ex, spirent sent n pkts, the Ls1040 port statisitics showing received = n and sent =n, but the spirent receive port is showing less than n pkts. For reference I have attached the spirent and LS1046 statistics screen shot. Where this loss is happening in LS1046.

Same application is run in Intel server, but there are no packet losses.

Please help us in resolving the problem.

Thanks--

Nagurvali Sayyad.

0 项奖励
回复
9 回复数

6,883 次查看
nagurvalisayyad
Contributor I

Hi,

   I have taken the counts of qmi and bmi registers. Please find the attachment. 

Total packets sent by spirent        = 201945 = 0x314D9

Total packets received by spirent = 201622 = 0x31396

0 项奖励
回复

6,875 次查看
yipingwang
NXP TechSupport
NXP TechSupport

If TX of LS is different from RX of spirent , please check whether there is error packets on TX of LS, and whether there is error packets on RX of spirent.

0 项奖励
回复

6,868 次查看
nagurvalisayyad
Contributor I

Hi yipingwang,

        There are no error packets in RX of spirent. The RX count shown by spirent is 201622 without any FCS, PRBS errors, etc(Actually TX by spirent is 201945).

How to see the error packets on TX of LS?

In the last post, I have attached the qmi and bmi port registers dump. Is it gives any information about error packets at LS side.

Thanks--

Nagurvali Sayyad.

0 项奖励
回复

6,739 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following update from the AE team.

As the logs, the packets statistics on rx/tx side of FMAN are same.

That's mean the packets already sent by Tx in MAC, the issue is occurred duration the MAC to Spirent TC.

I didn't reproduce the issue on LS1046ARDB, the counter of Tx is same as Rx of Spirent TC.

So, could customer try to send the lower traffic load rate? if possible, try it again with another LS1046ARDB.

0 项奖励
回复

6,731 次查看
nagurvalisayyad
Contributor I

Hi,

   I have tried with multiple rates(Ex: 100Kbps to 400Mbps), but facing the same issue. I am compiling the DPDK l2fwd application in Ubuntu host and transferring the executables to the LS kit and running in the home directory. 

Is it creates any problem?

I have observed that the LS kit is not generating any packets for some random durations of 100ms to 150ms. So, if the rate is high, the difference between the TX and RX count is high and if the rate is less, the difference is low.

0 项奖励
回复

6,708 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please deploy a SD card with LSDK 21.08 pre-built image

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/flex-installer && chmod +x flex-installer && sudo
mv flex-installer /usr/bin

$ flex-installer -i pf -d <device>

$ flex-installer -i auto -m ls1046ardb -d <device>

Then boot from SD card and check whether this problem persists.

0 项奖励
回复

6,665 次查看
nagurvalisayyad
Contributor I

Hi,

   After installing the downloaded images also getting the same error. The Spirent TX and RX count mismatch is there on RGMII1 and RGMII2 ports.

If I use the SGMII1 and SGMII2 ports, then there are no drops and spirent TX and RX count is matching.

In our recompiled and loaded SD card, we have changed the dts file of USDPAA containing only RGMII ports, so that both SGMII ports will be in control of Linux. Because of that, we could not test the DPDK l2fwd application with SGMII ports.

Now it's clear that DPDK loopback with SGMII ports is fine, but why packet drops if we use the RGMII ports?

0 项奖励
回复

6,621 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Would you please try normal IP forwarding in Linux Kernel?

Please boot up the target board with normal DTS without USDPAA.

~# echo 1 > /proc/sys/net/ipv4/ip_forward

0 项奖励
回复

6,675 次查看
nagurvalisayyad
Contributor I

Hi,

   After deploying a SD card with LSDK 21.08 pre-built image, the following commands are executed. Please check, if any mistakes are there.

Step 1:

cd /boot/
cp fsl-ls1046a-rdb-sdk.dtb fsl-ls1046a-rdb-sdk_org.dtb // Take backup of original SDK dtb file
cp fsl-ls1046a-rdb-usdpaa.dtb fsl-ls1046a-rdb-sdk.dtb // Copy USDPAA as default DTB file
reboot

Step 2:

mkdir -p /dev/hugetlbfs
mount -t hugetlbfs hugetlbfs /dev/hugetlbfs/
echo 448 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

fmc -x
fmc -c /usr/local/dpdk/dpaa/usdpaa_config_ls1046.xml -p /usr/local/dpdk/dpaa/usdpaa_policy_hash_ipv4_1queue.xml -a

dpdk-l2fwd -c 0xc -n 4 -- -p 0x3 -q 8 -T 2

0 项奖励
回复