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 C484C42474; Tue, 24 Jan 2023 09:53:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6F2140A89; Tue, 24 Jan 2023 09:53:50 +0100 (CET) Received: from mail-vk1-f180.google.com (mail-vk1-f180.google.com [209.85.221.180]) by mails.dpdk.org (Postfix) with ESMTP id CDDBB400EF for ; Tue, 24 Jan 2023 09:53:49 +0100 (CET) Received: by mail-vk1-f180.google.com with SMTP id 12so7264491vkj.12 for ; Tue, 24 Jan 2023 00:53:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cYmybiH4b/mESZcmGSjGjFCcfFlCbP7dSX0pEtmi0do=; b=KCt9DaNWUPvLBRxgVy1YeptNtoxImGJP9Uy05b8Copo1wstK2mjxNiADLVHPRbuySt 8tC15p57Cxvr2ySuyxeVSRkuqZ4675O/ht2ckwY1ehuRjiK8hPZBe66NjMx+u0gjokne LXrJhQIiwGvsXJFOwI2+/ygmzPVXTqYp2vq2YlZpjhSoS++5aU3Al0hqCYQzRdKMdtO9 silIXbTu21I/m2vdNbBIZCN/dxQG+dgnMxtdQvjhVaPRUBKq8nacA5wdGej+w+sd5h9g ufyU/YpU6NMHhw1odEQAHnQpFeDvs9X+fGGnaTyErcw+oIcFGIVfP8/a8i2Y9Ikkneqn VNZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cYmybiH4b/mESZcmGSjGjFCcfFlCbP7dSX0pEtmi0do=; b=WUSEXPJaPFKpNQChIsdNKLm6LmAFjXrzz+5vCE3mDUQYNYv2diVcFi0Kdc9i2BM0f4 OeKrqcpDlZRjG8vYJrXGA+rqFoG1EqyWmba4oNlg8FPPLfB55b+D8YDm1fwiN7KdQ2ui B3uw47tqTp78ODqlub0V3SFdf0pS76PQYfGlY7RReqQ7pMixFDhpgPDjev34sw6t9hSX giCAh429sLCI9Vz5hiSrrnOKQDFJTdq6VnG0baK4GMK5mwRudIz5/GO2gQI8s5CtzRb6 S16hHj3gcCC/AzUHcDl2hJZG5T5AWEBYhDHuUpoR+eJXzHsXTi9sA9BWkJkdKIVpypFq BStg== X-Gm-Message-State: AFqh2krgKDiHAjplZvCB1r8NvxG4DmQNsbhuxKjP5WJNMFhEJ19L1C4h uJw2psjpzauHdARGPHQRlojryC7yzqXSA1GQl3vfYaAajDb2sQ== X-Google-Smtp-Source: AMrXdXtM7CQ+kA0aQtcAdcMJv2E9zBS4NJD3LCZOeg6VKTYWAezPDmtobZw7X16oBiN9xzOPPJFm9KDZ8lU1+5yVMLI= X-Received: by 2002:a1f:5dc1:0:b0:3e1:9fdf:7740 with SMTP id r184-20020a1f5dc1000000b003e19fdf7740mr3518559vkb.20.1674550429183; Tue, 24 Jan 2023 00:53:49 -0800 (PST) MIME-Version: 1.0 References: <20221209134121.1757306-1-rbhansali@marvell.com> <20230119055315.915251-1-rbhansali@marvell.com> In-Reply-To: From: Jerin Jacob Date: Tue, 24 Jan 2023 14:23:22 +0530 Message-ID: Subject: Re: [PATCH v2] event/cnxk: wait for CPT flow control on WQE path To: Rahul Bhansali Cc: dev@dpdk.org, Pavan Nikhilesh , Shijith Thotton , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , jerinj@marvell.com Content-Type: text/plain; charset="UTF-8" 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 On Tue, Jan 24, 2023 at 2:22 PM Jerin Jacob wrote: > > On Thu, Jan 19, 2023 at 11:23 AM Rahul Bhansali wrote: > > > > This is to avoid CPT queue overflow and thereby a CPT misc > > interrupt. > > > > Fixes: 1a7da795f64 ("net/cnxk: support Tx security offload on cn9k") > > > > Signed-off-by: Rahul Bhansali > > Acked-by: Jerin Jacob Applied to dpdk-next-net-eventdev/for-main. Thanks > > > > --- > > Changes in v2: Updated commit message. > > > > drivers/event/cnxk/cn9k_worker.h | 1 + > > drivers/net/cnxk/cn9k_tx.h | 10 ++++++++++ > > 2 files changed, 11 insertions(+) > > > > diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h > > index 54213db3b4..1ce4b044e8 100644 > > --- a/drivers/event/cnxk/cn9k_worker.h > > +++ b/drivers/event/cnxk/cn9k_worker.h > > @@ -730,6 +730,7 @@ cn9k_sso_hws_xmit_sec_one(const struct cn9k_eth_txq *txq, uint64_t base, > > > > rte_io_wmb(); > > cn9k_sso_txq_fc_wait(txq); > > + cn9k_nix_sec_fc_wait_one(txq); > > > > /* Write CPT instruction to lmt line */ > > vst1q_u64(lmt_addr, cmd01); > > diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h > > index 17bbdce3a0..b4ef45d65c 100644 > > --- a/drivers/net/cnxk/cn9k_tx.h > > +++ b/drivers/net/cnxk/cn9k_tx.h > > @@ -411,6 +411,16 @@ cn9k_nix_xmit_prep_lmt(uint64_t *cmd, void *lmt_addr, const uint32_t flags) > > roc_lmt_mov(lmt_addr, cmd, cn9k_nix_tx_ext_subs(flags)); > > } > > > > +static __rte_always_inline void > > +cn9k_nix_sec_fc_wait_one(const struct cn9k_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 uint64_t > > cn9k_nix_xmit_submit_lmt(const rte_iova_t io_addr) > > { > > -- > > 2.25.1 > >