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 4E0C6A0032; Mon, 12 Sep 2022 15:17:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA9FB42B9C; Mon, 12 Sep 2022 15:16: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 D96B442B9B for ; Mon, 12 Sep 2022 15:16:50 +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 28BMuYaT011824 for ; Mon, 12 Sep 2022 06:16:50 -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=fAYd2LEIBGRA4civXPUN0+AY5o0LsvO0bjwR6P5jU9TcEBur+s9+eu5h6ZZlo0f9hALz E9zXY06ZtyVgvOhXtbv39qYAdaZX6OdHQNIehsQ3Mu3PQi/SVVUwSwmuGHCIF1KgCB9D vUrqjBAFDjmjbeJvDljj3ZX5XbI/tYn68ynbdpuTBVIQgWROLgtyv465NPTyNxmY6cBG v0YS7YpVsrKP5OToI/r0s6GNPfzXOXxCHUo8uNW5cfR/5c5Tdhzie9xSiBsvwBayyjOR hLhPd5x1TtX0MBxA58FHfPgpV37e0AOtS3NCKIH/i966s8q/g+3t4fPwFZSlhasUV8pW ew== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jgt3mxt7a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 12 Sep 2022 06:16:50 -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, 12 Sep 2022 06:16:48 -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, 12 Sep 2022 06:16:48 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 0A7B73F70A0; Mon, 12 Sep 2022 06:16:45 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v3 26/32] event/cnxk: wait for CPT fc on wqe path Date: Mon, 12 Sep 2022 18:44:19 +0530 Message-ID: <20220912131425.1973415-26-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912131425.1973415-1-ndabilpuram@marvell.com> References: <20220809184908.24030-1-ndabilpuram@marvell.com> <20220912131425.1973415-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: jZZGMQe-H3SR53g2eEGerZdWRK_wKMxv X-Proofpoint-GUID: jZZGMQe-H3SR53g2eEGerZdWRK_wKMxv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-12_08,2022-09-12_01,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) { -- 2.25.1