Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1941674rda; Tue, 24 Oct 2023 07:52:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOUupBAZcDNqY1xJyRVJ8v9jFULnw8z0Wns9j82vNGTezn9cW0xkiyv3q0BHZ3nXepAqN3 X-Received: by 2002:a05:6a21:47ca:b0:142:aced:c643 with SMTP id as10-20020a056a2147ca00b00142acedc643mr2690391pzc.31.1698159135645; Tue, 24 Oct 2023 07:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698159135; cv=none; d=google.com; s=arc-20160816; b=nFMbeKOnICmbTkSSJc71AoUCRM/0lMy5nPkj0UujaMmoDUOmLvA/oeaskafnaTpZzR NxbbrSh6f3tL7r6ijt04PlRnuj7q7sJF57d+Y0+J+huIUBjtPkZFQ0nuDGDgP+dwjazt ifH4ADmYAhNobRwOjBbBFrk4tAU0BDUB8WGm9ekD4LSoXbiVAZYn8Qb2OA8IiyvI2M8g 9Y4v753iHeC9lDP33qDKnXqwznt9VOhaLiYUSiVSAbk0KU1mGxbQmiTdu+iHwgUNDnyh 5auhytWiqA684ZgMDN03eIUFvOgCaVO2F3vW1KHrTPTGJMWruQKQHWTpN6mOxxbsfLxY kiMQ== 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:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d124-20020a633682000000b005b8ede96a0fsi657566pga.77.2023.10.24.07.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; 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:1 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 morse.vger.email (Postfix) with ESMTP id E6B58802DBB0; Tue, 24 Oct 2023 07:52:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343680AbjJXOvr (ORCPT + 99 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 ); 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 To: , CC: , , , , , , , , , , Shinas Rasheed , "Veerasenareddy Burru" , Sathesh Edara , Eric Dumazet 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=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 07:52:11 -0700 (PDT) Pad small packets to ETH_ZLEN before transmit. Signed-off-by: Shinas Rasheed --- V1->V2: - New 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); -- 2.25.1