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 E2236A0032; Tue, 28 Sep 2021 12:05:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C634340E3C; Tue, 28 Sep 2021 12:05:58 +0200 (CEST) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by mails.dpdk.org (Postfix) with ESMTP id D01A640DF6 for ; Tue, 28 Sep 2021 12:05:56 +0200 (CEST) Received: by mail-io1-f54.google.com with SMTP id i62so10557751ioa.6 for ; Tue, 28 Sep 2021 03:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LiYO85MRe667md8kLZnbQl+7YytTiIzz1FR/w+e9r0o=; b=NpfYa031ewcPt4xysUj55iJ8r5UNY6xK+v3D1NitGELwd8ybKxBASqDSVHh/LtVQDg 1aYg/LL8mkaElGBsFsPrlYrFO5C88ZQu0cxcHXJBaBAN3hxwjrkf9MuL3XL3O4NXfUqF 427X7Hv1+eGhKuVJB6rN2iTtvq7eJeCZjADiDO6Vvd4wyqrE52FAD6/tyHpwowLgOJWf MIOEmjQm5cydoICdKoxoMjNcskGIrmKkv1VO3WfTex4I2w7xnf11PcM8YSRXNJsCYJx+ fGJmoE9hh3HJ/2Qtau4U82yk5lR3yavVXALS3hwsdomWwMk/v6e0Uj+Qf0YzqFq6QB7I vj0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LiYO85MRe667md8kLZnbQl+7YytTiIzz1FR/w+e9r0o=; b=utP6AKwydkeh5GR3Qy9/8Je9m6A4x/JlXan+gueyr/kuF6YxK6OoiQU/vsphCfmaGj u/czDqkH3V6wyxPO2PNKtwPBGrn3eUJ0VWeKQIsRq7YnT7hmvIkF26IVPrqjWHblFY/R v7xe3R2WQINpPSKH44SMgZjN0op27WO21dI7RfoWcIk4Dh4jDksUGGAWjewhpC1y2SQY L/h/lrxK+GhDMxjx51JJvQoDz1EyZ8mrJ8tcOU+3rHk06Wv7mWtJQUpDDElmIsLPNeMQ ZNptgjiujIu8XuDpKmDkhgWxl/MriiyTYKMih/KL2Th4RoTs0bUYiGdLg1Shm5VMdx0R Ed1w== X-Gm-Message-State: AOAM532EfpVF0MRd5jFWBs8gmZlpb8e8ky9HHUxtw0UFNowpvK7MHQS0 LL6Cnw9Azu4e0Z/gb2xycfqNuNocstLkeVPBB/Q= X-Google-Smtp-Source: ABdhPJzONLNRIbYnXATXvEuUJueMSZzs2GBoHMTU7Sp+XeEGL9wyfJemLJrHy+6yEF+yXbQser9cVcGCxpM4zYH8wiY= X-Received: by 2002:a05:6638:35ac:: with SMTP id v44mr3838031jal.48.1632823556243; Tue, 28 Sep 2021 03:05:56 -0700 (PDT) MIME-Version: 1.0 References: <20210730161009.14383-1-hkalra@marvell.com> In-Reply-To: <20210730161009.14383-1-hkalra@marvell.com> From: Jerin Jacob Date: Tue, 28 Sep 2021 15:35:30 +0530 Message-ID: To: Harman Kalra , Ferruh Yigit Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/2] common/cnxk: setup nix and lbk in loop mode in 98xx 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 Sender: "dev" On Fri, Jul 30, 2021 at 9:40 PM Harman Kalra wrote: > > In case of 98xx, 2 NIX blocks and 4 LBK blocks are present. Moreover > AF VFs are alternatively attached to NIX0 and NIX1 to ensure load > balancing. To support loopback functionality between pairs NIX0/NIX1 > are attached to LBK1/LBK2 for transmission/reception respectively. > But in this default configuration NIX blocks cannot receive the > packets they sent from the same LBK, which is an important requirement > as some ODP applications only uses one AF VF for loopback functionality. > To support this scenario, NIX0 can use LBK0 (NIX1 - LBK3) by setting a > loop flag while making LF alloc mailbox request. > > Signed-off-by: Harman Kalra Changed the subject to : common/cnxk: support loop mode for cn98xx Series Acked-by: Jerin Jacob Series applied to dpdk-next-net-mrvl/for-next-net. Thanks. > --- > drivers/common/cnxk/roc_mbox.h | 1 + > drivers/common/cnxk/roc_nix.c | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h > index b5da931b81..75d1ff1ef3 100644 > --- a/drivers/common/cnxk/roc_mbox.h > +++ b/drivers/common/cnxk/roc_mbox.h > @@ -723,6 +723,7 @@ struct nix_lf_alloc_req { > uint64_t __io rx_cfg; /* See NIX_AF_LF(0..127)_RX_CFG */ > uint64_t __io way_mask; > #define NIX_LF_RSS_TAG_LSB_AS_ADDER BIT_ULL(0) > +#define NIX_LF_LBK_BLK_SEL BIT_ULL(1) > uint64_t flags; > }; > > diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c > index 23d508b941..1621f77fb0 100644 > --- a/drivers/common/cnxk/roc_nix.c > +++ b/drivers/common/cnxk/roc_nix.c > @@ -145,9 +145,12 @@ roc_nix_lf_alloc(struct roc_nix *roc_nix, uint32_t nb_rxq, uint32_t nb_txq, > req->npa_func = idev_npa_pffunc_get(); > req->sso_func = idev_sso_pffunc_get(); > req->rx_cfg = rx_cfg; > + if (roc_nix_is_lbk(roc_nix) && roc_nix->enable_loop && > + roc_model_is_cn98xx()) > + req->flags = NIX_LF_LBK_BLK_SEL; > > if (!roc_nix->rss_tag_as_xor) > - req->flags = NIX_LF_RSS_TAG_LSB_AS_ADDER; > + req->flags |= NIX_LF_RSS_TAG_LSB_AS_ADDER; > > rc = mbox_process_msg(mbox, (void *)&rsp); > if (rc) > -- > 2.18.0 >