From patchwork Mon Sep 5 13:32:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 115929 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 44C09A0558; Mon, 5 Sep 2022 15:34:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F89242B9D; Mon, 5 Sep 2022 15:33:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 464904282B for ; Mon, 5 Sep 2022 15:33:47 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 285C798v015310 for ; Mon, 5 Sep 2022 06:33:46 -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=av9nrRHYN8FtOwJvljIl/Ly6axkNNkOOuiYZHenWw+0=; b=C5m93EPSeoedZ4ZxsO1TCMNzsOETk0n/Yz0AXJ/broP3RZo+Mug6JzH8f0jUbxlOvvU2 MM68iNHNeBVvjvgs/hBZPyV1w7/sHfwqjfK3/eYuCrxTHDtNZ2l1zdPz2dTwlfg0HCk7 HjH8L5biZe+TiRnD1ryuAdZwUo6VxquqoRcAd81kHF1bnN8PqwTeOCBkQ9bjdEqjF8Aa 2Ir2J6K9umeVXWZ31qSYQkH0JTJasPF5wbqNx1jYPpFoCCZC4+lEAk/L9sr3/gJ5sZFU wFiDfAR3FysZxLzG0JVU/UUR2h0sXvAmg3lcNDwn3XMdUPqpDWK48Um6qKHWtow3m5KS 1A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jc49qdv5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 05 Sep 2022 06:33:46 -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.2; Mon, 5 Sep 2022 06:33:45 -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.2 via Frontend Transport; Mon, 5 Sep 2022 06:33:45 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 90EBD5E6867; Mon, 5 Sep 2022 06:33:42 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 25/31] event/cnxk: wait for CPT fc on wqe path Date: Mon, 5 Sep 2022 19:02:22 +0530 Message-ID: <20220905133228.818616-25-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-GUID: 1IsYCGsNftQI_l4l7FzFA-Sy-OZOoyGd X-Proofpoint-ORIG-GUID: 1IsYCGsNftQI_l4l7FzFA-Sy-OZOoyGd 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 Wait for CPT flow control on WQE path. This is to avoid CPT queue overflow and thereby a CPT misc interrupt. Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn10k_tx.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 07c88a974e..f5205da0e2 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -233,6 +233,16 @@ cn10k_nix_tx_skeleton(struct cn10k_eth_txq *txq, uint64_t *cmd, } } +static __rte_always_inline void +cn10k_nix_sec_fc_wait_one(struct cn10k_eth_txq *txq) +{ + uint64_t nb_desc = txq->cpt_desc; + uint64_t *fc = txq->cpt_fc; + + while (nb_desc <= __atomic_load_n(fc, __ATOMIC_RELAXED)) + ; +} + static __rte_always_inline void cn10k_nix_sec_fc_wait(struct cn10k_eth_txq *txq, uint16_t nb_pkts) {