netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ethernet padding - ti_cpsw vs DSA tail tag
@ 2021-05-31 12:40 Ben Hutchings
  2021-05-31 14:29 ` Vladimir Oltean
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2021-05-31 12:40 UTC (permalink / raw)
  To: netdev
  Cc: Grygorii Strashko, linux-omap, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean

I'm working on a system that uses a TI Sitara SoC with one of its
Ethernet ports connected to the host port of a Microchip KSZ8795
switch.  I'm updating the kernel from 4.14.y to 5.10.y.  Currently I
am using the ti_cpsw driver, but it looks like the ti_cpsw_new driver
has the same issue.

The Microchip switch expects a tail tag on ingress from the host port
to control which external port(s) to forward to.  This must appear
immediately before the frame checksum.  The DSA core correctly pads
outgoing skbs to at least 60 bytes before tag_ksz appends the tag.

However, since commit 9421c9015047 ("net: ethernet: ti: cpsw: fix min
eth packet size"), the cpsw driver pads outgoing skbs to at least 64
bytes.  This means that in smaller packets the tag byte is no longer
at the tail.

It's not obvious to me where this should be fixed.  Should drivers
that pad in ndo_start_xmit be aware of any tail tag that needs to be
moved?  Should DSA be aware that a lower driver has a minimum size >
60 bytes?

Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-11 14:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 12:40 Ethernet padding - ti_cpsw vs DSA tail tag Ben Hutchings
2021-05-31 14:29 ` Vladimir Oltean
2021-05-31 15:22   ` Florian Fainelli
2021-06-11 14:12   ` Grygorii Strashko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).