T1024上使用tcpdump抓到的包乱序

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T1024上使用tcpdump抓到的包乱序

1,345 Views
aonewan
Contributor I

Hello,

我在T1024上做了一个这样应用:从一个网口收到的包从另外一个网口发出去。在测试过程中,我们发现发出去的包有乱序。我们的测试拓朴如下:

PC1----->fm1-mac1---->fm1-mac2---->PC2

测试方法如下:

从PC1上发包,内核从fm1-mac1收到包之后从fm1-mac2发出去,在PC2抓fm1-mac2上发出来的包,我们发现PC2可以抓取所有从PC1上发过来的包,但是PC2上抓到的包的顺序不是PC1发出包的顺序。我们T1024上使用tcpdump在fm1-mac1上抓包,发现也是乱序的。

我们分析了一下,有可能是fm1-mac1的包交给了不同的cpu核处理的问题。如果同一个FMAN MAC收到的包交给同一个CPU处理应该就不会出现乱序,目前我们还没有找到相关的办法。

我们使用的linux内核为fsl-sdk-1.8的linux,版本号为:3.12.37。我们需要一个比较简单的方法来解决包的乱序问题,谢谢。

Labels (1)
0 Kudos
4 Replies

1,102 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Aone Wan,

You could use core-affined queue to implement order preservation, please use one of the following default FMC policy files.
/etc/fmc/config/private/t1024rdb/*/policy_ipv4.xml
/etc/fmc/config/private/t1024rdb/*/policy_ipv6.xml

 

Please execute FMC commands as the following before all networking related operations.
# fmc -c /etc/fmc/config/private/t1024rdb/*/config.xml -p /etc/fmc/config/private/t1024rdb/*/policy_ipv4.xml -a

 

This is because in DPAA1, each interface used by default one pool channel across all software portals and also the dedicated channel of each CPU. In Linux Kernel, PCD Frame queues in use dedicated channels.You could refer to
the section "5. Dedicated and Pool Channels Usage in Linux Kernel" in Using QMAN Dedicated and Pool Channels in USDPAA and Linux Kernel .

Thanks,

Yiping

0 Kudos

1,102 Views
aonewan
Contributor I

Hello, Yiping,

非常感谢你的回复。我们内核是从git.freescale.com上下的,文件系统是自己编的,所以没有fmc这个命令,/etc/fmc/也没有相应的文件,请问一下这几个文件哪里可以找到?

另外,我们尝试过将Software Portal1和Software Portal2的中断绑定在同一个CPU,测试后发现,虽然硬件中断和软中断都会在同一个核处理,但是包还是有乱序的情况。

0 Kudos

1,102 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Aone Wan,

I uploaded fmc related images in the following link, please deploy them on the target board.

https://drive.google.com/open?id=1VEHlHPJGGQYVaOf8zPwO7FCyZ95nGAmT

Please refer to the attached configuration file.

Thanks,

Yiping

0 Kudos

1,102 Views
aonewan
Contributor I

Hello Yiping,

     非常感谢你回复,我们下载过了个工具,执行完之后报“bus error"的错误,不知道是什么原因?

另外,关于这个问题,我们在测试过程中还发现还有一个现像,乱序的包一般出现在tcp分片包上,测试拓朴如下:

client----->fm1-mac1---->fm1-mac2---->server

如果server可接收的mss太小,client发出的一个大包就会产生tcp分片,分片后的包经过fm1-mac1--->fm1-mac2转到server就会乱序,一般情况下分片后的小包会先收到,大包后收到。

 

请帮忙分析一下原因,谢谢。

0 Kudos