From: Yongseok Koh <yskoh@mellanox.com>
To: Nikhil Rao <nikhil.rao@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH 17.11] eventdev: fix eth Rx adapter hotplug incompatibility
Date: Thu, 17 Jan 2019 06:57:53 +0000 [thread overview]
Message-ID: <9C35488E-A31C-4953-B49C-B1DF37605D43@mellanox.com> (raw)
In-Reply-To: <1547701973-146997-1-git-send-email-nikhil.rao@intel.com>
> On Jan 16, 2019, at 9:12 PM, Nikhil Rao <nikhil.rao@intel.com> wrote:
>
> [ backported from 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 <nikhil.rao@intel.com>
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
Applied to stable/17.11
Thanks,
Yongseok
> lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> index de4cf73..3688b8e 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -900,7 +900,7 @@ static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter,
> rx_adapter->conf_arg = conf_arg;
> strcpy(rx_adapter->mem_name, mem_name);
> rx_adapter->eth_devices = rte_zmalloc_socket(rx_adapter->mem_name,
> - rte_eth_dev_count() *
> + RTE_MAX_ETHPORTS *
> sizeof(struct eth_device_info), 0,
> socket_id);
> rte_convert_rss_key((const uint32_t *)default_rss_key,
> @@ -913,7 +913,7 @@ static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter,
> return -ENOMEM;
> }
> rte_spinlock_init(&rx_adapter->rx_lock);
> - for (i = 0; i < rte_eth_dev_count(); i++)
> + for (i = 0; i < RTE_MAX_ETHPORTS; i++)
> rx_adapter->eth_devices[i].dev = &rte_eth_devices[i];
>
> event_eth_rx_adapter[id] = rx_adapter;
> --
> 1.8.3.1
>
prev parent reply other threads:[~2019-01-17 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 5:12 Nikhil Rao
2019-01-17 6:57 ` Yongseok Koh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9C35488E-A31C-4953-B49C-B1DF37605D43@mellanox.com \
--to=yskoh@mellanox.com \
--cc=nikhil.rao@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).