DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] drivers/net: use internal API to get eth dev from name
@ 2022-02-03  8:24 Kumara Parameshwaran
  2022-02-03 11:09 ` kumaraparameshwaran rathinavel
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Kumara Parameshwaran @ 2022-02-03  8:24 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Kumara Parameshwaran

From: Kumara Parameshwaran <kparameshwar@vmware.com>

Make changes in PMDs to use the new function where
rte_eth_dev_get_port_by_name is used to get port_id
to access rte_eth_devices

Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
---
v1
* Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
  where port_id is used to retrieve rte_eth_dev data structure

 drivers/net/bonding/rte_eth_bond_api.c       | 10 +++++-----
 drivers/net/ipn3ke/ipn3ke_ethdev.c           |  9 +++------
 drivers/net/memif/rte_eth_memif.c            |  7 ++-----
 drivers/net/softnic/rte_eth_softnic_thread.c |  8 +++-----
 drivers/net/tap/rte_eth_tap.c                |  7 ++-----
 5 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 8840d9e17b..b78867b125 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -151,8 +151,8 @@ int
 rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 {
 	struct bond_dev_private *internals;
+	struct rte_eth_dev *bond_dev;
 	char devargs[52];
-	uint16_t port_id;
 	int ret;
 
 	if (name == NULL) {
@@ -169,8 +169,8 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 	if (ret)
 		return ret;
 
-	ret = rte_eth_dev_get_port_by_name(name, &port_id);
-	RTE_ASSERT(!ret);
+	bond_dev = rte_eth_dev_get_by_name(name);
+	RTE_ASSERT(bond_dev);
 
 	/*
 	 * To make bond_ethdev_configure() happy we need to free the
@@ -178,11 +178,11 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 	 *
 	 * Also see comment in bond_ethdev_configure().
 	 */
-	internals = rte_eth_devices[port_id].data->dev_private;
+	internals = bond_dev->data->dev_private;
 	rte_kvargs_free(internals->kvlist);
 	internals->kvlist = NULL;
 
-	return port_id;
+	return bond_dev->data->port_id;
 }
 
 int
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index 014e438dd5..550a8b0466 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -469,7 +469,6 @@ static int ipn3ke_vswitch_probe(struct rte_afu_device *afu_dev)
 	struct ipn3ke_hw *hw;
 	struct rte_eth_dev *i40e_eth;
 	struct ifpga_rawdev *ifpga_dev;
-	uint16_t port_id;
 	int i, j, retval;
 	char *fvl_bdf;
 
@@ -519,14 +518,12 @@ static int ipn3ke_vswitch_probe(struct rte_afu_device *afu_dev)
 
 		for (; j < 8; j++) {
 			fvl_bdf = ifpga_dev->fvl_bdf[j];
-			retval = rte_eth_dev_get_port_by_name(fvl_bdf,
-				&port_id);
-			if (retval) {
+			i40e_eth = rte_eth_dev_get_by_name(fvl_bdf);
+			if (!i40e_eth) {
 				continue;
 			} else {
-				i40e_eth = &rte_eth_devices[port_id];
 				rpst.i40e_pf_eth = i40e_eth;
-				rpst.i40e_pf_eth_port_id = port_id;
+				rpst.i40e_pf_eth_port_id = i40e_eth->data->port_id;
 
 				j++;
 				break;
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index d3459c5007..5700c6a2bf 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -88,17 +88,14 @@ memif_mp_send_region(const struct rte_mp_msg *msg, const void *peer)
 	const struct mp_region_msg *msg_param = (const struct mp_region_msg *)msg->param;
 	struct rte_mp_msg reply;
 	struct mp_region_msg *reply_param = (struct mp_region_msg *)reply.param;
-	uint16_t port_id;
-	int ret;
 
 	/* Get requested port */
-	ret = rte_eth_dev_get_port_by_name(msg_param->port_name, &port_id);
-	if (ret) {
+	dev = rte_eth_dev_get_by_name(msg_param->port_name);
+	if (!dev) {
 		MIF_LOG(ERR, "Failed to get port id for %s",
 			msg_param->port_name);
 		return -1;
 	}
-	dev = &rte_eth_devices[port_id];
 	proc_private = dev->process_private;
 
 	memset(&reply, 0, sizeof(reply));
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index a8c26a5b23..4a9f2fa6a4 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -129,14 +129,12 @@ thread_sc_service_up(struct pmd_internals *softnic, uint32_t thread_id)
 	struct softnic_thread *t = &softnic->thread[thread_id];
 	struct rte_eth_dev *dev;
 	int status;
-	uint16_t port_id;
 
 	/* service params */
-	status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
-	if (status)
-		return status;
+	dev = rte_eth_dev_get_by_name(softnic->params.name);
+	if (!dev)
+		return -EINVAL;
 
-	dev = &rte_eth_devices[port_id];
 	snprintf(service_params.name, sizeof(service_params.name), "%s_%u",
 		softnic->params.name,
 		thread_id);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 111037de65..bc3d56a311 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2428,19 +2428,16 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
 		(const struct ipc_queues *)request->param;
 	struct ipc_queues *reply_param =
 		(struct ipc_queues *)reply.param;
-	uint16_t port_id;
 	int queue;
-	int ret;
 
 	/* Get requested port */
 	TAP_LOG(DEBUG, "Received IPC request for %s", request_param->port_name);
-	ret = rte_eth_dev_get_port_by_name(request_param->port_name, &port_id);
-	if (ret) {
+	dev = rte_eth_dev_get_by_name(request_param->port_name);
+	if (!dev) {
 		TAP_LOG(ERR, "Failed to get port id for %s",
 			request_param->port_name);
 		return -1;
 	}
-	dev = &rte_eth_devices[port_id];
 	process_private = dev->process_private;
 
 	/* Fill file descriptors for all queues */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03  8:24 [PATCH v1] drivers/net: use internal API to get eth dev from name Kumara Parameshwaran
@ 2022-02-03 11:09 ` kumaraparameshwaran rathinavel
  2022-02-03 11:31   ` Ferruh Yigit
  2022-02-03 12:31 ` Ferruh Yigit
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: kumaraparameshwaran rathinavel @ 2022-02-03 11:09 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit, Kumara Parameshwaran

