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

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

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

Jump to solution
3,584 Views
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 Kudos
Reply
1 Solution
3,308 Views
fbre
Contributor III

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

View solution in original post

0 Kudos
Reply
5 Replies
3,309 Views
fbre
Contributor III

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

0 Kudos
Reply
3,552 Views
jimmychan
NXP TechSupport
NXP TechSupport

There is no DPAA in i.MX8MM

0 Kudos
Reply
3,521 Views
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 Kudos
Reply
3,516 Views
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 Kudos
Reply
3,526 Views
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 Kudos
Reply