On Wed, Feb 17, 2021 at 01:37:21PM +0800, DENG Qingfang wrote: > On Wed, Feb 17, 2021 at 11:29 AM Andrew Lunn <and...@lunn.ch> wrote: > > > > > + /* Pad out to at least 60 bytes */ > > > + if (unlikely(eth_skb_pad(skb))) > > > + return NULL; > > > > The core will do the padding for you. Turn on .tail_tag in > > dsa_device_ops. > > > > Please don't. .tail_tag does far more than just padding.
Qingfang is right, this is an EtherType tagging protocol not a tail tagger. Note that there was an interesting discussion with Florian and Kuba around the Broadcom switches that require padding for short frames too: https://patchwork.kernel.org/project/netdevbpf/patch/20201101191620.589272-10-vladimir.olt...@nxp.com/