Skip to contentSkip to conversation

BUG: fsl FEC ethernet tx checksum offloading doesn't work with RMII interface

DISCUSSION David Jander 3 participants 6 messages Oct 28, 2015 – Oct 29, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

I was unable to figure out who's maintaining drivers/net/ethernet/freescale/fec_main.c, so I hope someone can help out on this list...

We have a board with a RMII phy connected to an i.MX6S. The hardware seems to be ok, since I can receive and transmit ethernet frames without drops or errors. However only simple things like ping and dhcp seemed to work. TCP/IP connections could not be made. When looking at both ends with tcpdump, I realized that all transmitted packages arrived at the other end with the TCP and IP header checksums zeroed-out.

After issuing the following command, TCP/IP started working correctly:

$ ethtool --offload eth0 tx off

This works around the issue. For some reason, when the FEC is in RMII mode, it isn't filling in the checksums.

On another board with an RGMII phy the same kernel works fine without the need to disable offloading. What can possibly relate this functionality to the choice of MAC interface?

Best regards,

Signature · 2 lines
David Jander
Protonic Holland.
#1 lore raw
Quoted 16 lines · David Jander

Hi all,

I was unable to figure out who's maintaining drivers/net/ethernet/freescale/fec_main.c, so I hope someone can help out on this list...

We have a board with a RMII phy connected to an i.MX6S. The hardware seems to be ok, since I can receive and transmit ethernet frames without drops or errors. However only simple things like ping and dhcp seemed to work. TCP/IP connections could not be made. When looking at both ends with tcpdump, I realized that all transmitted packages arrived at the other end with the TCP and IP header checksums zeroed-out.

After issuing the following command, TCP/IP started working correctly:

Quoted 8 lines
$ ethtool --offload eth0 tx off

This works around the issue. For some reason, when the FEC is in RMII mode, it isn't filling in the checksums.

On another board with an RGMII phy the same kernel works fine without the need to disable offloading. What can possibly relate this functionality to the choice of MAC interface?

You don't mention which kernel version you're using. There has been a bug here with older kernels...

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#2 lore raw
Quoted 22 lines · On Wed, 28 Oct 2015 11:14:14 +0000 Russell King - ARM Linux…
Quoted 21 lines · David Jander

Hi all,

I was unable to figure out who's maintaining drivers/net/ethernet/freescale/fec_main.c, so I hope someone can help out on this list...

We have a board with a RMII phy connected to an i.MX6S. The hardware seems to be ok, since I can receive and transmit ethernet frames without drops or errors. However only simple things like ping and dhcp seemed to work. TCP/IP connections could not be made. When looking at both ends with tcpdump, I realized that all transmitted packages arrived at the other end with the TCP and IP header checksums zeroed-out.

After issuing the following command, TCP/IP started working correctly:

$ ethtool --offload eth0 tx off

This works around the issue. For some reason, when the FEC is in RMII mode, it isn't filling in the checksums.

Quoted 6 lines
Quoted 3 lines

On another board with an RGMII phy the same kernel works fine without the need to disable offloading. What can possibly relate this functionality to the choice of MAC interface?

You don't mention which kernel version you're using. There has been a bug here with older kernels...

Sorry, I somehow assumed it was obvious I'd report against latest mainline... I'm on 4.3-rc7.

Best regards,

Signature · 2 lines
David Jander
Protonic Holland.
#3 lore raw
Quoted 2 lines · David Jander

Sorry, I somehow assumed it was obvious I'd report against latest mainline... I'm on 4.3-rc7.

Are you able to find out a previous kernel version that does not exhibit this failure?

#4 lore raw
Quoted 7 lines · On Wed, 28 Oct 2015 10:31:17 -0200 Fabio Estevam <[email protected]> wrote:
Quoted 2 lines · David Jander

Sorry, I somehow assumed it was obvious I'd report against latest mainline... I'm on 4.3-rc7.

Are you able to find out a previous kernel version that does not exhibit this failure?

I can search further down, but 4.1 is also broken.
Are there specific changes or versions you are suspicious of? Russel mentioned something similar being fixed in the past... any pointers to this fix, so I can investigate whether this has any relation?

Best regards,

Signature · 2 lines
David Jander
Protonic Holland.
#5 lore raw
Quoted 2 lines · David Jander

I can search further down, but 4.1 is also broken. Are there specific changes or versions you are suspicious of?

I was just trying to understand if this was a regression or if it has always been broken.