Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp842480ybx; Wed, 6 Nov 2019 09:12:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzLgs1Ee9NjkDbAKbOW2a0XjOdyvyAfYOdwZCt6Ktvvd+ROVnPOtDQepIYh5mWGZ9zVtLwe X-Received: by 2002:a17:906:8046:: with SMTP id x6mr35196008ejw.221.1573060366049; Wed, 06 Nov 2019 09:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573060366; cv=none; d=google.com; s=arc-20160816; b=ptEh4Fx+nwxzmWwFiMLP7ZcTvuMT3g2cc8ZAMB+D96GnnIwoHt7zCpWWv0At0jdf27 9rvXR3W2tTDUlwifN79AbW973RoeKICP9hWojyI8mbUxxbkg0eRfhmbcfvAUmbJA6aNc +P3kBcunSXJyp1/S0gTgEVnmcbPOxPMCtyDqMChZe5zbH6etqwXnHXrqih7d8GKHFtF1 Shv6+p/khxDvyvkEcFgU+2RS/XzQYv8t7HXs/UxHleJ/uV5UvLL28joHwH4sTpEGCfNY 77Mfbm6Vy0VttJz8BlpR76E+Ibj2FhtbsnkZ7VeBMUiHiVMfBjo+wi6huHq82+SrhHNM CgCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=O8ZjpZZaoAWWc4Z+WLa0jnI3qJHU/3Wps+ERhfE/lyg=; b=v4q7NmcwfRWHwPhEUtld+zkExU5Zv1ObyzQacl7fcfAdKRJSNAA/7AGQQUwRN3gvbq cd1DJLHlElijVI1m++Dr6f+C3u34sc2OpZUvzfPqOsUbyZaLY3PdpcjuCZ3bRQKDoT69 O7OHTrV4JIWVB6TFB5zf87MBgSstecof3ZzzkJgCkBUYxHxgEfff0o6bHZQFBeWzdjyr tk6VwfPi6JUDqgsiNwTdEtbypIQlCQw3FWPzxY/Job5i0ZBQS/wa7u2YcmZ5pb6PZ4dg fascap1y4x9ibPUVGOTUbN96lQ6oNxNb7Q8smF3BQuC8OoE6/bFDJ2rItpeQLP2CM7v0 jtiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=JympPcQF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz7si16305848ejb.271.2019.11.06.09.12.21; Wed, 06 Nov 2019 09:12:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=JympPcQF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732172AbfKFRKa (ORCPT + 99 others); Wed, 6 Nov 2019 12:10:30 -0500 Received: from rcdn-iport-3.cisco.com ([173.37.86.74]:23347 "EHLO rcdn-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727570AbfKFRKa (ORCPT ); Wed, 6 Nov 2019 12:10:30 -0500 X-Greylist: delayed 424 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Nov 2019 12:10:29 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1144; q=dns/txt; s=iport; t=1573060229; x=1574269829; h=from:to:cc:subject:date:message-id; bh=i+ZmhryTW5i1S1guIxB3vbaClOwmez7utMMxBN4AE2o=; b=JympPcQF2YQcfGcRysvGk+/WYtSwWhi6y0EK6CnYaDdmugPqrtvuRo5J RLFHq3tE+/7QkhH4XQBXICYLQOV299ZKe7BGHtXWNFd4vyACp9qq88aI8 1Vu1YX1uyRiSI2stJgs44KmR8w89sZ6S8dc5O50xTcsDfldg14+3Y1bWq w=; X-IronPort-AV: E=Sophos;i="5.68,275,1569283200"; d="scan'208";a="646579448" Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 06 Nov 2019 17:03:24 +0000 Received: from zorba.cisco.com ([10.154.200.26]) by alln-core-5.cisco.com (8.15.2/8.15.2) with ESMTP id xA6H3Nch010301; Wed, 6 Nov 2019 17:03:23 GMT From: Daniel Walker To: Claudiu Manoil Cc: Sathish Jarugumalli , xe-linux-external@cisco.com, Daniel Walker , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers: net: gianfar: Shortest frame drops at Ethernet port Date: Wed, 6 Nov 2019 09:03:20 -0800 Message-Id: <20191106170320.27662-1-danielwa@cisco.com> X-Mailer: git-send-email 2.17.1 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.154.200.26, [10.154.200.26] X-Outbound-Node: alln-core-5.cisco.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: xe-linux-external@cisco.com Signed-off-by: Daniel Walker --- 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