DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@infradead.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev <dev@dpdk.org>,
	 "John W. Linville" <linville@tuxdriver.com>,
	Stephen Hurd <stephen.hurd@broadcom.com>,
	 Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Declan Doherty <declan.doherty@intel.com>,
	 Helin Zhang <helin.zhang@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	 Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	 Pascal Mazon <pascal.mazon@6wind.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure
Date: Sat, 10 Jun 2017 09:35:47 +0200	[thread overview]
Message-ID: <CALe+Z01EMQ32M4QjWPq_t0mGFC64E7FgJSPtTGVERjy9PzwuZA@mail.gmail.com> (raw)
In-Reply-To: <1804015.XMfruEeC3U@xps>

On Fri, Jun 9, 2017 at 3:52 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 26/05/2017 18:11, Ferruh Yigit:
>> Device name resides in two different locations, in rte_device->name and
>> in ethernet device private data.
>
> Yes would be nice to remove the name from rte_eth_dev_data.
>

I wonder if this is really the right thing to do. The name in the
eth_dev data is the eth_dev device name and it might be different from
the low-level device name. Some busses might use UUID as the device
identifier and I don't believe that this is a user friendly name.

>> For now, the copy in the ethernet device private data is required for
>> multi process support, the name is the how secondary process finds about
>> primary process device.
>
> Yes it is in rte_eth_dev_attach_secondary().
> This secondary process forces us to write ugly data structures.
>
>> But for drivers there is no reason to use the copy in the ethernet
>> device private data.
>
> Yes I agree.

Probably. But it also depends on at what stage the driver is using the
name and what information is printed. During probing I would expect
the low-level device name to be printed. After probing the eth_dev PMD
should use the user friendly device name.

> There are probably other places where we can avoid using this field.
> I see rte_eth_dev_get_name_by_port() and rte_eth_dev_get_port_by_name()
> using rte_eth_dev_data[port].name.
>
>> This patch updates PMDs to use only rte_device->name.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>

  parent reply	other threads:[~2017-06-10  7:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 16:11 [dpdk-dev] [PATCH 1/2] ethdev: ensure same name size for device and ethdev Ferruh Yigit
2017-05-26 16:11 ` [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure Ferruh Yigit
2017-06-09 13:52   ` Thomas Monjalon
2017-06-09 14:16     ` Ferruh Yigit
2017-06-10  7:35     ` Jan Blunck [this message]
2017-06-12  8:57       ` Ferruh Yigit
2017-06-09 18:36 ` [dpdk-dev] [PATCH v2 1/3] ethdev: ensure same name size for device and ethdev Ferruh Yigit
2017-06-09 18:36   ` [dpdk-dev] [PATCH v2 2/3] drivers/net: use device name from device structure Ferruh Yigit
2017-06-09 18:36   ` [dpdk-dev] [PATCH v2 3/3] ethdev: " Ferruh Yigit
2017-07-05 22:11     ` Thomas Monjalon

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=CALe+Z01EMQ32M4QjWPq_t0mGFC64E7FgJSPtTGVERjy9PzwuZA@mail.gmail.com \
    --to=jblunck@infradead.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=linville@tuxdriver.com \
    --cc=pascal.mazon@6wind.com \
    --cc=stephen.hurd@broadcom.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    /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).