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 746F344048 for ; Fri, 17 May 2024 09:45:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02AF2406B4; Fri, 17 May 2024 09:45:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 711E7406BC; Fri, 17 May 2024 09:45:15 +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 44H0hhxD026497; Fri, 17 May 2024 00:45:14 -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=7dg8fEe+N3T+CSE3oEfMqhxjluQtG8Vbtcbseje11so=; b=Ten DEkHjEqfuoVO0CejBPg+NC9xdBFPNMPTnTzevlOnDmjh4f7bEjBSFDKlqMh352sV vXbkH1XRTbbXOx4KLtlDejEVFFIooVLCvw7u0K6ejBgwMatEWAJsPb6E/oT8W5rW jqRlJup1/zruYwA82J/1nXIByh8fQZZFYEhX2r4lZm5kCzjNcZExRrtuFMnyR9EF G+1ZM+0M7Q14L/9nc87BxU5Al4BD0Q+PcnOf5Ls/aoyJ0bS7sY1BJcmwjkjrSLC4 493U+QAgXBRaXJOA5j5/3VH5oU84s/mesqJZLskGd3eXHE6LGztKujcSFnutbkPi a2J+cQHIgATecLoGjlw== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3y579bcyk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 May 2024 00:45:14 -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; Fri, 17 May 2024 00:45:14 -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; Fri, 17 May 2024 00:45:14 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id D33B73F708A; Fri, 17 May 2024 00:45:10 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , , Subject: [PATCH 07/10] net/cnxk: fix issue with outbound security higher pkt burst Date: Fri, 17 May 2024 13:14:45 +0530 Message-ID: <20240517074448.3146611-7-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240517074448.3146611-1-ndabilpuram@marvell.com> References: <20240517074448.3146611-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: silZ60KUA1KIKFsQUnuOV6aeaKNThbcY X-Proofpoint-ORIG-GUID: silZ60KUA1KIKFsQUnuOV6aeaKNThbcY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 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