From patchwork Mon Sep 5 13:32:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 115913 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0CBBDA0558; Mon, 5 Sep 2022 15:33:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05E30427F2; Mon, 5 Sep 2022 15:32:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1B8FE4114A for ; Mon, 5 Sep 2022 15:32:48 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 285CjKRv024186 for ; Mon, 5 Sep 2022 06:32:47 -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=7CUVtEcAqWTqlbTvCBM6rf6xuraOgvHrHlK82mD8+Wk=; b=jz/CMFw/gMa6aLsZmW1nI2ha/ksjNpIrVfcuh4RcHHV2oBy9+xIVizKgo6/H7T3EmiyM 90tJUkfpXnCVEPlCsK8EyTiXQ6nrG/SjGJ+mm3/7n2pWZ4lNGRcFbUkNG/Vku/bL+1ru IRvE84BD8fQr4wwomGksvvVW7hB6XSBtAO4vQ+jKg/JQkejgK74vSMEBBmAMt3a2KqMx 3VGO/30QD+Jugkcue3L9qTbPDdaIyJmKjIz1gyYL/ilwyhpJSG5PB5MXDQ2nqHNdidnl hoFo7TOorjQEyHIyKTO7mAvde8hyEGc/zuE8y44ayzMqvUwg6IHPlzSqinJkpTYQ3PVs Hw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jc6epngcj-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 05 Sep 2022 06:32:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 5 Sep 2022 06:32:46 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 5 Sep 2022 06:32:46 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 236485E6867; Mon, 5 Sep 2022 06:32:43 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 05/31] net/cnxk: fix missing fc wait for outbound path in vec mode Date: Mon, 5 Sep 2022 19:02:02 +0530 Message-ID: <20220905133228.818616-5-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905133228.818616-1-ndabilpuram@marvell.com> References: <20220809184908.24030-1-ndabilpuram@marvell.com> <20220905133228.818616-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Gy2A8h7AHjRtVHkDLEgs42WbU_REnftR X-Proofpoint-GUID: Gy2A8h7AHjRtVHkDLEgs42WbU_REnftR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-05_09,2022-09-05_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix missing fc wait for outbound path in vector mode. Currently only poll mode has it. Fixes: 358d02d20a2f ("net/cnxk: support flow control for outbound inline") Cc: ndabilpuram@marvell.com Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn10k_tx.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 8056510589..07c88a974e 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -1049,9 +1049,13 @@ cn10k_nix_xmit_pkts(void *tx_queue, uint64_t *ws, struct rte_mbuf **tx_pkts, /* Submit CPT instructions if any */ if (flags & NIX_TX_OFFLOAD_SECURITY_F) { + uint16_t sec_pkts = ((c_lnum << 1) + c_loff); + /* Reduce pkts to be sent to CPT */ - burst -= ((c_lnum << 1) + c_loff); - cn10k_nix_sec_fc_wait(txq, (c_lnum << 1) + c_loff); + burst -= sec_pkts; + if (flags & NIX_TX_VWQE_F) + cn10k_nix_vwqe_wait_fc(txq, sec_pkts); + cn10k_nix_sec_fc_wait(txq, sec_pkts); cn10k_nix_sec_steorl(c_io_addr, c_lmt_id, c_lnum, c_loff, c_shft); } @@ -1199,9 +1203,13 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, uint64_t *ws, /* Submit CPT instructions if any */ if (flags & NIX_TX_OFFLOAD_SECURITY_F) { + uint16_t sec_pkts = ((c_lnum << 1) + c_loff); + /* Reduce pkts to be sent to CPT */ - burst -= ((c_lnum << 1) + c_loff); - cn10k_nix_sec_fc_wait(txq, (c_lnum << 1) + c_loff); + burst -= sec_pkts; + if (flags & NIX_TX_VWQE_F) + cn10k_nix_vwqe_wait_fc(txq, sec_pkts); + cn10k_nix_sec_fc_wait(txq, sec_pkts); cn10k_nix_sec_steorl(c_io_addr, c_lmt_id, c_lnum, c_loff, c_shft); } @@ -2753,7 +2761,11 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws, /* Submit CPT instructions if any */ if (flags & NIX_TX_OFFLOAD_SECURITY_F) { - cn10k_nix_sec_fc_wait(txq, (c_lnum << 1) + c_loff); + uint16_t sec_pkts = (c_lnum << 1) + c_loff; + + if (flags & NIX_TX_VWQE_F) + cn10k_nix_vwqe_wait_fc(txq, sec_pkts); + cn10k_nix_sec_fc_wait(txq, sec_pkts); cn10k_nix_sec_steorl(c_io_addr, c_lmt_id, c_lnum, c_loff, c_shft); }