DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: Pascal Mazon <pascal.mazon@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/tap: fix dev name look-up
Date: Mon, 6 Mar 2017 14:15:26 +0000	[thread overview]
Message-ID: <50C67BB6-76E8-4CB0-9493-284CA82B5DC4@intel.com> (raw)
In-Reply-To: <83e0d49d-e2b5-1b4b-288f-2d0eaaedc94b@intel.com>


> On Mar 5, 2017, at 3:35 PM, Yigit, Ferruh <ferruh.yigit@intel.com> wrote:
> 
> On 3/3/2017 8:54 AM, Pascal Mazon wrote:
>> The call to rte_eth_dev_allocate(tap_name) sets dev->data->name to
>> tap_name (e.g. "dtap0").
>> 
>> A look-up using tap_name is expected to return this device, not a
>> look-up using name (e.g. "net_tap0").
> 
> This will break rte_pmd_tap_remove(), because it gets device name
> (net_tap0) as parameter.
> 
> And logically this is wrong too, current eth_dev->data->name is to keep
> device name, all other PMDs use this way, not for Linux interface name.
> 
> Current tap PMD, first gives "dtap0" to rte_eth_dev_allocate() as
> argument, which sets device name to this value. Later with snprintf()
> overwrites the device name with correct value, I think better thing to
> do is give correct argument to rte_eth_dev_allocate() and remove snprintf()

All of these different names for the device is driving me crazy :-)

As long as the name of the device as seen from the ifconfig command or host facing name is dtapX then I am ok. We need to clean this up somehow as it is very confusing.

> 
>> 
>> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
>> ---
>> drivers/net/tap/rte_eth_tap.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
>> index 47a706070652..14c345f07afa 100644
>> --- a/drivers/net/tap/rte_eth_tap.c
>> +++ b/drivers/net/tap/rte_eth_tap.c
>> @@ -691,7 +691,7 @@ eth_dev_tap_create(const char *name, char *tap_name)
>> 	dev->driver = NULL;
>> 	dev->rx_pkt_burst = pmd_rx_burst;
>> 	dev->tx_pkt_burst = pmd_tx_burst;
>> -	snprintf(dev->data->name, sizeof(dev->data->name), "%s", name);
>> +	snprintf(dev->data->name, sizeof(dev->data->name), "%s", tap_name);
>> 
>> 	/* Presetup the fds to -1 as being not valid */
>> 	for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
>> 
> 

Regards,
Keith

  reply	other threads:[~2017-03-06 14:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03  8:54 Pascal Mazon
2017-03-03 15:19 ` Wiles, Keith
2017-03-05 21:35 ` Ferruh Yigit
2017-03-06 14:15   ` Wiles, Keith [this message]
2017-03-06 14:32     ` Ferruh Yigit
2017-03-06 13:51 ` [dpdk-dev] [PATCH v2] " Pascal Mazon
2017-03-06 14:27   ` Ferruh Yigit
2017-03-06 14:57     ` Pascal Mazon
2017-03-06 15:13   ` [dpdk-dev] [PATCH v3] " Pascal Mazon
2017-03-06 15:16     ` Wiles, Keith
2017-03-06 15:42       ` Ferruh Yigit
2017-03-06 16:03         ` Ferruh Yigit
2017-03-06 16:14           ` Wiles, Keith
2017-03-08 17:44             ` Ferruh Yigit
2017-03-06 15:41     ` Ferruh Yigit
2017-03-06 15:55       ` Pascal Mazon
2017-03-06 16:02         ` Ferruh Yigit

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=50C67BB6-76E8-4CB0-9493-284CA82B5DC4@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=pascal.mazon@6wind.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).