[dpdk-stable] patch 'eventdev: fix eth Rx adapter hotplug incompatibility' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Wed Nov 21 17:47:17 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/27/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 692226c81eda26e0bbd5643cd8a2d9a6789e8c67 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao at intel.com>
Date: Thu, 6 Sep 2018 14:41:42 +0530
Subject: [PATCH] eventdev: fix eth Rx adapter hotplug incompatibility

[ upstream commit d7b5f102c4781bd2e9a952243eb59cffe135b01c ]

Use RTE_MAX_ETHPORTS instead of rte_eth_dev_count_total()
when allocating eth Rx adapter's per-eth device data structure
to account for hotplugged devices.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")

Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 5 ++---
 lib/librte_eventdev/rte_event_eth_rx_adapter.h | 4 ----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index f5e5a0b53..870ac8c3b 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -1999,6 +1999,5 @@ rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
 	strcpy(rx_adapter->mem_name, mem_name);
 	rx_adapter->eth_devices = rte_zmalloc_socket(rx_adapter->mem_name,
-					/* FIXME: incompatible with hotplug */
-					rte_eth_dev_count_total() *
+					RTE_MAX_ETHPORTS *
 					sizeof(struct eth_device_info), 0,
 					socket_id);
@@ -2013,5 +2012,5 @@ rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
 	}
 	rte_spinlock_init(&rx_adapter->rx_lock);
-	RTE_ETH_FOREACH_DEV(i)
+	for (i = 0; i < RTE_MAX_ETHPORTS; i++)
 		rx_adapter->eth_devices[i].dev = &rte_eth_devices[i];
 
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
index 332ee2160..863b72a10 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
@@ -77,8 +77,4 @@
  * application to register a callback that selects which packets to enqueue
  * to the event device.
- *
- * Note:
- * 1) Devices created after an instance of rte_event_eth_rx_adapter_create
- *  should be added to a new instance of the rx adapter.
  */
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 16:44:31.046929561 +0000
+++ 0003-eventdev-fix-eth-Rx-adapter-hotplug-incompatibility.patch	2018-11-21 16:44:30.000000000 +0000
@@ -1,14 +1,15 @@
-From d7b5f102c4781bd2e9a952243eb59cffe135b01c Mon Sep 17 00:00:00 2001
+From 692226c81eda26e0bbd5643cd8a2d9a6789e8c67 Mon Sep 17 00:00:00 2001
 From: Nikhil Rao <nikhil.rao at intel.com>
 Date: Thu, 6 Sep 2018 14:41:42 +0530
 Subject: [PATCH] eventdev: fix eth Rx adapter hotplug incompatibility
 
+[ upstream commit d7b5f102c4781bd2e9a952243eb59cffe135b01c ]
+
 Use RTE_MAX_ETHPORTS instead of rte_eth_dev_count_total()
 when allocating eth Rx adapter's per-eth device data structure
 to account for hotplugged devices.
 
 Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
 Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>


More information about the stable mailing list