Make sure to cater even for network packets with VLAN tags in them, increase the minimal packets size to account for those.
Signed-off-by: Marek Vasut <[email protected]> Cc: Vivien Didelot <[email protected]> Cc: Woojung Huh <[email protected]> Cc: David S. Miller <[email protected]> Cc: Tristram Ha <[email protected]> --- net/dsa/tag_ksz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 96411f70ab9f4..cad4406d9d4c2 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -39,7 +39,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev) int padlen; u8 *tag; - padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; + padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb->len; if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) { /* Let dsa_slave_xmit() free skb */ -- 2.18.0
