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 9F601A0553 for ; Mon, 13 Jun 2022 09:27:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E63A410DD; Mon, 13 Jun 2022 09:27:15 +0200 (CEST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mails.dpdk.org (Postfix) with ESMTP id 9C55140150; Mon, 13 Jun 2022 09:27:13 +0200 (CEST) Received: by mail-qk1-f172.google.com with SMTP id 68so3433029qkk.9; Mon, 13 Jun 2022 00:27:13 -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=3OrmBB5aQiGBhaoEjC34pW/x9+rjar0ut9LzEehEzMY=; b=f5v0zxZgVHKBO0QCKS9QGghXVMNEujllkqUJpp/mOwbNxm9xM694z1GUGGMiRUGzbb 7AIpny6F1qumkOqaQpe0r7TLkiagJ57mrlJef9S/Eqni22ZYf8AAEbKjzkiRpaoNcBBF GQ8YskcbHyGckM44vpxbilAr0taeFn6XkZdc4xk+VUmamyTOQVbww7s8AAQXnXep55fJ zvlO/xt8iRhApLNn6bDb4/qGRJfrXD6hVckn7jcoNNLzUy3UqZXPqjzh363UiQDcjkwr qWwZqm6+z3H5vrXGk8f5wd7WpnH9/Nem9MpnMZhdozTJCMHJkdS+4rCKNK/29z/RbfrU 1VEw== 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=3OrmBB5aQiGBhaoEjC34pW/x9+rjar0ut9LzEehEzMY=; b=El+8iFAYmAiVp0h7ziJ76u6TwCbpWmbIQy7YLCLhWPEcksNLGZKGOe/Frte0lx0+78 iuGixJyyQn+JHW6OpZ6l/hMvnsulC4eQAJn6SvkDm0TUfKdymMQt99rsgkm4KAoasmqz mX+yUYpgTkOgRR4JD3L0RkBuTewFrf73UtcqtBnIRdxYder6bRwdcQ4NhSi5z/De6dBS fog7KJgBuwPnmjyXRYWZ6kG038rBnNcDeB0dHML3mjwBFpjfXIXH4x1WO66H0qLexR/2 j2THRffpbNiUWiZHqMB92iNEffWvaiVHhZAPp2xTE5B6Zd0Q5RAWb4AAJSbH9CE5vrPB DOdw== X-Gm-Message-State: AOAM531EB0GW+2Qk11BF4UFqGCvnP0Vjv2h+7izM2Ohb4Q6AP/XiYhh/ Nb5NMqigJGHK8Ixeuc1TvAdYCHFfyTLfD+swARo= X-Google-Smtp-Source: ABdhPJyLJOGzUVPLLomBRIEQLWwNEDbLcNwq0p1efsny3m/ut0uiYzjRE6kfil8BvpivP/2Zgxg8M4TdlZ+BeakYzOI= X-Received: by 2002:ae9:e851:0:b0:6a7:5a0f:f7b9 with SMTP id a78-20020ae9e851000000b006a75a0ff7b9mr9454172qkg.316.1655105232979; Mon, 13 Jun 2022 00:27:12 -0700 (PDT) MIME-Version: 1.0 References: <20220502084730.609989-1-psatheesh@marvell.com> In-Reply-To: <20220502084730.609989-1-psatheesh@marvell.com> From: Jerin Jacob Date: Mon, 13 Jun 2022 12:56:47 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH] common/cnxk: fix channel number setting in MCAM entries To: Satheesh Paul Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Mon, May 2, 2022 at 2:17 PM wrote: > > From: Satheesh Paul > > Adding changes to accommodate the following requirements > while masking the channel number. > 1. For CN10K device, channel number should not be masked > for first pass rules with RTE_FLOW_ACTION_TYPE_SECURITY > action. And channel number should be masked for all > other flow rules. > 2. For CN9K device channel number should not be masked. > > Fixes: 29dcc20985 ("common/cnxk: support for CPT second pass flow rules") Not correct. Updated as Fixes: 4968b362b639 ("common/cnxk: support CPT second pass flow rules") > Cc: stable@dpdk.org > > Signed-off-by: Satheesh Paul > Reviewed-by: Kiran Kumar Kokkilagadda Updated as Reviewed-by: Kiran Kumar K Please check this in future patches, Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > drivers/common/cnxk/roc_npc_mcam.c | 30 ++++++++++++++++++------------ > 1 file changed, 18 insertions(+), 12 deletions(-) > > diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c > index bccbaaa51f..0ae58da0ba 100644 > --- a/drivers/common/cnxk/roc_npc_mcam.c > +++ b/drivers/common/cnxk/roc_npc_mcam.c > @@ -508,19 +508,25 @@ npc_mcam_set_channel(struct roc_npc_flow *flow, > req->entry_data.kw_mask[0] &= ~(GENMASK(11, 0)); > flow->mcam_data[0] &= ~(GENMASK(11, 0)); > flow->mcam_mask[0] &= ~(GENMASK(11, 0)); > + chan = channel; > + mask = chan_mask; > > - if (is_second_pass) { > - chan = (channel | NIX_CHAN_CPT_CH_START); > - mask = (chan_mask | NIX_CHAN_CPT_CH_START); > - } else { > - /* > - * Clear bits 10 & 11 corresponding to CPT > - * channel. By default, rules should match > - * both first pass packets and second pass > - * packets from CPT. > - */ > - chan = (channel & NIX_CHAN_CPT_X2P_MASK); > - mask = (chan_mask & NIX_CHAN_CPT_X2P_MASK); > + if (roc_model_runtime_is_cn10k()) { > + if (is_second_pass) { > + chan = (channel | NIX_CHAN_CPT_CH_START); > + mask = (chan_mask | NIX_CHAN_CPT_CH_START); > + } else { > + if (!(flow->npc_action & NIX_RX_ACTIONOP_UCAST_IPSEC)) { > + /* > + * Clear bits 10 & 11 corresponding to CPT > + * channel. By default, rules should match > + * both first pass packets and second pass > + * packets from CPT. > + */ > + chan = (channel & NIX_CHAN_CPT_X2P_MASK); > + mask = (chan_mask & NIX_CHAN_CPT_X2P_MASK); > + } > + } > } > > req->entry_data.kw[0] |= (uint64_t)chan; > -- > 2.25.4 >