DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath functions
@ 2018-07-24 10:43 Pavan Nikhilesh
  2018-07-24 15:39 ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2018-07-24 10:43 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, ferruh.yigit; +Cc: dev, Pavan Nikhilesh

On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
a SEGFAULT in cases where control path calls stop and a paket is still
being processed by a worker.
Instead clear the fastpath functions in dev_close.

Fixes: da6c687471a3 ("net/octeontx: add start and stop support")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 1eb453b21..8fe868678 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -352,6 +352,9 @@ octeontx_dev_close(struct rte_eth_dev *dev)
 
 		rte_free(txq);
 	}
+
+	dev->tx_pkt_burst = NULL;
+	dev->rx_pkt_burst = NULL;
 }
 
 static int
@@ -445,9 +448,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
 			     ret);
 		return;
 	}
-
-	dev->tx_pkt_burst = NULL;
-	dev->rx_pkt_burst = NULL;
 }
 
 static void
-- 
2.18.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath functions
  2018-07-24 10:43 [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath functions Pavan Nikhilesh
@ 2018-07-24 15:39 ` Jerin Jacob
  2018-08-02  8:01   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2018-07-24 15:39 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: santosh.shukla, ferruh.yigit, dev

-----Original Message-----
> Date: Tue, 24 Jul 2018 16:13:50 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com,
>  ferruh.yigit@intel.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath
>  functions
> X-Mailer: git-send-email 2.18.0
> 
> On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
> a SEGFAULT in cases where control path calls stop and a paket is still
> being processed by a worker.
> Instead clear the fastpath functions in dev_close.
> 
> Fixes: da6c687471a3 ("net/octeontx: add start and stop support")

Cc: stable@dpdk.org

> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  drivers/net/octeontx/octeontx_ethdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> index 1eb453b21..8fe868678 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -352,6 +352,9 @@ octeontx_dev_close(struct rte_eth_dev *dev)
>  
>  		rte_free(txq);
>  	}
> +
> +	dev->tx_pkt_burst = NULL;
> +	dev->rx_pkt_burst = NULL;
>  }
>  
>  static int
> @@ -445,9 +448,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
>  			     ret);
>  		return;
>  	}
> -
> -	dev->tx_pkt_burst = NULL;
> -	dev->rx_pkt_burst = NULL;
>  }
>  
>  static void
> -- 
> 2.18.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath functions
  2018-07-24 15:39 ` Jerin Jacob
@ 2018-08-02  8:01   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-08-02  8:01 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dev, Jerin Jacob, santosh.shukla, ferruh.yigit

> > On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
> > a SEGFAULT in cases where control path calls stop and a paket is still
> > being processed by a worker.
> > Instead clear the fastpath functions in dev_close.
> > 
> > Fixes: da6c687471a3 ("net/octeontx: add start and stop support")
> 
> Cc: stable@dpdk.org
> 
> > 
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks

Renamed "fastpath" to "Rx/Tx" to be more explicit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-02  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 10:43 [dpdk-dev] [PATCH] net/octeontx: fix stop clearing fastpath functions Pavan Nikhilesh
2018-07-24 15:39 ` Jerin Jacob
2018-08-02  8:01   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).