bug with a rotten packet in low level Linux network stack driver (yocto Freescale imx8)

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

bug with a rotten packet in low level Linux network stack driver (yocto Freescale imx8)

跳至解决方案
3,591 次查看
fbre
Contributor III

Hi,

I have yocto Linux (dunfell, also tried hardknott with 5.4 kernel + RT patch) and an imx8mm with Qualcomm PHY (the one from imx8mmevk evaluation board).

I run a Profinet stack as Linux software in user-space (using raw sockets). There is a cyclic Profinet protocol transfer of PNIO packets (reply and answer packet every 4msec). Every 40msec the Profinet stack also gets PNIO-CM request packets which are replied with a response (which is normal protocol transfer).

Measurement:

  1. I record the packet transfer with a network tap device between PLC and my device.
  2. And I record the packet transfer with 

 

 

tcpdump -i eth0 --time-stamp-precision=nano --time-stamp-type=adapter_unsynced -w /tmp/tcpdump.pcap​

 

on my device, as well.

 

Problem:

Wireshark shows in tcpdump.pcap (the recording on my i.mx8 yocto Linux) that a packet with ethertype PNIO-CM (which is a read request in the Profinet protocol) comes in 2 seconds too late compared to the recording of the network tap device. That 2 seconds are because a DCERPC-Ping packet comes in after that 2 seconds and awakes the rotten packet. The interesting thing is the HW timestamp of the packet is 48msec in the future seen from the time of awaking it (but all other timestamps of other packets are OK).

You can find both Wireshark files here: https://www.dropbox.com/s/ood0ur1kkjk7s4d/30.8.b.zip?dl=0 (just look at packet no. 3189 in tcpdump.pcap).

Question:

  1. Is it a bug in the PHY driver or ethernet driver (dpaa_eth.c) or somewhere else in those low level drivers of the Linux stack? It looks to me as if it's really a bug in the Freescale drivers.
  2. If so, is there someone out there who can fix it?

Thanx in advance,

-- falkb

0 项奖励
回复
1 解答
3,315 次查看
fbre
Contributor III

This was a bug in the fec_main.c which NXP has fixed now. Really awesome support. Thanx very much.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
3,316 次查看
fbre
Contributor III

This was a bug in the fec_main.c which NXP has fixed now. Really awesome support. Thanx very much.

0 项奖励
回复
3,559 次查看
jimmychan
NXP TechSupport
NXP TechSupport

There is no DPAA in i.MX8MM

0 项奖励
回复
3,528 次查看
BiyongSUN
NXP Employee
NXP Employee

i.MX family. all. ethernet interface is fec not dpaa.

and i.MX family ethernet driver is fec_main.c 

 

 

0 项奖励
回复
3,523 次查看
fbre
Contributor III

I believe you but I'm not a Linux network driver developer and don't have a clue what you are talking about. I just see that misbehaviour and found out which network driver files are built in my yocto build, and what the driver output is in dmesg.

0 项奖励
回复
3,533 次查看
fbre
Contributor III

Thanx for you reply, but it's not helpful. How does it explain or solve my problem with the rotten packet?

0 项奖励
回复