[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191106170320.27662-1-danielwa@cisco.com>
Date: Wed, 6 Nov 2019 09:03:20 -0800
From: Daniel Walker <danielwa@...co.com>
To: Claudiu Manoil <claudiu.manoil@....com>
Cc: Sathish Jarugumalli <sjarugum@...co.com>,
xe-linux-external@...co.com, Daniel Walker <dwalker@...o99.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.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@...co.com>
Cc: xe-linux-external@...co.com
Signed-off-by: Daniel Walker <dwalker@...o99.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
Powered by blists - more mailing lists