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 DED00A04C2; Mon, 25 Nov 2019 14:00:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A667E2952; Mon, 25 Nov 2019 14:00:30 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 54F98A3 for ; Mon, 25 Nov 2019 14:00:29 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id p12so8729112iog.10 for ; Mon, 25 Nov 2019 05:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=syn5gXGSy0kdpb0xexCel/jOuJEFf1ymx3s0ONq4N/c=; b=lwGSpcJWoqZ863WNntUXXe5B/K9HqOAyH/Sznr4XxPBADqGJydkfF1ZEWLkz4Epl4m LlBVYdYCPVfEmyiWM2MdFKaWCuUoYN8RoghB1XegM1S0pGJTBlsKdZILBL9mOPdFIhhi o3Z724qo1u0jPULrImRMvVz0OhPD4XH219v+KWqEDstqur4xqlNFBEMjnVCpuehVjx8r neyuou2giPLix3o+9p+JOjVbKAGanktNmcV8Hk0IQNlGFtA7B0WRe68+Z6zevqmR+VxX 2Z1z8M7iVmvh5xThpDxx2lkydWB4U1L9xFl+j15kUXzjEocSUwOvflqMKiJaN7qkImCK E4UA== 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=syn5gXGSy0kdpb0xexCel/jOuJEFf1ymx3s0ONq4N/c=; b=MzaOfLiLzb7Ot+isVNxuuLv7NeiWiCiQghY4apYmtKeuUsktRTxWnM6Xm8YZqRpIKT jSxHpHvkdYhtZYBHlYdL1gUA8xl+eIGZXA5N92rRh395CVr+R3kgqhk87htlugZLeqSu yiaU59sDEEj7zFSR2AIWTnETcjT6Q18tgHUh7/bXCqnbZovR5yyqRvmbBzCdZU1Pq/Co fwKjeJt9EL10RjhC8SzDe4fUa216UZeLHg2EUAwInGSbK4r97JApMEOB0+qHsCWaHJkx tBQeJsj/uvxOAUHmtgFbwP2jROMJGHst8kUIGg3ndDabciRzid0ONZZH8Azohpb35iiu 4zdg== X-Gm-Message-State: APjAAAUCyXSHqKE0DG/PUr+ZpyiqerM4/7YzD/sBJpwSbdyKiBKUxpzv Wd3QzqyT4ItEnMK9ZrUf0Rg1XFTkDvQ1wM3mSlQ= X-Google-Smtp-Source: APXvYqx5A1O6xymRBAAENqazm/2hZ/jfCXE9PPPp14uBvo1Jwgm81St+8RKfP3yukJRwQmofRhwFvQDqmjvujv7EwU8= X-Received: by 2002:a02:c9c6:: with SMTP id c6mr9328245jap.133.1574686827917; Mon, 25 Nov 2019 05:00:27 -0800 (PST) MIME-Version: 1.0 References: <20191123085832.1730-1-pbhagavatula@marvell.com> In-Reply-To: <20191123085832.1730-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Mon, 25 Nov 2019 22:00:11 +0900 Message-ID: To: Pavan Nikhilesh , Ferruh Yigit Cc: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix ptype parsing disabled by default 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 Sat, Nov 23, 2019 at 5:58 PM wrote: > > From: Pavan Nikhilesh > > Enable Ptype parsing by default, only disable when `rte_eth_dev_set_ptypes` > is called with ptype_mask as 0. > This would enable applications that are dependent on packet type parsing > like l3fwd. > > Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types") > > Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/master. Thanks > --- > drivers/net/octeontx2/otx2_ethdev.c | 4 ++++ > drivers/net/octeontx2/otx2_ethdev.h | 1 + > drivers/net/octeontx2/otx2_lookup.c | 7 +++++-- > 3 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c > index ddab3aa06..eaf7ba917 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -622,6 +622,9 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) > if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP)) > flags |= NIX_RX_OFFLOAD_TSTAMP_F; > > + if (!dev->ptype_disable) > + flags |= NIX_RX_OFFLOAD_PTYPE_F; > + > return flags; > } > > @@ -2168,6 +2171,7 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) > > dev->configured = 0; > dev->drv_inited = true; > + dev->ptype_disable = 0; > dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20); > dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20); > > diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h > index eb1626309..987e7607c 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.h > +++ b/drivers/net/octeontx2/otx2_ethdev.h > @@ -276,6 +276,7 @@ struct otx2_eth_dev { > uint8_t configured_cints; > uint8_t configured_nb_rx_qs; > uint8_t configured_nb_tx_qs; > + uint8_t ptype_disable; > uint16_t nix_msixoff; > uintptr_t base; > uintptr_t lmt_addr; > diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c > index 17c44e20e..bcf2ff4e8 100644 > --- a/drivers/net/octeontx2/otx2_lookup.c > +++ b/drivers/net/octeontx2/otx2_lookup.c > @@ -67,10 +67,13 @@ otx2_nix_ptypes_set(struct rte_eth_dev *eth_dev, uint32_t ptype_mask) > { > struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev); > > - if (ptype_mask) > + if (ptype_mask) { > dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F; > - else > + dev->ptype_disable = 0; > + } else { > dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F; > + dev->ptype_disable = 1; > + } > > otx2_eth_set_rx_function(eth_dev); > > -- > 2.17.1 >