From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 7F8401B108 for ; Wed, 21 Nov 2018 17:49:35 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFD1898; Wed, 21 Nov 2018 16:49:34 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id D56445C21E; Wed, 21 Nov 2018 16:49:33 +0000 (UTC) From: Kevin Traynor To: Nikhil Rao Cc: Jerin Jacob , dpdk stable Date: Wed, 21 Nov 2018 16:47:17 +0000 Message-Id: <20181121164828.32249-3-ktraynor@redhat.com> In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com> References: <20181121164828.32249-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 21 Nov 2018 16:49:34 +0000 (UTC) Subject: [dpdk-stable] patch 'eventdev: fix eth Rx adapter hotplug incompatibility' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 16:49:35 -0000 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 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 Acked-by: Jerin Jacob --- 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 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@dpdk.org Signed-off-by: Nikhil Rao Acked-by: Jerin Jacob