patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [ PATCH 17.11 1/2] ethdev: clear ethdev data upon detach
@ 2019-03-01 11:53 Reshma Pattan
  2019-03-01 11:53 ` [dpdk-stable] [ PATCH 17.11 2/2] app/pdump: remove created vdevs Reshma Pattan
  2019-03-04 19:57 ` [dpdk-stable] [ PATCH 17.11 1/2] ethdev: clear ethdev data upon detach Yongseok Koh
  0 siblings, 2 replies; 5+ messages in thread
From: Reshma Pattan @ 2019-03-01 11:53 UTC (permalink / raw)
  To: stable; +Cc: Reshma Pattan

When port is detached its relevant rte_eth_dev_data[port_id]
has to be zeroed, otherwise the next port creations
could get wrong port_id.

Fixes: 92d94d3744 ("ethdev: attach or detach port")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 096b35faf..7ba9bc564 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -443,6 +443,7 @@ rte_eth_dev_detach(uint16_t port_id, char *name)
 		goto err;
 
 	rte_eth_devices[port_id].state = RTE_ETH_DEV_UNUSED;
+	memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data));
 	return 0;
 
 err:
-- 
2.17.1

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

end of thread, other threads:[~2019-03-12 21:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 11:53 [dpdk-stable] [ PATCH 17.11 1/2] ethdev: clear ethdev data upon detach Reshma Pattan
2019-03-01 11:53 ` [dpdk-stable] [ PATCH 17.11 2/2] app/pdump: remove created vdevs Reshma Pattan
2019-03-04 19:57 ` [dpdk-stable] [ PATCH 17.11 1/2] ethdev: clear ethdev data upon detach Yongseok Koh
2019-03-12  9:31   ` Pattan, Reshma
2019-03-12 21:53     ` Yongseok Koh

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).