Skip to contentSkip to conversation

drivers: net: gianfar: Shortest frame drops at Ethernet port

PATCH In review Daniel Walker 3 participants 4 messages Nov 6, 2019 – Nov 7, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: net: gianfar: Shortest frame drops at Ethernet port

NXP has provided the patch for packet drops at ethernet port Frames shorter than 60bytes are getting dropped at ethernetport need to add padding for the shorter range frames to be transmit the function "eth_skb_pad(skb" provides padding (and CRC) for packets under 60 bytes

---
 drivers/net/ethernet/freescale/gianfar.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/freescale/gianfar.c +3 -0
index 51ad86417cb1..047960b1c76e 100644
@@ -1823,6 +1823,9 @@ static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (unlikely(do_tstamp))
 		fcb_len = GMAC_FCB_LEN + GMAC_TXPAL_LEN;
 
+	if (eth_skb_pad(skb))
+		return NETDEV_TX_OK;
+
 	/* make space for additional header when fcb is needed */
 	if (fcb_len && unlikely(skb_headroom(skb) < fcb_len)) {
 		struct sk_buff *skb_new;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Daniel Walker <[email protected]>
Sent: Wednesday, November 6, 2019 7:03 PM
To: Claudiu Manoil <[email protected]>
Cc: Sathish Jarugumalli <[email protected]>; [email protected]; Daniel Walker <[email protected]>; David S. Miller <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port

NXP has provided the patch for packet drops at ethernet port Frames shorter than 60bytes are getting dropped at ethernetport need to add padding for the shorter range frames to be transmit the function "eth_skb_pad(skb" provides padding (and CRC) for packets under 60 bytes

Quoted 3 lines

Normally padding is done by the hardware, and it works at least on my test cases and boards.
But cisco seems to have hit a case where h/w padding gets unexpectedly disabled (concurrency issue writing the config register?). This patch should go as a workaround, until root cause found.

-Claudiu

#2 lore raw
Quoted 20 lines · Claudiu Manoil
Quoted 16 lines

-----Original Message-----
From: Daniel Walker <[email protected]>
Sent: Wednesday, November 6, 2019 7:03 PM
To: Claudiu Manoil <[email protected]>
Cc: Sathish Jarugumalli <[email protected]>; [email protected]; Daniel Walker <[email protected]>; David S. Miller <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port

NXP has provided the patch for packet drops at ethernet port Frames shorter than 60bytes are getting dropped at ethernetport need to add padding for the shorter range frames to be transmit the function "eth_skb_pad(skb" provides padding (and CRC) for packets under 60 bytes

Quoted 3 lines
Quoted 7 lines

Normally padding is done by the hardware, and it works at least on my test cases and boards.
But cisco seems to have hit a case where h/w padding gets unexpectedly disabled (concurrency issue writing the config register?). This patch should go as a workaround, until root cause found.

Where would this hardware setup normally happen? Does it happen in the bootloader or inside the kernel someplace ?

Daniel

maintainer
#3 lore raw
In reply to Daniel Walker

From: Daniel Walker <[email protected]>
Date: Wed, 6 Nov 2019 09:03:20 -0800

Quoted 9 lines

NXP has provided the patch for packet drops at ethernet port Frames shorter than 60bytes are getting dropped at ethernetport need to add padding for the shorter range frames to be transmit the function "eth_skb_pad(skb" provides padding (and CRC) for packets under 60 bytes

Please repost with an appropriate Fixes: tag.

Thank you.