[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210531124051.GA15218@cephalopod>
Date: Mon, 31 May 2021 14:40:52 +0200
From: Ben Hutchings <ben.hutchings@...ensium.com>
To: netdev@...r.kernel.org
Cc: Grygorii Strashko <grygorii.strashko@...com>,
linux-omap@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Subject: Ethernet padding - ti_cpsw vs DSA tail tag
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.
Powered by blists - more mailing lists