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 0CCE942474; Tue, 24 Jan 2023 09:53:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5CB040150; Tue, 24 Jan 2023 09:53:13 +0100 (CET) Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) by mails.dpdk.org (Postfix) with ESMTP id 42A68400EF for ; Tue, 24 Jan 2023 09:53:12 +0100 (CET) Received: by mail-vk1-f179.google.com with SMTP id l129so7271864vkh.6 for ; Tue, 24 Jan 2023 00:53:12 -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=RepBzCqBftR1X8peGCi83pgNamVe+hEee2Rf7Cyzgnc=; b=Pra1JrlSw6qAIo/4vBLK80eS2LVdxV6t0cnv6zgyXo5bXZllqpcDUKC0D/3mv9Jwv8 rd+95P2d8VO2K4Gs/N7ska/sR3zaYO2KqoVMkGP9+bUXbhnwTsMihfEQVVVH+GDEzOQY QDCFQd3F9McQNbY/ewHnWlSDtdUWWJ4VDu9q/IuDXCM1/Bxv9F8PRMLURtN8SAxBDY0G ofhATCL9C5BQq/SBi4fNflWpS3dgUGOfTxsaGtUMd49gBrG8U5ub95DDiHcuZfHCHqjn QQObK2IEwze2IzYRvRnXcBCcFgARa1zSPZc7WRFzwMApBkSDa2A3wfjBHHMsETurQgYa DNIg== 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=RepBzCqBftR1X8peGCi83pgNamVe+hEee2Rf7Cyzgnc=; b=Z8k/oQi/Xg0CNZ/10t7MhwuA9Z7ajTlXN51p0z/imYwWqnybsxWPI2AWEfBhVvWVoL Kahct5oO6wiK8k0d7uPLqrs/A89rUO9EWBZgwhofylLzJRG4Twwu3fYXEOAkMZM2y43p 9lK/VEAohHp68ft0Mc0uww8pn6fNqTSQcUvO2GKgkwRWzkB+eZ//1pgv5IKiOyVEAKNl bT89ZIYkttB8/GYoMNVZGSHK3Ms+ow8y3h9w0V/KWCkDKgThgrplE93kknKPplsl1iqH 2zu7hLv0NsOb622/3V6rJkmbDUfkT9JXO2rYb/p0s7y7kpTcoWKhtWxT2EmE2go6GXL6 KIqg== X-Gm-Message-State: AFqh2koeth5hE7HysKSC4QEmzyOykIYtzM9QPxR5YvE0/Nk5bWomfFsP 2r/q6nnbX5fNm01m7bX/LkF6CGEGHfymPWYkyKNx4DWjI68ZIA== X-Google-Smtp-Source: AMrXdXvZtblhi6lTx1kNF+DpLFe6Q7Zwe3/+LKU3vir+avP6/UdWz+eezZzq6YqybbBSRbpdLrd+gCsXvfr0OpG+EO8= X-Received: by 2002:a1f:9e0d:0:b0:3e1:9d4e:e7d7 with SMTP id h13-20020a1f9e0d000000b003e19d4ee7d7mr3272599vke.20.1674550391414; Tue, 24 Jan 2023 00:53:11 -0800 (PST) MIME-Version: 1.0 References: <20221209134121.1757306-1-rbhansali@marvell.com> <20230119055315.915251-1-rbhansali@marvell.com> In-Reply-To: <20230119055315.915251-1-rbhansali@marvell.com> From: Jerin Jacob Date: Tue, 24 Jan 2023 14:22:45 +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 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 > --- > 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 >