netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: ksz: Increase the tag alignment
@ 2018-12-07 17:43 Marek Vasut
  2018-12-08  0:52 ` Tristram.Ha
  2018-12-14 16:36 ` Marek Vasut
  0 siblings, 2 replies; 11+ messages in thread
From: Marek Vasut @ 2018-12-07 17:43 UTC (permalink / raw)
  To: netdev
  Cc: f.fainelli, vivien.didelot, andrew, Woojung.Huh, UNGLinuxDriver,
	Marek Vasut, Woojung Huh, David S . Miller, Tristram Ha

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 <marex@denx.de>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
---
 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

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

end of thread, other threads:[~2018-12-14 16:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 17:43 [PATCH] net: dsa: ksz: Increase the tag alignment Marek Vasut
2018-12-08  0:52 ` Tristram.Ha
2018-12-08  4:25   ` Marek Vasut
2018-12-08 17:35     ` Florian Fainelli
2018-12-10 13:29       ` Marek Vasut
2018-12-10 20:04         ` Tristram.Ha
2018-12-10 20:33           ` Marek Vasut
2018-12-10 21:49             ` Tristram.Ha
2018-12-10 21:56               ` Marek Vasut
2018-12-10 21:39           ` Florian Fainelli
2018-12-14 16:36 ` Marek Vasut

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).