DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Nikhil Rao <nikhil.rao@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] eventdev: fix eth Rx adapter hotplug incompatibility
Date: Thu, 20 Sep 2018 12:07:59 +0530	[thread overview]
Message-ID: <20180920063758.GA2283@jerin> (raw)
In-Reply-To: <1536225103-181590-1-git-send-email-nikhil.rao@intel.com>

-----Original Message-----
> Date: Thu, 6 Sep 2018 14:41:42 +0530
> From: Nikhil Rao <nikhil.rao@intel.com>
> To: jerin.jacob@caviumnetworks.com
> CC: dev@dpdk.org, Nikhil Rao <nikhil.rao@intel.com>, stable@dpdk.org
> Subject: [PATCH 1/2] eventdev: fix eth Rx adapter hotplug incompatibility
> X-Mailer: git-send-email 1.8.3.1
> 
> 
> 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>


> ---
>  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 f5e5a0b..870ac8c 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -1998,8 +1998,7 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter,
>         rx_adapter->id = 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);
>         rte_convert_rss_key((const uint32_t *)default_rss_key,
> @@ -2012,7 +2011,7 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter,
>                 return -ENOMEM;
>         }
>         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];
> 
>         event_eth_rx_adapter[id] = rx_adapter;
> diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
> index 332ee21..863b72a 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h
> @@ -76,10 +76,6 @@
>   * rte_event_eth_rx_adapter_cb_register() function allows the
>   * 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.
>   */
> 
>  #ifdef __cplusplus
> --
> 1.8.3.1
> 

  parent reply	other threads:[~2018-09-20  6:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  9:11 Nikhil Rao
2018-09-06  9:11 ` [dpdk-dev] [PATCH 2/2] test/eventdev: remove eth Rx adapter vdev workaround Nikhil Rao
2018-09-20  6:38   ` Jerin Jacob
2018-09-20  6:37 ` Jerin Jacob [this message]
2018-09-23  8:31 ` [dpdk-dev] [PATCH 1/2] eventdev: fix eth Rx adapter hotplug incompatibility Jerin Jacob

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=20180920063758.GA2283@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --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).