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 3DC6CA0032; Thu, 17 Feb 2022 09:51:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C04D040150; Thu, 17 Feb 2022 09:51:06 +0100 (CET) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by mails.dpdk.org (Postfix) with ESMTP id 367AA40042 for ; Thu, 17 Feb 2022 09:51:05 +0100 (CET) Received: by mail-io1-f41.google.com with SMTP id x13so2806780iop.4 for ; Thu, 17 Feb 2022 00:51:05 -0800 (PST) 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=Xj/BoXjhBEPlk9IMvdk42DuOheqA2cEnqm814w5EhPc=; b=VfI9Yh9u4TguckGznb2/WQwSYL4BSq05S/OSfH5idNy48YpIuIJcTIf8oGpd7haow4 SxsDw7NF3P8tN/KmPSaB92uLoCId8ibzJFoJA9Wboz5TqX/7FTNk9FTW+LJsfNb95CEA 4MSTNTg91vwxHDrOFT/p1YL/zFySJl+Ix7qkGSgFMRRTTLRHirP3C2APWb4hfV9aGLN7 kjM55M+fxfDg5mkbV7RKqbvyPeCdYcZIW3wZWc0hwPViVyzy2tL38Peu27ug67oJA8Cj rEKlrrTOTI5AOT5yqqDp8daSVuUePHJ1Sg7rfWQc9fqbMCyF2ggfslkreFFKLn+nE9MU 2l4A== 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=Xj/BoXjhBEPlk9IMvdk42DuOheqA2cEnqm814w5EhPc=; b=wBDmyU/AQHZTDdId0l3yl46PZp4uZifXsDLEF69s6FlKqeDZnriTVUENkBouOIGVQe U6sJpTAbs1OR2Wq1Wg9wQv8tP2e3dp70al7v/2vAiZ0VCVUrdIZ26lL74rPqDjdof+b7 nZWbWzA+XwFmzpmK0lXJZcdmh54WNXy1dIxn1yVsEMbKdBZq5l5pJPVIMGpPC6nwTi2o 0Oz9JxZPa4tXClSQR7MRY+A4t61xMTovGF3TH24HYqJBlMrkX574lK7y/XbPW3jtCbaF 4kGBG8AL791OWwx1ulTLgK/zPA34s3bvCYHf/UTbSpUofBw3JOz1IffcCtJFochxXsBI JeWA== X-Gm-Message-State: AOAM530DfBM0uY/LCXw6Hzc1jhdlpNU3EYfuuRInLFI/2u5YmGBxvS3a eDxBA87T96cf4tBJNOHcxZk2vgdpqq2z3XWV/w/xzqUOuaU= X-Google-Smtp-Source: ABdhPJwUihI0bzGgrSW8EpuE/WsTVXMiGQ1I9CyIMPCJIK/1iYOjsQC9/HkMGsYq3l9WlbnK/AGpLmCfj9gSpQUq8xc= X-Received: by 2002:a05:6602:2d0d:b0:633:14e4:7753 with SMTP id c13-20020a0566022d0d00b0063314e47753mr1224930iow.121.1645087864407; Thu, 17 Feb 2022 00:51:04 -0800 (PST) MIME-Version: 1.0 References: <20220125093940.910029-1-psatheesh@marvell.com> In-Reply-To: <20220125093940.910029-1-psatheesh@marvell.com> From: Jerin Jacob Date: Thu, 17 Feb 2022 14:20:38 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH] net/cnxk: fix updating Rx/Tx functions in fastpath ops To: Satheesh Paul Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dpdk-dev , Jerin Jacob Kollanukkaran Content-Type: text/plain; charset="UTF-8" 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 Tue, Jan 25, 2022 at 3:09 PM wrote: > > From: Satheesh Paul > > When Rx/Tx functions are updated such as in an rte flow > rule creation with VLAN stripping or marking action, > update the fastpath ops table as well. > > Fixes: b951c2efcb1 ("net/cnxk: add Rx burst for CN9K") > Fixes: f742a9a6681 ("net/cnxk: add Rx burst for CN10K") > > Signed-off-by: Satheesh Paul > Reviewed-by: Jerin Jacob Kollanukkaran Updated the commit as follows and applied to dpdk-next-net-mrvl/for-next-net. Thanks net/cnxk: fix Rx/Tx function update When Rx/Tx functions are updated such as in a rte flow rule creation with VLAN stripping or marking action, update the fastpath ops table as well. Fixes: b951c2efcb1 ("net/cnxk: add Rx burst for CN9K") Fixes: f742a9a6681 ("net/cnxk: add Rx burst for CN10K") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Jerin Jacob > --- > drivers/net/cnxk/cn10k_rx.c | 4 ++++ > drivers/net/cnxk/cn10k_rx_select.c | 4 ++++ > drivers/net/cnxk/cn10k_tx_select.c | 4 ++++ > drivers/net/cnxk/cn9k_rx.c | 4 ++++ > drivers/net/cnxk/cn9k_rx_select.c | 4 ++++ > drivers/net/cnxk/cn9k_tx.c | 4 ++++ > drivers/net/cnxk/cn9k_tx_select.c | 4 ++++ > 7 files changed, 28 insertions(+) > > diff --git a/drivers/net/cnxk/cn10k_rx.c b/drivers/net/cnxk/cn10k_rx.c > index 5d603514c0..15f71b14bd 100644 > --- a/drivers/net/cnxk/cn10k_rx.c > +++ b/drivers/net/cnxk/cn10k_rx.c > @@ -31,6 +31,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, > [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)] > [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_RSS_F)]; > > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = > + eth_dev->rx_pkt_burst; > + > rte_atomic_thread_fence(__ATOMIC_RELEASE); > } > > diff --git a/drivers/net/cnxk/cn10k_rx_select.c b/drivers/net/cnxk/cn10k_rx_select.c > index 5ca18feb1e..60a3688114 100644 > --- a/drivers/net/cnxk/cn10k_rx_select.c > +++ b/drivers/net/cnxk/cn10k_rx_select.c > @@ -15,6 +15,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, > eth_dev->rx_pkt_burst = > rx_burst[dev->rx_offload_flags & (NIX_RX_OFFLOAD_MAX - 1)]; > > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = > + eth_dev->rx_pkt_burst; > + > rte_atomic_thread_fence(__ATOMIC_RELEASE); > } > > diff --git a/drivers/net/cnxk/cn10k_tx_select.c b/drivers/net/cnxk/cn10k_tx_select.c > index 0b8e3f35b9..037ab6f447 100644 > --- a/drivers/net/cnxk/cn10k_tx_select.c > +++ b/drivers/net/cnxk/cn10k_tx_select.c > @@ -14,6 +14,10 @@ pick_tx_func(struct rte_eth_dev *eth_dev, > /* [SEC] [TSP] [TSO] [NOFF] [VLAN] [OL3_OL4_CSUM] [IL3_IL4_CSUM] */ > eth_dev->tx_pkt_burst = > tx_burst[dev->tx_offload_flags & (NIX_TX_OFFLOAD_MAX - 1)]; > + > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = > + eth_dev->tx_pkt_burst; > } > > void > diff --git a/drivers/net/cnxk/cn9k_rx.c b/drivers/net/cnxk/cn9k_rx.c > index 8d504c4a6d..185b643692 100644 > --- a/drivers/net/cnxk/cn9k_rx.c > +++ b/drivers/net/cnxk/cn9k_rx.c > @@ -31,6 +31,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, > [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)] > [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_RSS_F)]; > > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = > + eth_dev->rx_pkt_burst; > + > rte_atomic_thread_fence(__ATOMIC_RELEASE); > } > > diff --git a/drivers/net/cnxk/cn9k_rx_select.c b/drivers/net/cnxk/cn9k_rx_select.c > index d07a5e890c..fb66d9df7c 100644 > --- a/drivers/net/cnxk/cn9k_rx_select.c > +++ b/drivers/net/cnxk/cn9k_rx_select.c > @@ -15,6 +15,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, > eth_dev->rx_pkt_burst = > rx_burst[dev->rx_offload_flags & (NIX_RX_OFFLOAD_MAX - 1)]; > > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = > + eth_dev->rx_pkt_burst; > + > rte_atomic_thread_fence(__ATOMIC_RELEASE); > } > > diff --git a/drivers/net/cnxk/cn9k_tx.c b/drivers/net/cnxk/cn9k_tx.c > index f3f19fed97..f99e5d3e23 100644 > --- a/drivers/net/cnxk/cn9k_tx.c > +++ b/drivers/net/cnxk/cn9k_tx.c > @@ -36,6 +36,10 @@ pick_tx_func(struct rte_eth_dev *eth_dev, > [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_VLAN_QINQ_F)] > [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F)] > [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_L3_L4_CSUM_F)]; > + > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = > + eth_dev->tx_pkt_burst; > } > > void > diff --git a/drivers/net/cnxk/cn9k_tx_select.c b/drivers/net/cnxk/cn9k_tx_select.c > index c1fb2f41d5..a84f74a918 100644 > --- a/drivers/net/cnxk/cn9k_tx_select.c > +++ b/drivers/net/cnxk/cn9k_tx_select.c > @@ -14,6 +14,10 @@ pick_tx_func(struct rte_eth_dev *eth_dev, > /* [TS] [TSO] [NOFF] [VLAN] [OL3_OL4_CSUM] [IL3_IL4_CSUM] */ > eth_dev->tx_pkt_burst = > tx_burst[dev->tx_offload_flags & (NIX_TX_OFFLOAD_MAX - 1)]; > + > + if (eth_dev->data->dev_started) > + rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = > + eth_dev->tx_pkt_burst; > } > > void > -- > 2.25.4 >