[dpdk-dev] [PATCH v7 01/19] ethdev: add function to release port in local process

Zhang, Qi Z qi.z.zhang at intel.com
Fri Jun 29 01:55:58 CEST 2018



From: Andrew Rybchenko [mailto:arybchenko at solarflare.com]
Sent: Thursday, June 28, 2018 10:34 PM
To: Zhang, Qi Z <qi.z.zhang at intel.com>; thomas at monjalon.net; Burakov, Anatoly <anatoly.burakov at intel.com>
Cc: Ananyev, Konstantin <konstantin.ananyev at intel.com>; dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>; Shelton, Benjamin H <benjamin.h.shelton at intel.com>; Vangati, Narender <narender.vangati at intel.com>
Subject: Re: [dpdk-dev] [PATCH v7 01/19] ethdev: add function to release port in local process

On 06/28/2018 03:56 PM, Qi Zhang wrote:

Add driver API rte_eth_release_port_private to support the

requirement that an ethdev only be released on secondary process,

so only local state be set to unused , share data will not be

Extra space before comma above.



reset so primary process can still use it.



Signed-off-by: Qi Zhang <qi.z.zhang at intel.com><mailto:qi.z.zhang at intel.com>

Acked-by: Remy Horton <remy.horton at intel.com><mailto:remy.horton at intel.com>

---

 lib/librte_ethdev/rte_ethdev.c        | 13 ++++++++++++-

 lib/librte_ethdev/rte_ethdev_driver.h | 13 +++++++++++++

 lib/librte_ethdev/rte_ethdev_pci.h    |  3 +++

 3 files changed, 28 insertions(+), 1 deletion(-)



diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c

index a9977df97..2353fc921 100644

--- a/lib/librte_ethdev/rte_ethdev.c

+++ b/lib/librte_ethdev/rte_ethdev.c

<...>



@@ -371,7 +383,6 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)

        rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);



        eth_dev->state = RTE_ETH_DEV_UNUSED;

-

        memset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data));



        rte_spinlock_unlock(&rte_eth_dev_shared_data->ownership_lock);

Just a nit: above looks like unrelated change.

Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com><mailto:arybchenko at solarflare.com>

will fix both issue in v8.
Thanks,
Qi


More information about the dev mailing list