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 5D03A41E99; Wed, 15 Mar 2023 06:52:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5AF040A7A; Wed, 15 Mar 2023 06:52:51 +0100 (CET) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by mails.dpdk.org (Postfix) with ESMTP id 78F91400EF for ; Wed, 15 Mar 2023 06:52:50 +0100 (CET) Received: by mail-vs1-f47.google.com with SMTP id t4so668520vsq.1 for ; Tue, 14 Mar 2023 22:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678859570; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4JpzkWAQz0chVEZd0jV/PuwdSyqMMOq5s3xflMo9Li4=; b=pOXu2yWCZso6QazeKXZJ89FuAHEyqtZ0EegMS5Jm8oJaaolmbSrbtRLR42B6Mb7rJ3 DwA5i9mQLt5OrQ6Atxe/v7+R47J7E2BsDLzyFEZ4yptzOMgK3o/cgcwZkwhCWQR7xemY felRA70Mp8RxzdjEKovrF1WhNhHwF2Z+sQ2+4kWOm3/YA1X4+MBFKWDIYnw1odctWGGm fwzJjTmKA80cIjNtNCEgd/+WdDVhUTfm2OSGklCTSeTmNPz9J/rNMcvDh39WmLeMjomI +T/bPz0i3ng2rKb/gSoY3lug/dYT6qDAft/SS+QS++8jkTH2TQ2I9xxtfaGWAkBjlSDX 8hXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678859570; h=content-transfer-encoding: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=4JpzkWAQz0chVEZd0jV/PuwdSyqMMOq5s3xflMo9Li4=; b=vZExkz79VomYlw3MFSTRCQ//BIzmRNU2/8MqFCf1H2Lrzq/UkFvsP+gBY3+kNGZZOk 9pVcF4Fw4jiFHiRVJnEbRUHu6EO9QCiwP/BUqk+m4QPUN+s8f+ES6l1dIdxcSGcO3bIU OpC7fpMaV80ZHj5/cNAbrrBY5GdrUaV9GzHc8Xh7YoG266F+UyTSPbI5/F2EAFvH6pyI i/v5jB/mz7nxIpze9mh0rqPxu/mNGPFNLSi9Gp8nhaI0tDKTB5xZQXEzMFqFs4oNYOR8 SgHadUT+x77QnVMvzHN0pW7YMROSz7mIqc45/xnFfVzQBC+hmckIkba8nE+KRGdY8CFO ADyA== X-Gm-Message-State: AO0yUKW1lx4MS/QjNuLrwYg+fWZEYg1byYAdqxdJaec8rnJPpxT0x/o4 uMLhDoJv+7EJx8QZk89QvaxL93VBo+QRC8wpYTvdCV7Vc0VJrg== X-Google-Smtp-Source: AK7set/+VuP68pdkwBHjQBRCYIyGZqH0oG7/4N4OV7F7DpoI2TAq2AmjPffKcGsqawKsx7XxWs1kw141ByRdkiZnrh0= X-Received: by 2002:a67:fd7a:0:b0:416:f1ea:1001 with SMTP id h26-20020a67fd7a000000b00416f1ea1001mr25941420vsa.5.1678859569727; Tue, 14 Mar 2023 22:52:49 -0700 (PDT) MIME-Version: 1.0 References: <20230313052403.230953-1-psatheesh@marvell.com> <20230313052403.230953-2-psatheesh@marvell.com> In-Reply-To: <20230313052403.230953-2-psatheesh@marvell.com> From: Jerin Jacob Date: Wed, 15 Mar 2023 11:22:23 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH 2/2] common/cnxk: fix SPI to SA index destroy To: psatheesh@marvell.com Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Mon, Mar 13, 2023 at 10:54=E2=80=AFAM wrote: > > From: Satheesh Paul > > While destroying SPI to SA index rule, inline device > mbox should be used. Adding changes to fix this. > > Fixes: 04087b781484 ("common/cnxk: support SPI to SA index") Merged only 2/2 for rc3 as it is a fix. Applied to dpdk-next-net-mrvl/for-next-net. Thanks > > Signed-off-by: Kiran Kumar K > Signed-off-by: Satheesh Paul > --- > drivers/common/cnxk/roc_npc.c | 14 ++++++++++---- > drivers/common/cnxk/roc_npc_mcam.c | 8 ++++---- > 2 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.= c > index 7228cffb57..ba75207955 100644 > --- a/drivers/common/cnxk/roc_npc.c > +++ b/drivers/common/cnxk/roc_npc.c > @@ -1503,16 +1503,22 @@ npc_rss_group_free(struct npc *npc, struct roc_np= c_flow *flow) > static int > roc_npc_delete_spi_to_sa_action(struct roc_npc *roc_npc, struct roc_npc_= flow *flow) > { > - struct roc_nix *roc_nix =3D roc_npc->roc_nix; > struct nix_spi_to_sa_delete_req *req; > + struct nix_inl_dev *inl_dev; > + struct idev_cfg *idev; > struct mbox *mbox; > - struct nix *nix; > + > + PLT_SET_USED(roc_npc); > > if (!flow->spi_to_sa_info.has_action || flow->spi_to_sa_info.dupl= icate) > return 0; > > - nix =3D roc_nix_to_nix_priv(roc_nix); > - mbox =3D (&nix->dev)->mbox; > + idev =3D idev_get_cfg(); > + if (!idev) > + return -1; > + > + inl_dev =3D idev->nix_inl_dev; > + mbox =3D inl_dev->dev.mbox; > req =3D mbox_alloc_msg_nix_spi_to_sa_delete(mbox); > if (req =3D=3D NULL) > return -ENOSPC; > diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc= _npc_mcam.c > index 948c446312..72892be300 100644 > --- a/drivers/common/cnxk/roc_npc_mcam.c > +++ b/drivers/common/cnxk/roc_npc_mcam.c > @@ -96,10 +96,10 @@ int > npc_mcam_free_all_entries(struct npc *npc) > { > struct npc_mcam_free_entry_req *req; > - struct mbox *mbox =3D npc->mbox; > + struct mbox *mbox =3D mbox_get(npc->mbox); > int rc =3D -ENOSPC; > > - req =3D mbox_alloc_msg_npc_mcam_free_entry(mbox_get(mbox)); > + req =3D mbox_alloc_msg_npc_mcam_free_entry(mbox); > if (req =3D=3D NULL) > goto exit; > req->all =3D 1; > @@ -354,10 +354,10 @@ npc_mcam_alloc_entry(struct npc *npc, struct roc_np= c_flow *mcam, > { > struct npc_mcam_alloc_entry_req *req; > struct npc_mcam_alloc_entry_rsp *rsp; > - struct mbox *mbox =3D npc->mbox; > + struct mbox *mbox =3D mbox_get(npc->mbox); > int rc =3D -ENOSPC; > > - req =3D mbox_alloc_msg_npc_mcam_alloc_entry(mbox_get(mbox)); > + req =3D mbox_alloc_msg_npc_mcam_alloc_entry(mbox); > if (req =3D=3D NULL) > goto exit; > req->contig =3D 1; > -- > 2.39.2 >