linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port
@ 2019-11-06 17:03 Daniel Walker
  2019-11-06 17:38 ` Claudiu Manoil
  2019-11-07 23:15 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Walker @ 2019-11-06 17:03 UTC (permalink / raw)
  To: Claudiu Manoil
  Cc: Sathish Jarugumalli, xe-linux-external, Daniel Walker,
	David S. Miller, netdev, linux-kernel

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

Signed-off-by: Sathish Jarugumalli <sjarugum@cisco.com>
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <dwalker@fifo99.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 51ad86417cb1..047960b1c76e 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -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;
-- 
2.17.1


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

* RE: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port
  2019-11-06 17:03 [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port Daniel Walker
@ 2019-11-06 17:38 ` Claudiu Manoil
  2019-11-06 17:46   ` Daniel Walker
  2019-11-07 23:15 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Claudiu Manoil @ 2019-11-06 17:38 UTC (permalink / raw)
  To: Daniel Walker
  Cc: Sathish Jarugumalli, xe-linux-external, Daniel Walker,
	David S. Miller, netdev, linux-kernel

>-----Original Message-----
>From: Daniel Walker <danielwa@cisco.com>
>Sent: Wednesday, November 6, 2019 7:03 PM
>To: Claudiu Manoil <claudiu.manoil@nxp.com>
>Cc: Sathish Jarugumalli <sjarugum@cisco.com>; xe-linux-external@cisco.com;
>Daniel Walker <dwalker@fifo99.com>; David S. Miller
><davem@davemloft.net>; netdev@vger.kernel.org; linux-
>kernel@vger.kernel.org
>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
>
>Signed-off-by: Sathish Jarugumalli <sjarugum@cisco.com>
>Cc: xe-linux-external@cisco.com
>Signed-off-by: Daniel Walker <dwalker@fifo99.com>

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>

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


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

* Re: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port
  2019-11-06 17:38 ` Claudiu Manoil
@ 2019-11-06 17:46   ` Daniel Walker
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Walker @ 2019-11-06 17:46 UTC (permalink / raw)
  To: Claudiu Manoil
  Cc: Sathish Jarugumalli, xe-linux-external, Daniel Walker,
	David S. Miller, netdev, linux-kernel

On Wed, Nov 06, 2019 at 05:38:06PM +0000, Claudiu Manoil wrote:
> >-----Original Message-----
> >From: Daniel Walker <danielwa@cisco.com>
> >Sent: Wednesday, November 6, 2019 7:03 PM
> >To: Claudiu Manoil <claudiu.manoil@nxp.com>
> >Cc: Sathish Jarugumalli <sjarugum@cisco.com>; xe-linux-external@cisco.com;
> >Daniel Walker <dwalker@fifo99.com>; David S. Miller
> ><davem@davemloft.net>; netdev@vger.kernel.org; linux-
> >kernel@vger.kernel.org
> >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
> >
> >Signed-off-by: Sathish Jarugumalli <sjarugum@cisco.com>
> >Cc: xe-linux-external@cisco.com
> >Signed-off-by: Daniel Walker <dwalker@fifo99.com>
> 
> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
> 
> 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

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

* Re: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port
  2019-11-06 17:03 [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port Daniel Walker
  2019-11-06 17:38 ` Claudiu Manoil
@ 2019-11-07 23:15 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-11-07 23:15 UTC (permalink / raw)
  To: danielwa
  Cc: claudiu.manoil, sjarugum, xe-linux-external, dwalker, netdev,
	linux-kernel

From: Daniel Walker <danielwa@cisco.com>
Date: Wed,  6 Nov 2019 09:03:20 -0800

> 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
> 
> Signed-off-by: Sathish Jarugumalli <sjarugum@cisco.com>
> Cc: xe-linux-external@cisco.com
> Signed-off-by: Daniel Walker <dwalker@fifo99.com>

Please repost with an appropriate Fixes: tag.

Thank you.

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

end of thread, other threads:[~2019-11-07 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 17:03 [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port Daniel Walker
2019-11-06 17:38 ` Claudiu Manoil
2019-11-06 17:46   ` Daniel Walker
2019-11-07 23:15 ` David Miller

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