Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1112184rdh; Fri, 27 Oct 2023 05:17:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGL8+pa4vjPw6c2aMYQ0ZSpnA7WiWhejKvyrL4DbmNdjgcF+QAijVtZZ6hEBSrDHpWKV0F0 X-Received: by 2002:a05:6830:1d67:b0:6bd:c74e:f222 with SMTP id l7-20020a0568301d6700b006bdc74ef222mr2401503oti.34.1698409072747; Fri, 27 Oct 2023 05:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698409072; cv=none; d=google.com; s=arc-20160816; b=uYvPQzXM8qWcDbj5mc9kJgMP6YHxzUHkr6MBX12KjYbaDXGf3y5WkgwirNw1s1Ij6v j8NMqGCN6JWTgrwPFRcVkEZbz1n5AB1KkrhQnZxVNa+9HTdZbiDU9U7MyDPryjHHzOvB nKAoASWUHKOCb8E1hsTP6qKhnXLPg0VP5xsboNlm9/Ty7aB1w5LsvLd+p5+q9hX6hSvw 1KeuSHWjvQbtsxFkEPzVk34yaJcAzKs3n9WrRfdQgr3IXenBsRWXKp59MDPx3Cstn+k3 jvyVOqGEqTzEWx5jOxBbnq7X6y9RKstdt+UbAKEYT5cUkt4a/E0RWb9Vvat58mmvOczR I0vg== 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=i5oaCyj28ZtcJA1ErUqS7IXxbYTs5SKx3pDufCs0EfFMZnHXUSVkM/W/ACn9kyjTqu YDZCts2nyYXViGbWNjpksptwbXE0IhSMZbwu35LH+sE4r80nMqGRejYjvbyFydI9bxVw COqDXqtK41/xR/oBukws9AoqHW2QR6engdWLo81eqfSSqBd7udwC7HVX52iBodevGQyD AsiQ//zUaX09q9obugAbmdcMLCcoqERokHF7paWknXb3tBPfuE1Xvx5WI1e4ccl4bOIi qRx1vgeCyQuPUY0RhGdXuIvhv2QKZkezHWCqa07PZihDE+JNXQFUbTVBDNTeQOtxoOG8 /gxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=j+y6QEij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id o125-20020a0de583000000b00586d684a9a1si2257417ywe.517.2023.10.27.05.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 05:17:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=j+y6QEij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 6A9FA832C2FA; Fri, 27 Oct 2023 05:17:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345814AbjJ0MRG (ORCPT + 99 others); Fri, 27 Oct 2023 08:17:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345804AbjJ0MRF (ORCPT ); Fri, 27 Oct 2023 08:17:05 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A3E129; Fri, 27 Oct 2023 05:17:02 -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 39R5TnCT012403; Fri, 27 Oct 2023 05:16:55 -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=NgILK9wtLyMUAwzUUpKcc8XDHZhA7pOaSTnLVOywbdQ=; b=j+y6QEijy0fZMfGbAOS4xBaehRxdN8Ze6q+Ts8jT+fxvSFTezgdCg7gHqlRV/FSnxZXl 4aL3cZpb+LiTKnb9PdvSwPXTubnmaSatKKhRka+UT+YME7g18qES6qW/B8i8KTVZUXaX sFz5JUqS8sYKerEjQEMh2WsMU7YiGh6a3gbjDFpMcDdRavHX1EpFnzmrZeIdpRqckneM odY5GzbsJNc/hu3T56igKotHe3OWFTSQnurScM7UdOYT6lYUX/HNJXpBMoe9lOfdSWK+ df4jNVajIyjxFteVuOAToI1uB3usBaVweG4xt2piqnBz7msLuU0zB0I45zCM8Qi6dE5o BQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tywr83b2x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 27 Oct 2023 05:16:55 -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; Fri, 27 Oct 2023 05:16:54 -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; Fri, 27 Oct 2023 05:16:54 -0700 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id D8F7D3F7050; Fri, 27 Oct 2023 05:16:53 -0700 (PDT) From: Shinas Rasheed To: , CC: , , , , , , , , , , Shinas Rasheed , "Veerasenareddy Burru" , Sathesh Edara , Eric Dumazet Subject: [PATCH net-next v3 1/4] octeon_ep: add padding for small packets Date: Fri, 27 Oct 2023 05:16:36 -0700 Message-ID: <20231027121639.2382565-2-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231027121639.2382565-1-srasheed@marvell.com> References: <20231027121639.2382565-1-srasheed@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 3qNwm5EDD6Rh59n-SfkWgtZXvZghafBr X-Proofpoint-ORIG-GUID: 3qNwm5EDD6Rh59n-SfkWgtZXvZghafBr 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-10-27_10,2023-10-27_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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 05:17:26 -0700 (PDT) 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 --- 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); -- 2.25.1