[-- Attachment #1: Type: text/plain, Size: 7130 bytes --]

Ferruh,

Since in the older patch we had introduced rte_eth_dev_get_by_name patch
and had been merged to dpdk-next-net, the current patch failed for the
build when I submitted the patch. Is there a way to enforce it to
dpdk-next-net ?

On Thu, Feb 3, 2022 at 1:54 PM Kumara Parameshwaran <
kumaraparamesh92@gmail.com> wrote:

> From: Kumara Parameshwaran <kparameshwar@vmware.com>
>
> Make changes in PMDs to use the new function where
> rte_eth_dev_get_port_by_name is used to get port_id
> to access rte_eth_devices
>
> Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
> ---
> v1
> * Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
>   where port_id is used to retrieve rte_eth_dev data structure
>
>  drivers/net/bonding/rte_eth_bond_api.c       | 10 +++++-----
>  drivers/net/ipn3ke/ipn3ke_ethdev.c           |  9 +++------
>  drivers/net/memif/rte_eth_memif.c            |  7 ++-----
>  drivers/net/softnic/rte_eth_softnic_thread.c |  8 +++-----
>  drivers/net/tap/rte_eth_tap.c                |  7 ++-----
>  5 files changed, 15 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_api.c
> b/drivers/net/bonding/rte_eth_bond_api.c
> index 8840d9e17b..b78867b125 100644
> --- a/drivers/net/bonding/rte_eth_bond_api.c
> +++ b/drivers/net/bonding/rte_eth_bond_api.c
> @@ -151,8 +151,8 @@ int
>  rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
>  {
>         struct bond_dev_private *internals;
> +       struct rte_eth_dev *bond_dev;
>         char devargs[52];
> -       uint16_t port_id;
>         int ret;
>
>         if (name == NULL) {
> @@ -169,8 +169,8 @@ rte_eth_bond_create(const char *name, uint8_t mode,
> uint8_t socket_id)
>         if (ret)
>                 return ret;
>
> -       ret = rte_eth_dev_get_port_by_name(name, &port_id);
> -       RTE_ASSERT(!ret);
> +       bond_dev = rte_eth_dev_get_by_name(name);
> +       RTE_ASSERT(bond_dev);
>
>         /*
>          * To make bond_ethdev_configure() happy we need to free the
> @@ -178,11 +178,11 @@ rte_eth_bond_create(const char *name, uint8_t mode,
> uint8_t socket_id)
>          *
>          * Also see comment in bond_ethdev_configure().
>          */
> -       internals = rte_eth_devices[port_id].data->dev_private;
> +       internals = bond_dev->data->dev_private;
>         rte_kvargs_free(internals->kvlist);
>         internals->kvlist = NULL;
>
> -       return port_id;
> +       return bond_dev->data->port_id;
>  }
>
>  int
> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> index 014e438dd5..550a8b0466 100644
> --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> @@ -469,7 +469,6 @@ static int ipn3ke_vswitch_probe(struct rte_afu_device
> *afu_dev)
>         struct ipn3ke_hw *hw;
>         struct rte_eth_dev *i40e_eth;
>         struct ifpga_rawdev *ifpga_dev;
> -       uint16_t port_id;
>         int i, j, retval;
>         char *fvl_bdf;
>
> @@ -519,14 +518,12 @@ static int ipn3ke_vswitch_probe(struct
> rte_afu_device *afu_dev)
>
>                 for (; j < 8; j++) {
>                         fvl_bdf = ifpga_dev->fvl_bdf[j];
> -                       retval = rte_eth_dev_get_port_by_name(fvl_bdf,
> -                               &port_id);
> -                       if (retval) {
> +                       i40e_eth = rte_eth_dev_get_by_name(fvl_bdf);
> +                       if (!i40e_eth) {
>                                 continue;
>                         } else {
> -                               i40e_eth = &rte_eth_devices[port_id];
>                                 rpst.i40e_pf_eth = i40e_eth;
> -                               rpst.i40e_pf_eth_port_id = port_id;
> +                               rpst.i40e_pf_eth_port_id =
> i40e_eth->data->port_id;
>
>                                 j++;
>                                 break;
> diff --git a/drivers/net/memif/rte_eth_memif.c
> b/drivers/net/memif/rte_eth_memif.c
> index d3459c5007..5700c6a2bf 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -88,17 +88,14 @@ memif_mp_send_region(const struct rte_mp_msg *msg,
> const void *peer)
>         const struct mp_region_msg *msg_param = (const struct
> mp_region_msg *)msg->param;
>         struct rte_mp_msg reply;
>         struct mp_region_msg *reply_param = (struct mp_region_msg
> *)reply.param;
> -       uint16_t port_id;
> -       int ret;
>
>         /* Get requested port */
> -       ret = rte_eth_dev_get_port_by_name(msg_param->port_name, &port_id);
> -       if (ret) {
> +       dev = rte_eth_dev_get_by_name(msg_param->port_name);
> +       if (!dev) {
>                 MIF_LOG(ERR, "Failed to get port id for %s",
>                         msg_param->port_name);
>                 return -1;
>         }
> -       dev = &rte_eth_devices[port_id];
>         proc_private = dev->process_private;
>
>         memset(&reply, 0, sizeof(reply));
> diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c
> b/drivers/net/softnic/rte_eth_softnic_thread.c
> index a8c26a5b23..4a9f2fa6a4 100644
> --- a/drivers/net/softnic/rte_eth_softnic_thread.c
> +++ b/drivers/net/softnic/rte_eth_softnic_thread.c
> @@ -129,14 +129,12 @@ thread_sc_service_up(struct pmd_internals *softnic,
> uint32_t thread_id)
>         struct softnic_thread *t = &softnic->thread[thread_id];
>         struct rte_eth_dev *dev;
>         int status;
> -       uint16_t port_id;
>
>         /* service params */
> -       status = rte_eth_dev_get_port_by_name(softnic->params.name,
> &port_id);
> -       if (status)
> -               return status;
> +       dev = rte_eth_dev_get_by_name(softnic->params.name);
> +       if (!dev)
> +               return -EINVAL;
>
> -       dev = &rte_eth_devices[port_id];
>         snprintf(service_params.name, sizeof(service_params.name),
> "%s_%u",
>                 softnic->params.name,
>                 thread_id);
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 111037de65..bc3d56a311 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -2428,19 +2428,16 @@ tap_mp_sync_queues(const struct rte_mp_msg
> *request, const void *peer)
>                 (const struct ipc_queues *)request->param;
>         struct ipc_queues *reply_param =
>                 (struct ipc_queues *)reply.param;
> -       uint16_t port_id;
>         int queue;
> -       int ret;
>
>         /* Get requested port */
>         TAP_LOG(DEBUG, "Received IPC request for %s",
> request_param->port_name);
> -       ret = rte_eth_dev_get_port_by_name(request_param->port_name,
> &port_id);
> -       if (ret) {
> +       dev = rte_eth_dev_get_by_name(request_param->port_name);
> +       if (!dev) {
>                 TAP_LOG(ERR, "Failed to get port id for %s",
>                         request_param->port_name);
>                 return -1;
>         }
> -       dev = &rte_eth_devices[port_id];
>         process_private = dev->process_private;
>
>         /* Fill file descriptors for all queues */
> --
> 2.17.1
>
>

[-- Attachment #2: Type: text/html, Size: 9206 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03 11:09 ` kumaraparameshwaran rathinavel
@ 2022-02-03 11:31   ` Ferruh Yigit
  2022-02-07 16:08     ` Ali Alnubani
  0 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-03 11:31 UTC (permalink / raw)
  To: kumaraparameshwaran rathinavel, dev
  Cc: Kumara Parameshwaran, ci, Ali Alnubani

On 2/3/2022 11:09 AM, kumaraparameshwaran rathinavel wrote:
> Ferruh,
> 
> Since in the older patch we had introduced rte_eth_dev_get_by_name patch and had been merged to dpdk-next-net, the current patch failed for the build when I submitted the patch. Is there a way to enforce it to dpdk-next-net ?
> 

CIs apply it onto the main repo, there is a script that chose which
tree to apply, it seems it is not working as expected for the
'drivers/net:' case, cc'ed ci mail list and @Ali for it.

Meanwhile I re-run the community lab tests on top of next-net repo,
still some other checks, like Intel ones, will continue to fail until
patches reach to main tree.

> On Thu, Feb 3, 2022 at 1:54 PM Kumara Parameshwaran <kumaraparamesh92@gmail.com <mailto:kumaraparamesh92@gmail.com>> wrote:
> 
>     From: Kumara Parameshwaran <kparameshwar@vmware.com <mailto:kparameshwar@vmware.com>>
> 
>     Make changes in PMDs to use the new function where
>     rte_eth_dev_get_port_by_name is used to get port_id
>     to access rte_eth_devices
> 
>     Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com <mailto:kparameshwar@vmware.com>>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03  8:24 [PATCH v1] drivers/net: use internal API to get eth dev from name Kumara Parameshwaran
  2022-02-03 11:09 ` kumaraparameshwaran rathinavel
@ 2022-02-03 12:31 ` Ferruh Yigit
  2022-02-04 13:46   ` Ferruh Yigit
  2022-02-03 12:34 ` Ferruh Yigit
  2022-02-03 12:35 ` Ferruh Yigit
  3 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-03 12:31 UTC (permalink / raw)
  To: Kumara Parameshwaran, dev; +Cc: Kumara Parameshwaran

On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
> From: Kumara Parameshwaran <kparameshwar@vmware.com>
> 
> Make changes in PMDs to use the new function where
> rte_eth_dev_get_port_by_name is used to get port_id
> to access rte_eth_devices
> 
> Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
> ---
> v1
> * Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
>    where port_id is used to retrieve rte_eth_dev data structure
> 

Hi Kumara, Thanks for the work.

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03  8:24 [PATCH v1] drivers/net: use internal API to get eth dev from name Kumara Parameshwaran
  2022-02-03 11:09 ` kumaraparameshwaran rathinavel
  2022-02-03 12:31 ` Ferruh Yigit
@ 2022-02-03 12:34 ` Ferruh Yigit
  2022-02-03 12:35 ` Ferruh Yigit
  3 siblings, 0 replies; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-03 12:34 UTC (permalink / raw)
  To: Matan Azrad, Viacheslav Ovsiienko
  Cc: Kumara Parameshwaran, Kumara Parameshwaran, dev

On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
> From: Kumara Parameshwaran<kparameshwar@vmware.com>
> 
> Make changes in PMDs to use the new function where
> rte_eth_dev_get_port_by_name is used to get port_id
> to access rte_eth_devices
> 
> Signed-off-by: Kumara Parameshwaran<kparameshwar@vmware.com>
> ---
> v1
> * Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
>    where port_id is used to retrieve rte_eth_dev data structure

Hi Matan, Slava,

Can you please investigate using 'rte_eth_dev_get_by_name()' internal API
instead of 'rte_eth_dev_get_port_by_name()' to eliminate direct access to
global 'rte_eth_devices' array from mlx5 driver?

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03  8:24 [PATCH v1] drivers/net: use internal API to get eth dev from name Kumara Parameshwaran
                   ` (2 preceding siblings ...)
  2022-02-03 12:34 ` Ferruh Yigit
@ 2022-02-03 12:35 ` Ferruh Yigit
  2022-02-04  9:51   ` Singh, Jasvinder
  3 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-03 12:35 UTC (permalink / raw)
  To: Jasvinder Singh, Cristian Dumitrescu
  Cc: Kumara Parameshwaran, Kumara Parameshwaran, dev

On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
> From: Kumara Parameshwaran<kparameshwar@vmware.com>
> 
> Make changes in PMDs to use the new function where
> rte_eth_dev_get_port_by_name is used to get port_id
> to access rte_eth_devices
> 
> Signed-off-by: Kumara Parameshwaran<kparameshwar@vmware.com>
> ---
> v1
> * Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
>    where port_id is used to retrieve rte_eth_dev data structure

Hi Jasvinder, Cristian,

Can you please investigate using 'rte_eth_dev_get_by_name()' internal API
instead of 'rte_eth_dev_get_port_by_name()' to eliminate direct access to
global 'rte_eth_devices' array from softnic driver?

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03 12:35 ` Ferruh Yigit
@ 2022-02-04  9:51   ` Singh, Jasvinder
  0 siblings, 0 replies; 15+ messages in thread
From: Singh, Jasvinder @ 2022-02-04  9:51 UTC (permalink / raw)
  To: Yigit, Ferruh, Dumitrescu, Cristian
  Cc: Kumara Parameshwaran, Kumara Parameshwaran, dev



> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Thursday, February 3, 2022 12:36 PM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; Kumara
> Parameshwaran <kumaraparamesh92@gmail.com>; dev@dpdk.org
> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
> name
> 
> On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
> > From: Kumara Parameshwaran<kparameshwar@vmware.com>
> >
> > Make changes in PMDs to use the new function where
> > rte_eth_dev_get_port_by_name is used to get port_id to access
> > rte_eth_devices
> >
> > Signed-off-by: Kumara Parameshwaran<kparameshwar@vmware.com>
> > ---
> > v1
> > * Replace rte_eth_get_get_port_by_name in PMDs with
> rte_eth_dev_get_by_name
> >    where port_id is used to retrieve rte_eth_dev data structure
> 
> Hi Jasvinder, Cristian,
> 
> Can you please investigate using 'rte_eth_dev_get_by_name()' internal API
> instead of 'rte_eth_dev_get_port_by_name()' to eliminate direct access to
> global 'rte_eth_devices' array from softnic driver?
> 
> Thanks,
> Ferruh


Hi Ferruh

I addition to the changes that already made in the patch, there are two more places when "'rte_eth_dev_get_port_by_name()" is used to access rte_eth_devices[] array. 

1. In dpdk/drivers/net/softnic/rte_eth_softnic_internals.h , wrapper function is defined for accessing rte_eth_devices[] using 'rte_eth_dev_get_port_by_name (), that could be removed. 
	static inline struct rte_eth_dev * ETHDEV(struct pmd_internals *softnic)

2.  In dpdk/drivers/net/softnic/rte_eth_softnic_flow.c, remove the usage of above wrapper function at 2 places, and 'rte_eth_dev_get_by_name() can be used.


Thanks,
Jasvinder


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03 12:31 ` Ferruh Yigit
@ 2022-02-04 13:46   ` Ferruh Yigit
  0 siblings, 0 replies; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-04 13:46 UTC (permalink / raw)
  To: Kumara Parameshwaran, dev; +Cc: Kumara Parameshwaran

On 2/3/2022 12:31 PM, Ferruh Yigit wrote:
> On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
>> From: Kumara Parameshwaran <kparameshwar@vmware.com>
>>
>> Make changes in PMDs to use the new function where
>> rte_eth_dev_get_port_by_name is used to get port_id
>> to access rte_eth_devices
>>
>> Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
>> ---
>> v1
>> * Replace rte_eth_get_get_port_by_name in PMDs with rte_eth_dev_get_by_name
>>    where port_id is used to retrieve rte_eth_dev data structure
>>
> 
> Hi Kumara, Thanks for the work.
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-03 11:31   ` Ferruh Yigit
@ 2022-02-07 16:08     ` Ali Alnubani
  2022-02-07 16:36       ` Ferruh Yigit
  0 siblings, 1 reply; 15+ messages in thread
From: Ali Alnubani @ 2022-02-07 16:08 UTC (permalink / raw)
  To: Ferruh Yigit, kumaraparameshwaran rathinavel, dev
  Cc: Kumara Parameshwaran, ci

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Thursday, February 3, 2022 1:32 PM
> To: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>;
> dev@dpdk.org
> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; ci@dpdk.org;
> Ali Alnubani <alialnu@nvidia.com>
> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
> name
> 
> On 2/3/2022 11:09 AM, kumaraparameshwaran rathinavel wrote:
> > Ferruh,
> >
> > Since in the older patch we had introduced rte_eth_dev_get_by_name
> patch and had been merged to dpdk-next-net, the current patch failed for
> the build when I submitted the patch. Is there a way to enforce it to dpdk-
> next-net ?
> >
> 
> CIs apply it onto the main repo, there is a script that chose which
> tree to apply, it seems it is not working as expected for the
> 'drivers/net:' case, cc'ed ci mail list and @Ali for it.
> 

Sorry for the delayed response,

The script (https://git.dpdk.org/tools/dpdk-ci/tree/tools/pw_maintainers_cli.py) correctly chooses next-net for this patch:
$ MAINTAINERS_FILE_PATH=/path/to/MAINTAINERS tools/pw_maintainers_cli.py --type patch list-trees 106830
Output: dpdk-next-net

Did the script fail for some reason during this build?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-07 16:08     ` Ali Alnubani
@ 2022-02-07 16:36       ` Ferruh Yigit
  2022-02-07 16:47         ` Ali Alnubani
  0 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-07 16:36 UTC (permalink / raw)
  To: Ali Alnubani, kumaraparameshwaran rathinavel, dev, dpdklab
  Cc: Kumara Parameshwaran, ci

On 2/7/2022 4:08 PM, Ali Alnubani wrote:
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Thursday, February 3, 2022 1:32 PM
>> To: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>;
>> dev@dpdk.org
>> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; ci@dpdk.org;
>> Ali Alnubani <alialnu@nvidia.com>
>> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
>> name
>>
>> On 2/3/2022 11:09 AM, kumaraparameshwaran rathinavel wrote:
>>> Ferruh,
>>>
>>> Since in the older patch we had introduced rte_eth_dev_get_by_name
>> patch and had been merged to dpdk-next-net, the current patch failed for
>> the build when I submitted the patch. Is there a way to enforce it to dpdk-
>> next-net ?
>>>
>>
>> CIs apply it onto the main repo, there is a script that chose which
>> tree to apply, it seems it is not working as expected for the
>> 'drivers/net:' case, cc'ed ci mail list and @Ali for it.
>>
> 
> Sorry for the delayed response,
> 
> The script (https://git.dpdk.org/tools/dpdk-ci/tree/tools/pw_maintainers_cli.py) correctly chooses next-net for this patch:
> $ MAINTAINERS_FILE_PATH=/path/to/MAINTAINERS tools/pw_maintainers_cli.py --type patch list-trees 106830
> Output: dpdk-next-net
> 
> Did the script fail for some reason during this build?

In the community CI, initially it tried to build the patch on top of main repo,
and it failed.

Build looks OK now since I manually triggered re-build it on top of next-net.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-07 16:36       ` Ferruh Yigit
@ 2022-02-07 16:47         ` Ali Alnubani
  2022-02-07 17:25           ` Ferruh Yigit
  0 siblings, 1 reply; 15+ messages in thread
From: Ali Alnubani @ 2022-02-07 16:47 UTC (permalink / raw)
  To: Ferruh Yigit, kumaraparameshwaran rathinavel, dev, dpdklab
  Cc: Kumara Parameshwaran, ci

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Monday, February 7, 2022 6:37 PM
> To: Ali Alnubani <alialnu@nvidia.com>; kumaraparameshwaran rathinavel
> <kumaraparamesh92@gmail.com>; dev@dpdk.org; dpdklab
> <dpdklab@iol.unh.edu>
> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; ci@dpdk.org
> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
> name
> 
> On 2/7/2022 4:08 PM, Ali Alnubani wrote:
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit@intel.com>
> >> Sent: Thursday, February 3, 2022 1:32 PM
> >> To: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>;
> >> dev@dpdk.org
> >> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>;
> ci@dpdk.org;
> >> Ali Alnubani <alialnu@nvidia.com>
> >> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
> >> name
> >>
> >> On 2/3/2022 11:09 AM, kumaraparameshwaran rathinavel wrote:
> >>> Ferruh,
> >>>
> >>> Since in the older patch we had introduced rte_eth_dev_get_by_name
> >> patch and had been merged to dpdk-next-net, the current patch failed
> for
> >> the build when I submitted the patch. Is there a way to enforce it to dpdk-
> >> next-net ?
> >>>
> >>
> >> CIs apply it onto the main repo, there is a script that chose which
> >> tree to apply, it seems it is not working as expected for the
> >> 'drivers/net:' case, cc'ed ci mail list and @Ali for it.
> >>
> >
> > Sorry for the delayed response,
> >
> > The script (https://git.dpdk.org/tools/dpdk-
> ci/tree/tools/pw_maintainers_cli.py) correctly chooses next-net for this
> patch:
> > $ MAINTAINERS_FILE_PATH=/path/to/MAINTAINERS
> tools/pw_maintainers_cli.py --type patch list-trees 106830
> > Output: dpdk-next-net
> >
> > Did the script fail for some reason during this build?
> 
> In the community CI, initially it tried to build the patch on top of main repo,
> and it failed.
> 
> Build looks OK now since I manually triggered re-build it on top of next-net.

Hi Ferruh,

Did the job initially decide to apply on main repo because it was chosen by the script?
Is it possible to see the pw_maintainers_cli.py command that was used and its output?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-07 16:47         ` Ali Alnubani
@ 2022-02-07 17:25           ` Ferruh Yigit
  2022-02-07 19:58             ` Owen Hilyard
  0 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2022-02-07 17:25 UTC (permalink / raw)
  To: Ali Alnubani, kumaraparameshwaran rathinavel, dev, dpdklab
  Cc: Kumara Parameshwaran, ci, Aaron Conole

On 2/7/2022 4:47 PM, Ali Alnubani wrote:
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Monday, February 7, 2022 6:37 PM
>> To: Ali Alnubani <alialnu@nvidia.com>; kumaraparameshwaran rathinavel
>> <kumaraparamesh92@gmail.com>; dev@dpdk.org; dpdklab
>> <dpdklab@iol.unh.edu>
>> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; ci@dpdk.org
>> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
>> name
>>
>> On 2/7/2022 4:08 PM, Ali Alnubani wrote:
>>>> -----Original Message-----
>>>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>>>> Sent: Thursday, February 3, 2022 1:32 PM
>>>> To: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>;
>>>> dev@dpdk.org
>>>> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>;
>> ci@dpdk.org;
>>>> Ali Alnubani <alialnu@nvidia.com>
>>>> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
>>>> name
>>>>
>>>> On 2/3/2022 11:09 AM, kumaraparameshwaran rathinavel wrote:
>>>>> Ferruh,
>>>>>
>>>>> Since in the older patch we had introduced rte_eth_dev_get_by_name
>>>> patch and had been merged to dpdk-next-net, the current patch failed
>> for
>>>> the build when I submitted the patch. Is there a way to enforce it to dpdk-
>>>> next-net ?
>>>>>
>>>>
>>>> CIs apply it onto the main repo, there is a script that chose which
>>>> tree to apply, it seems it is not working as expected for the
>>>> 'drivers/net:' case, cc'ed ci mail list and @Ali for it.
>>>>
>>>
>>> Sorry for the delayed response,
>>>
>>> The script (https://git.dpdk.org/tools/dpdk-
>> ci/tree/tools/pw_maintainers_cli.py) correctly chooses next-net for this
>> patch:
>>> $ MAINTAINERS_FILE_PATH=/path/to/MAINTAINERS
>> tools/pw_maintainers_cli.py --type patch list-trees 106830
>>> Output: dpdk-next-net
>>>
>>> Did the script fail for some reason during this build?
>>
>> In the community CI, initially it tried to build the patch on top of main repo,
>> and it failed.
>>
>> Build looks OK now since I manually triggered re-build it on top of next-net.
> 
> Hi Ferruh,
> 
> Did the job initially decide to apply on main repo because it was chosen by the script?

That is my understanding. Community CI decides which repo to apply based on
your script, as far as I know. But I don't know if there may be any version
difference etc..

> Is it possible to see the pw_maintainers_cli.py command that was used and its output?

I don't know, maybe community CI maintainers may know.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-07 17:25           ` Ferruh Yigit
@ 2022-02-07 19:58             ` Owen Hilyard
  2022-02-10 20:44               ` Yigit, Ferruh
  0 siblings, 1 reply; 15+ messages in thread
From: Owen Hilyard @ 2022-02-07 19:58 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Ali Alnubani, kumaraparameshwaran rathinavel, dev, dpdklab,
	Kumara Parameshwaran, ci, Aaron Conole

[-- Attachment #1: Type: text/plain, Size: 8282 bytes --]

The Community CI hasn't been able to schedule downtime to update dpdk-ci
across all of our systems since the refactoring Ali did. However, the patch
was still applied on next-net and had a compilation error. See
https://lab.dpdk.org/results/dashboard/patchsets/20895/. It was applied
onto
https://git.dpdk.org/next/dpdk-next-net/commit/?id=7445a787de053776616e41ab1d79090bd0f5ce33
.

Owen

Here's the build log in case you were having issues seeing it:

[1/1511] Compiling C object
drivers/librte_net_null.so.22.1.p/meson-generated_.._rte_net_null.pmd.c.o
[2/1511] Compiling C object
drivers/librte_net_octeontx.so.22.1.p/meson-generated_.._rte_net_octeontx.pmd.c.o
[3/1511] Compiling C object
drivers/librte_net_null.a.p/meson-generated_.._rte_net_null.pmd.c.o
[4/1511] Compiling C object
drivers/librte_net_octeontx_ep.so.22.1.p/meson-generated_.._rte_net_octeontx_ep.pmd.c.o
[5/1511] Compiling C object
drivers/librte_net_octeontx.a.p/meson-generated_.._rte_net_octeontx.pmd.c.o
[6/1511] Compiling C object
drivers/librte_net_pcap.so.22.1.p/meson-generated_.._rte_net_pcap.pmd.c.o
[7/1511] Compiling C object
drivers/librte_net_pfe.a.p/meson-generated_.._rte_net_pfe.pmd.c.o
[8/1511] Linking static target drivers/librte_net_null.a
[9/1511] Linking static target drivers/librte_net_octeontx.a
[10/1511] Compiling C object
drivers/net/qede/base/libqede_base.a.p/ecore_init_ops.c.o
[11/1511] Linking static target drivers/librte_net_pfe.a
[12/1511] Linking target drivers/librte_net_mlx5.so.22.1
[13/1511] Linking target drivers/librte_common_sfc_efx.so.22.1
[14/1511] Linking target drivers/librte_common_cnxk.so.22.1
[15/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_hw.c.o
[16/1511] Compiling C object
drivers/librte_net_octeontx_ep.a.p/meson-generated_.._rte_net_octeontx_ep.pmd.c.o
[17/1511] Compiling C object
drivers/net/qede/base/libqede_base.a.p/ecore_init_fw_funcs.c.o
[18/1511] Linking target drivers/librte_net_bond.so.22.1
FAILED: drivers/librte_net_bond.so.22.1
cc  -o drivers/librte_net_bond.so.22.1
drivers/librte_net_bond.so.22.1.p/meson-generated_.._rte_net_bond.pmd.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_8023ad.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_alb.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_api.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_args.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_flow.c.o
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_pmd.c.o
-Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC
-Wl,--start-group -Wl,-soname,librte_net_bond.so.22 -Wl,--no-as-needed
-pthread -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/'
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers
lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1
lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1
lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1
lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1
lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1
lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1
lib/librte_sched.so.22.1 lib/librte_ip_frag.so.22.1
lib/librte_hash.so.22.1 lib/librte_rcu.so.22.1 -Wl,--end-group
-Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/bonding/version.map
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_api.c.o: In
function `rte_eth_bond_create':
rte_eth_bond_api.c:(.text+0x12e6): undefined reference to
`rte_eth_dev_get_by_name'
collect2: error: ld returned 1 exit status
[19/1511] Linking target drivers/librte_net_ipn3ke.so.22.1
FAILED: drivers/librte_net_ipn3ke.so.22.1
cc  -o drivers/librte_net_ipn3ke.so.22.1
drivers/librte_net_ipn3ke.so.22.1.p/meson-generated_.._rte_net_ipn3ke.pmd.c.o
drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_ethdev.c.o
drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_flow.c.o
drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_representor.c.o
drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_tm.c.o
-Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC
-Wl,--start-group -Wl,-soname,librte_net_ipn3ke.so.22
-Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt
'-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/'
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers
lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1
lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1
lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1
lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1
lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1
lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1
drivers/librte_bus_ifpga.so.22.1 lib/librte_rawdev.so.22.1
lib/librte_sched.so.22.1 -Wl,--end-group
-Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/ipn3ke/version.map
drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_ethdev.c.o: In
function `ipn3ke_vswitch_probe':
ipn3ke_ethdev.c:(.text+0x7a2): undefined reference to `rte_eth_dev_get_by_name'
collect2: error: ld returned 1 exit status
[20/1511] Linking target drivers/librte_net_memif.so.22.1
FAILED: drivers/librte_net_memif.so.22.1
cc  -o drivers/librte_net_memif.so.22.1
drivers/librte_net_memif.so.22.1.p/meson-generated_.._rte_net_memif.pmd.c.o
drivers/libtmp_rte_net_memif.a.p/net_memif_memif_socket.c.o
drivers/libtmp_rte_net_memif.a.p/net_memif_rte_eth_memif.c.o
-Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC
-Wl,--start-group -Wl,-soname,librte_net_memif.so.22
-Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt
'-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/'
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib
-Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers
lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1
lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1
lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1
lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1
lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1
lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1
lib/librte_hash.so.22.1 lib/librte_rcu.so.22.1 -Wl,--end-group
-Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/memif/version.map
drivers/libtmp_rte_net_memif.a.p/net_memif_rte_eth_memif.c.o: In
function `memif_mp_send_region':
rte_eth_memif.c:(.text+0x12ce): undefined reference to `rte_eth_dev_get_by_name'
collect2: error: ld returned 1 exit status
[21/1511] Compiling C object
drivers/librte_net_pcap.a.p/meson-generated_.._rte_net_pcap.pmd.c.o
[22/1511] Compiling C object
drivers/librte_net_pfe.so.22.1.p/meson-generated_.._rte_net_pfe.pmd.c.o
[23/1511] Compiling C object
drivers/net/qede/base/libqede_base.a.p/ecore_dev.c.o
[24/1511] Linking static target drivers/librte_net_octeontx_ep.a
[25/1511] Compiling C object
drivers/net/qede/base/libqede_base.a.p/ecore_int.c.o
[26/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_l2.c.o
[27/1511] Generating symbol file
drivers/librte_bus_fslmc.so.22.1.p/librte_bus_fslmc.so.22.1.symbols
[28/1511] Generating symbol file
drivers/librte_bus_dpaa.so.22.1.p/librte_bus_dpaa.so.22.1.symbols
[29/1511] Generating rte_net_ngbe.sym_chk with a custom command
(wrapped by meson to capture output)
[30/1511] Generating symbol file
lib/librte_port.so.22.1.p/librte_port.so.22.1.symbols
[31/1511] Generating rte_net_octeontx.sym_chk with a custom command
(wrapped by meson to capture output)
[32/1511] Generating symbol file
drivers/librte_common_cnxk.so.22.1.p/librte_common_cnxk.so.22.1.symbols
[33/1511] Generating rte_net_pfe.sym_chk with a custom command
(wrapped by meson to capture output)
[34/1511] Generating symbol file
drivers/librte_common_sfc_efx.so.22.1.p/librte_common_sfc_efx.so.22.1.symbols
[35/1511] Generating rte_net_null.sym_chk with a custom command
(wrapped by meson to capture output)
ninja: build stopped: subcommand failed.

[-- Attachment #2: Type: text/html, Size: 8665 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-07 19:58             ` Owen Hilyard
@ 2022-02-10 20:44               ` Yigit, Ferruh
  2022-02-10 22:06                 ` Owen Hilyard
  0 siblings, 1 reply; 15+ messages in thread
From: Yigit, Ferruh @ 2022-02-10 20:44 UTC (permalink / raw)
  To: Owen Hilyard
  Cc: Ali Alnubani, kumaraparameshwaran rathinavel, dev, dpdklab,
	Kumara Parameshwaran, ci, Aaron Conole

[-- Attachment #1: Type: text/plain, Size: 9416 bytes --]

Hi Owen,

I can’t open the link.

But it was initially applied to the main repo, later I manually re-run it on next-net.
Compile error also verifies this [1], ‘rte_eth_dev_get_by_name()’ was added in next-net and missing in the main repo, error is related to API being missing.

Anyway, if the latest script in the CI select ‘next-net’ tree for the patch, I think we are good. Can you please confirm this?


[1]

rte_eth_bond_api.c:(.text+0x12e6): undefined reference to `rte_eth_dev_get_by_name'



From: Owen Hilyard <ohilyard@iol.unh.edu>
Sent: Monday, February 7, 2022 7:59 PM
To: Yigit, Ferruh <ferruh.yigit@intel.com>
Cc: Ali Alnubani <alialnu@nvidia.com>; kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>; dev@dpdk.org; dpdklab <dpdklab@iol.unh.edu>; Kumara Parameshwaran <kparameshwar@vmware.com>; ci@dpdk.org; Aaron Conole <aconole@redhat.com>
Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from name

The Community CI hasn't been able to schedule downtime to update dpdk-ci across all of our systems since the refactoring Ali did. However, the patch was still applied on next-net and had a compilation error. See https://lab.dpdk.org/results/dashboard/patchsets/20895/. It was applied onto https://git.dpdk.org/next/dpdk-next-net/commit/?id=7445a787de053776616e41ab1d79090bd0f5ce33.

Owen

Here's the build log in case you were having issues seeing it:


[1/1511] Compiling C object drivers/librte_net_null.so.22.1.p/meson-generated_.._rte_net_null.pmd.c.o

[2/1511] Compiling C object drivers/librte_net_octeontx.so.22.1.p/meson-generated_.._rte_net_octeontx.pmd.c.o

[3/1511] Compiling C object drivers/librte_net_null.a.p/meson-generated_.._rte_net_null.pmd.c.o

[4/1511] Compiling C object drivers/librte_net_octeontx_ep.so.22.1.p/meson-generated_.._rte_net_octeontx_ep.pmd.c.o

[5/1511] Compiling C object drivers/librte_net_octeontx.a.p/meson-generated_.._rte_net_octeontx.pmd.c.o

[6/1511] Compiling C object drivers/librte_net_pcap.so.22.1.p/meson-generated_.._rte_net_pcap.pmd.c.o

[7/1511] Compiling C object drivers/librte_net_pfe.a.p/meson-generated_.._rte_net_pfe.pmd.c.o

[8/1511] Linking static target drivers/librte_net_null.a

[9/1511] Linking static target drivers/librte_net_octeontx.a

[10/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_init_ops.c.o

[11/1511] Linking static target drivers/librte_net_pfe.a

[12/1511] Linking target drivers/librte_net_mlx5.so.22.1

[13/1511] Linking target drivers/librte_common_sfc_efx.so.22.1

[14/1511] Linking target drivers/librte_common_cnxk.so.22.1

[15/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_hw.c.o

[16/1511] Compiling C object drivers/librte_net_octeontx_ep.a.p/meson-generated_.._rte_net_octeontx_ep.pmd.c.o

[17/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_init_fw_funcs.c.o

[18/1511] Linking target drivers/librte_net_bond.so.22.1

FAILED: drivers/librte_net_bond.so.22.1

cc  -o drivers/librte_net_bond.so.22.1 drivers/librte_net_bond.so.22.1.p/meson-generated_.._rte_net_bond.pmd.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_8023ad.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_alb.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_api.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_args.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_flow.c.o drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_pmd.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_net_bond.so.22 -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1 lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1 lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1 lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1 lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1 lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1 lib/librte_sched.so.22.1 lib/librte_ip_frag.so.22.1 lib/librte_hash.so.22.1 lib/librte_rcu.so.22.1 -Wl,--end-group -Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/bonding/version.map

drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_api.c.o: In function `rte_eth_bond_create':

rte_eth_bond_api.c:(.text+0x12e6): undefined reference to `rte_eth_dev_get_by_name'

collect2: error: ld returned 1 exit status

[19/1511] Linking target drivers/librte_net_ipn3ke.so.22.1

FAILED: drivers/librte_net_ipn3ke.so.22.1

cc  -o drivers/librte_net_ipn3ke.so.22.1 drivers/librte_net_ipn3ke.so.22.1.p/meson-generated_.._rte_net_ipn3ke.pmd.c.o drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_ethdev.c.o drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_flow.c.o drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_representor.c.o drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_tm.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_net_ipn3ke.so.22 -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1 lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1 lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1 lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1 lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1 lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1 drivers/librte_bus_ifpga.so.22.1 lib/librte_rawdev.so.22.1 lib/librte_sched.so.22.1 -Wl,--end-group -Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/ipn3ke/version.map

drivers/libtmp_rte_net_ipn3ke.a.p/net_ipn3ke_ipn3ke_ethdev.c.o: In function `ipn3ke_vswitch_probe':

ipn3ke_ethdev.c:(.text+0x7a2): undefined reference to `rte_eth_dev_get_by_name'

collect2: error: ld returned 1 exit status

[20/1511] Linking target drivers/librte_net_memif.so.22.1

FAILED: drivers/librte_net_memif.so.22.1

cc  -o drivers/librte_net_memif.so.22.1 drivers/librte_net_memif.so.22.1.p/meson-generated_.._rte_net_memif.pmd.c.o drivers/libtmp_rte_net_memif.a.p/net_memif_memif_socket.c.o drivers/libtmp_rte_net_memif.a.p/net_memif_rte_eth_memif.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_net_memif.so.22 -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/lib -Wl,-rpath-link,/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/build/drivers lib/librte_ethdev.so.22.1 lib/librte_eal.so.22.1 lib/librte_kvargs.so.22.1 lib/librte_telemetry.so.22.1 lib/librte_net.so.22.1 lib/librte_mbuf.so.22.1 lib/librte_mempool.so.22.1 lib/librte_ring.so.22.1 lib/librte_meter.so.22.1 drivers/librte_bus_pci.so.22.1 lib/librte_pci.so.22.1 drivers/librte_bus_vdev.so.22.1 lib/librte_hash.so.22.1 lib/librte_rcu.so.22.1 -Wl,--end-group -Wl,--version-script=/home-local/jenkins-local/jenkins-agent/workspace/Apply-Custom-Patch-Set/dpdk/drivers/net/memif/version.map

drivers/libtmp_rte_net_memif.a.p/net_memif_rte_eth_memif.c.o: In function `memif_mp_send_region':

rte_eth_memif.c:(.text+0x12ce): undefined reference to `rte_eth_dev_get_by_name'

collect2: error: ld returned 1 exit status

[21/1511] Compiling C object drivers/librte_net_pcap.a.p/meson-generated_.._rte_net_pcap.pmd.c.o

[22/1511] Compiling C object drivers/librte_net_pfe.so.22.1.p/meson-generated_.._rte_net_pfe.pmd.c.o

[23/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_dev.c.o

[24/1511] Linking static target drivers/librte_net_octeontx_ep.a

[25/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_int.c.o

[26/1511] Compiling C object drivers/net/qede/base/libqede_base.a.p/ecore_l2.c.o

[27/1511] Generating symbol file drivers/librte_bus_fslmc.so.22.1.p/librte_bus_fslmc.so.22.1.symbols

[28/1511] Generating symbol file drivers/librte_bus_dpaa.so.22.1.p/librte_bus_dpaa.so.22.1.symbols

[29/1511] Generating rte_net_ngbe.sym_chk with a custom command (wrapped by meson to capture output)

[30/1511] Generating symbol file lib/librte_port.so.22.1.p/librte_port.so.22.1.symbols

[31/1511] Generating rte_net_octeontx.sym_chk with a custom command (wrapped by meson to capture output)

[32/1511] Generating symbol file drivers/librte_common_cnxk.so.22.1.p/librte_common_cnxk.so.22.1.symbols

[33/1511] Generating rte_net_pfe.sym_chk with a custom command (wrapped by meson to capture output)

[34/1511] Generating symbol file drivers/librte_common_sfc_efx.so.22.1.p/librte_common_sfc_efx.so.22.1.symbols

[35/1511] Generating rte_net_null.sym_chk with a custom command (wrapped by meson to capture output)

ninja: build stopped: subcommand failed.

[-- Attachment #2: Type: text/html, Size: 16061 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1] drivers/net: use internal API to get eth dev from name
  2022-02-10 20:44               ` Yigit, Ferruh
@ 2022-02-10 22:06                 ` Owen Hilyard
  0 siblings, 0 replies; 15+ messages in thread
From: Owen Hilyard @ 2022-02-10 22:06 UTC (permalink / raw)
  To: Yigit, Ferruh
  Cc: Ali Alnubani, kumaraparameshwaran rathinavel, dev, dpdklab,
	Kumara Parameshwaran, ci, Aaron Conole

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

The latest script in CI correctly selects 'next-net' for this patch.

>

[-- Attachment #2: Type: text/html, Size: 544 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-02-10 22:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  8:24 [PATCH v1] drivers/net: use internal API to get eth dev from name Kumara Parameshwaran
2022-02-03 11:09 ` kumaraparameshwaran rathinavel
2022-02-03 11:31   ` Ferruh Yigit
2022-02-07 16:08     ` Ali Alnubani
2022-02-07 16:36       ` Ferruh Yigit
2022-02-07 16:47         ` Ali Alnubani
2022-02-07 17:25           ` Ferruh Yigit
2022-02-07 19:58             ` Owen Hilyard
2022-02-10 20:44               ` Yigit, Ferruh
2022-02-10 22:06                 ` Owen Hilyard
2022-02-03 12:31 ` Ferruh Yigit
2022-02-04 13:46   ` Ferruh Yigit
2022-02-03 12:34 ` Ferruh Yigit
2022-02-03 12:35 ` Ferruh Yigit
2022-02-04  9:51   ` Singh, Jasvinder

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).