From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CD03440F1 for ; Tue, 28 May 2024 09:05:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23C8140A84; Tue, 28 May 2024 09:05:51 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 165D540697; Tue, 28 May 2024 09:05:47 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44RJsCCH011102; Tue, 28 May 2024 00:05:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=7 dg8fEe+N3T+CSE3oEfMqhxjluQtG8Vbtcbseje11so=; b=EE2XAZajU5Ycjn+ZT nd9mR565m9qf8acS59l8U9m5NAvhm6oWThR76nrsvnbuoWhsVtBsTaAplxEv6xao z3UsWFTqKWr7Igbx7YfkGnbzQ3SdagPY6Siz8Wrjhtm5JzZLUEqvfksp91d5XAqq KBzQNyOPOPDy4PDlHXsgabWzVBsPKi4E5kFqOPfxeyre949nDiVjovWvRnM++ou/ f92VIlnOKNrKQiX6n5oMpvNT4rL1DuOHsRqREwDt+LeZ6NMXO3sbYeS9CxI+gveW Mo/7Wmz2tyTAg/cBBT40Lk8aOVsghnSbvuTKOF+VFjh9lOg040G0sj4jKmYBOmuC Ps5Sg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ycqpykr15-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 00:05:47 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 28 May 2024 00:05:46 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 28 May 2024 00:05:46 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id DF54E3F709B; Tue, 28 May 2024 00:05:43 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , , Subject: [PATCH v2 07/10] net/cnxk: fix issue with outbound security higher pkt burst Date: Tue, 28 May 2024 12:35:19 +0530 Message-ID: <20240528070522.3857626-7-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240528070522.3857626-1-ndabilpuram@marvell.com> References: <20240517074448.3146611-1-ndabilpuram@marvell.com> <20240528070522.3857626-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: hYpR-hvwmQtJ0nPzjRK82JAk_zfahU0I X-Proofpoint-ORIG-GUID: hYpR-hvwmQtJ0nPzjRK82JAk_zfahU0I X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_04,2024-05-27_01,2024-05-17_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Fix issue with outbound security path while handling mixed traffic i.e both plain and inline outbound pkts being present as part of burst and burst size is > 32. The loop needs to be broken when we don't have space for 4 pkts in LMT lines for CPT considering both the full lmt lines and partial lmt lines used. Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k") Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn10k_tx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 3818b0445a..84b08403c0 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -2272,7 +2272,8 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws, } for (i = 0; i < burst; i += NIX_DESCS_PER_LOOP) { - if (flags & NIX_TX_OFFLOAD_SECURITY_F && c_lnum + 2 > 16) { + if (flags & NIX_TX_OFFLOAD_SECURITY_F && + (((int)((16 - c_lnum) << 1) - c_loff) < 4)) { burst = i; break; } -- 2.25.1