Message ID | 20231114134535.2455051-2-srasheed@marvell.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1867310vqg; Tue, 14 Nov 2023 05:47:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGY56RgXUus2VypPWXVxMI9V1ljrPFYt7h7+zYP7DtmYf6mn5hxJRa1dDDu+cNHZml6c0Na X-Received: by 2002:a05:6808:2a0b:b0:3a3:b39d:a8bf with SMTP id ez11-20020a0568082a0b00b003a3b39da8bfmr11334154oib.45.1699969631387; Tue, 14 Nov 2023 05:47:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699969631; cv=none; d=google.com; s=arc-20160816; b=l1sToJ87Lc5T3f1QBqoBQP8yGZJsEje0KbST3dyFP1HnzgORRDIaIvsWQgQeME7WB5 ptWTOzbGwAepg24Hwu7Gb5waCIz+RodrkOAZH4NwIAXS3j0lYk8PXBV5S8OaPfE193B2 a+akSO+zYNAZvcQ8MjK0l5HSQbSxtDjAJZ7IGthwu9dA6tbia+TTZOiMt4Ii+aPGmbEK BW8eGHMVhBUSvdk5hNwXa3Zvzc+fxpJVHRfH9mF/lWy1FN37jV4RvRpJ0qIbaog5IIkK F+bI9M8Qo6wqiIGfcPEK/y6faEr4A6dSjyPeC2j0r1604Db4nDiZBVzoy5zt5hhpXydW pgwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NgILK9wtLyMUAwzUUpKcc8XDHZhA7pOaSTnLVOywbdQ=; fh=PUbSZjf2dtyqulLdd5rISVghnntgSGxvYpWMBobeHB0=; b=l9yAGliR4jTTrLNBahKh6ItB0wiKs4rAGslfy1smUIM6Nhl22Mn2NbSpRO9qeR2idV D7QTTZmq3KxlfvFpuZln7pekKAmtMZAgsb3VkEvavNKwiZfk/uJg3gePVmpEhXzlduve 0+0E91MCwhbcK69xQ1i7W4DfhCZ2gksi9UZ7BH3rFNyQ5ZEPgmoACfVZ0p8sGyFiFpv+ GDCuXV77cHphfl56q0A19uHv8vZK8BsoKU1Nv/6UFUygE6t6Z6mhFNSVHlVDvVu5ZRKm L3ViRPsv+5LSdZk78tsMUSnqscp/P5+T7rGS6LTalzhEbzgpsQBj7l4+1QepKvVXn3td U3dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="A/d4yDKM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k127-20020a632485000000b00584e731e7fbsi7420368pgk.280.2023.11.14.05.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 05:47:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="A/d4yDKM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B46E48087274; Tue, 14 Nov 2023 05:46:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233286AbjKNNqF (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 08:46:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233233AbjKNNp6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 08:45:58 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1215E1B6; Tue, 14 Nov 2023 05:45:55 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AE84dfn017588; Tue, 14 Nov 2023 05:45:43 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=NgILK9wtLyMUAwzUUpKcc8XDHZhA7pOaSTnLVOywbdQ=; b=A/d4yDKMlXNQi07eAhEsK9oKc01xK93KL2ojqhPWri1VLYy8pPUl5hoXI6cUwdIiZ4ib EDPPmxjgSa2LXFQaUB1XSWLh+t4xBo4F6PbXLUhowZcQjeEfbH4FcsVwlv8llxoTQhMs laxs5TcQfV8d8fFdJ6UDGKu9It4mhvEuEl9KAMknPDDBNy6V7HteiZzZeiTEhZO5/GJc iqZ8vLDBQbAkjhl+8tXL7l0N+k63VRRQenUAeEU3IEYuTko6I6ocMK9XaO+Wo68rnly4 w6qhHnVFkEesF2ZvyU67qFL3kDQcoHAwktNLpZCfgQhaGWS0czfU+z9i54AUnRAJ5keA 2Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uc52eh2g5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 05:45:42 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 14 Nov 2023 05:45:41 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 14 Nov 2023 05:45:41 -0800 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id 9942C3F7055; Tue, 14 Nov 2023 05:45:40 -0800 (PST) From: Shinas Rasheed <srasheed@marvell.com> To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <hgani@marvell.com>, <vimleshk@marvell.com>, <egallen@redhat.com>, <mschmidt@redhat.com>, <pabeni@redhat.com>, <horms@kernel.org>, <kuba@kernel.org>, <davem@davemloft.net>, <wizhao@redhat.com>, <konguyen@redhat.com>, Shinas Rasheed <srasheed@marvell.com>, "Veerasenareddy Burru" <vburru@marvell.com>, Sathesh Edara <sedara@marvell.com>, Eric Dumazet <edumazet@google.com> Subject: [PATCH net-next v3 RESEND 1/4] octeon_ep: add padding for small packets Date: Tue, 14 Nov 2023 05:45:32 -0800 Message-ID: <20231114134535.2455051-2-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114134535.2455051-1-srasheed@marvell.com> References: <20231114134535.2455051-1-srasheed@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: GikNC_wqM2QJ-1u8si3NPMUdv7dHLvYj X-Proofpoint-ORIG-GUID: GikNC_wqM2QJ-1u8si3NPMUdv7dHLvYj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-14_13,2023-11-09_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 14 Nov 2023 05:46:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782547356284393640 X-GMAIL-MSGID: 1782547356284393640 |
Series |
Cleanup and optimizations to transmit code
|
|
Commit Message
Shinas Rasheed
Nov. 14, 2023, 1:45 p.m. UTC
Pad small packets to ETH_ZLEN before transmit, as hardware
cannot pad and requires software padding to ensure
minimum ethernet frame length.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
---
V3:
- Updated changelog to provide more info.
V2: https://lore.kernel.org/all/20231024145119.2366588-2-srasheed@marvell.com/
- Introduced the patch
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index 552970c7dec0..2c86b911a380 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -820,6 +820,9 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb, u16 nr_frags, si; u16 q_no, wi; + if (skb_put_padto(skb, ETH_ZLEN)) + return NETDEV_TX_OK; + q_no = skb_get_queue_mapping(skb); if (q_no >= oct->num_iqs) { netdev_err(netdev, "Invalid Tx skb->queue_mapping=%d\n", q_no);