Message ID | 20231024145119.2366588-2-srasheed@marvell.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1996452vqx; Tue, 24 Oct 2023 07:52:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHURyAuRK2KdXCZ2zkLwTsumZV8sAoR4OhXX8fd6/q+YBRKEDslzx05CfyrvUkrRnEcEqLA X-Received: by 2002:a17:902:ce8d:b0:1c8:9832:8278 with SMTP id f13-20020a170902ce8d00b001c898328278mr13304930plg.48.1698159124638; Tue, 24 Oct 2023 07:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698159124; cv=none; d=google.com; s=arc-20160816; b=C5iZVjjEhFarw1fwEK1cpXBJDWrnBUH2zuNJIpPyxw5+HNnssBxMA4pSOZ0eof8wsw wM/Wo5w3WRRWhRfzUV7k5IInEsRlF9w8taDkiL612jxnMYvokvgx4rwmp55cpsiIxJKV sZPFM2ISaiK+J5OFo7hS9MBDcoG4PEhwwqgMNXnbZhj4e5IdWRrkm99YfqweDjyyk6r4 DPkoELcaLJonZsK2iKj8XQVxATRnhcNBFH2KjXRumcyB1VpbD4N0Oe+DBoaBzpUnTs8c viv+TzTWKjpVxf5lGwHt4gPIQeD6W8CtTEe5p9s+40+pUt9ibcOTYJDf7DRsWp+8ypqh gv1g== 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=6nzbfkxRkQ7E65eL9WI4SEOv9tmrHHgxnGyQP9GXZZg=; fh=PUbSZjf2dtyqulLdd5rISVghnntgSGxvYpWMBobeHB0=; b=PaF8sf85Dsh/wJdcsyjMKcoLEcPvoZVgDcj0O8sXy9eACpNTg34CaCV2VhPua6oVey LzEjAl/t/6ifdmh8e64CYR5PLVO9CxgCrN3ekEta/PHxWsManES7czr3/SEPa5NUm+tA 8NbbRV/opH7n1wrGKiz7Oc5RgOf3DvnMh+5PF+N2Rqlb845GAXAP46LG9fGU9j9cTcqg zbIlmV/TYvNJlDPwqE4iwnRSjPrW33UbqMkBc3mHDrVyUslh0E6MEVQmoIps67lBBugf zguGe97VbSketxsDqv5Ld2H8IV5jQgAbDw9bY9XEpewThWd2PRbXMf0Bh7Rf9MfF7tki FFsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="FulKWrz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h24-20020a17090aa89800b0027ced9acac0si11175360pjq.2.2023.10.24.07.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="FulKWrz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 1ED4F80ADF02; Tue, 24 Oct 2023 07:52:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343655AbjJXOvr (ORCPT <rfc822;a1648639935@gmail.com> + 26 others); Tue, 24 Oct 2023 10:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234551AbjJXOvo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Oct 2023 10:51:44 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A6910DB; Tue, 24 Oct 2023 07:51:42 -0700 (PDT) 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 39O2KhT3022546; Tue, 24 Oct 2023 07:51:36 -0700 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=6nzbfkxRkQ7E65eL9WI4SEOv9tmrHHgxnGyQP9GXZZg=; b=FulKWrz/XksriLfdCf5Gq58qHPdjafT85P7M9d4yEc2ZRnLAfIhcY3vXsNafPT2L1npa +Z/pwD45tVVJ0kMo2zcPrLRofmlm5xLNtkTOYmVQ9Lm5sMMsdZfE+s9NklXKjxE1700/ nLdGrFu5Tp7MLOTRpPUtq9VQJWHW4UCLZTR/mShTacE8XCh09r21YnW+ODrAV1KpsHt+ jp0jcUu2joQZtuq0HU677gIa3kfKBsOUmePcJAdEfVodHcj04RDPdf5Ifu8eaU2qAMsJ N5RKM95z9TzUVr+UwGxqrhWghXDkc0x2HJ1VQriszob3BDlRBNcoifQJl3c/usU+0X4D Ug== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tx523tppr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 07:51:36 -0700 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, 24 Oct 2023 07:51:35 -0700 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, 24 Oct 2023 07:51:35 -0700 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id B8F793F7053; Tue, 24 Oct 2023 07:51:34 -0700 (PDT) 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 v2 1/4] octeon_ep: add padding for small packets Date: Tue, 24 Oct 2023 07:51:16 -0700 Message-ID: <20231024145119.2366588-2-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231024145119.2366588-1-srasheed@marvell.com> References: <20231024145119.2366588-1-srasheed@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: KZh7nXVMofJ4lV8HTn3GcWDsQ85IF_Ug X-Proofpoint-ORIG-GUID: KZh7nXVMofJ4lV8HTn3GcWDsQ85IF_Ug X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_15,2023-10-24_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 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, 24 Oct 2023 07:52:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780648902465339482 X-GMAIL-MSGID: 1780648902465339482 |
Series |
Cleanup and optimizations to transmit code
|
|
Commit Message
Shinas Rasheed
Oct. 24, 2023, 2:51 p.m. UTC
Pad small packets to ETH_ZLEN before transmit.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
---
V1->V2:
- New patch
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Tue, 24 Oct 2023 07:51:16 -0700 Shinas Rasheed wrote:
> Pad small packets to ETH_ZLEN before transmit.
The commit message needs to focus on the "why", rather than "what".
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);