From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8F22FA00BE; Wed, 27 May 2020 22:29:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 236201DA5C; Wed, 27 May 2020 22:29:02 +0200 (CEST) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id 0FB911DA5A for ; Wed, 27 May 2020 22:29:01 +0200 (CEST) Received: by mail-oi1-f194.google.com with SMTP id i22so22929304oik.10 for ; Wed, 27 May 2020 13:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R/LBrrvh4i03d7Hi4thYl7AXwp9tPxMqayF4AFPViXA=; b=cHpjyNqDH6sQQ5ruvROawoEnXwOTBC3KsRWpvDM+dT+U6/EpbLciKulrmicPrSFU1l Vf/lsm0VRhKko7dn+G7lHJL+VgKkbHJ5t4dz5am/PYCjRxCT1QYnu8m9mGsKjwloZqQs FKP3Epgl3O0oOG4tWrjFDN8IvrZj2WUqzQTjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R/LBrrvh4i03d7Hi4thYl7AXwp9tPxMqayF4AFPViXA=; b=MS9jT5+TKRGtgaggf12Rcc5Fx2u+ztFmXVc1NdFGACGMP6nePBl9CWyEEqlWIRxY+D lM6c6rR2bR6jgzPTs0YL/y/fVuvgrz4NdD4n7uMmsTcnyIZ8aarqZ0INXj1mZOoXJ5gc Nb1Tqn3qfb7X77xV0+RlDY5FmvVC0Gd6JB613RbjYAaFG/j6kyFEwl0wpLSlsuuu/HqF 2iZqO4hp1DhYnO8iUGLLEXJdH4FE+E2tbDR9prpC8a18IrGAks497JIZ6npDo1VYvjfU JvKM/rUy5PFnqNuxGP3aCHlEQkvC/F4DOuXoxVVXcztL0126l5FLK+aQb+xZtfz7wur3 xLMg== X-Gm-Message-State: AOAM531hasMa7JYhdGFZRItdpbbD0gwVDulXxhqh1x1Dv65dPFdwJHpd MyPpPUPO0W0X6UBwaXwV9YzkZUFyPVjx/TGBTlT5kA== X-Google-Smtp-Source: ABdhPJz5cfJ0kA+EpMeOPKQfwcHt4gsQzAp48RgIsYPpuRjhayr0NUjc3Xft1ui2KRKHQlBNg5cdgx9LNxhrf1GZGTs= X-Received: by 2002:aca:4d04:: with SMTP id a4mr4013209oib.27.1590611340205; Wed, 27 May 2020 13:29:00 -0700 (PDT) MIME-Version: 1.0 References: <1590191701-8420-1-git-send-email-michael.baucom@broadcom.com> In-Reply-To: From: Ajit Khaparde Date: Wed, 27 May 2020 13:28:44 -0700 Message-ID: To: Ferruh Yigit Cc: Mike Baucom , dpdk-dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: allow the mark to use a cfa code of zero X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Wed, May 27, 2020 at 8:47 AM Ferruh Yigit wrote: > On 5/23/2020 12:55 AM, Mike Baucom wrote: > > The mark code was too restrictive by disallowing a cfa_code of zero. > > This code loosens the requirement and allows zero. > > I can see "if (cfa_code)" check removed, but can you please give some > details > that what it the impact of having that check and why change has been done. > > Also it is not clear what "cfa code" is, if it has a significance can you > please > describe it as well. > In the ingress path, the cfa_code field in Rx completion identifies the CFA action rule that was used for the incoming packet. It is possible that the packet could hit the rule at index 0 in the table. The mark action code was too restrictive by disallowing a cfa_code of zero. This code in the patch loosens the requirement and allows zero. I will update the commit log with the same verbiage. Thanks Ajit > > > > > Fixes: b87abb2e55cb ("net/bnxt: support marking packet") > > > > Signed-off-by: Mike Baucom > > Reviewed-by: Kishore Padmanabha > > --- > > drivers/net/bnxt/bnxt_rxr.c | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > > index ee1acb1..91ff729 100644 > > --- a/drivers/net/bnxt/bnxt_rxr.c > > +++ b/drivers/net/bnxt/bnxt_rxr.c > > @@ -465,17 +465,15 @@ static inline struct rte_mbuf *bnxt_tpa_end( > > break; > > } > > > > - if (cfa_code) { > > - rc = ulp_mark_db_mark_get(bp->ulp_ctx, gfid, > > - cfa_code, &mark_id); > > - if (!rc) { > > - /* Got the mark, write it to the mbuf and return */ > > - mbuf->hash.fdir.hi = mark_id; > > - mbuf->udata64 = (cfa_code & 0xffffffffull) << 32; > > - mbuf->hash.fdir.id = rxcmp1->cfa_code; > > - mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; > > - return; > > - } > > + rc = ulp_mark_db_mark_get(bp->ulp_ctx, gfid, > > + cfa_code, &mark_id); > > + if (!rc) { > > + /* Got the mark, write it to the mbuf and return */ > > + mbuf->hash.fdir.hi = mark_id; > > + mbuf->udata64 = (cfa_code & 0xffffffffull) << 32; > > + mbuf->hash.fdir.id = rxcmp1->cfa_code; > > + mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID; > > + return; > > } > > > > skip_mark: > > > >