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 v3] net/tap: fix dev name look-up
Date: Mon, 6 Mar 2017 16:14:41 +0000 [thread overview]
Message-ID: <CF2E08F8-5363-4527-BC1F-E9EB2DBB4C02@intel.com> (raw)
In-Reply-To: <d70291e8-24c4-29ae-17bb-ef807089b181@intel.com>
> On Mar 6, 2017, at 10:03 AM, Yigit, Ferruh <ferruh.yigit@intel.com> wrote:
>
> On 3/6/2017 3:42 PM, Ferruh Yigit wrote:
>> On 3/6/2017 3:16 PM, Wiles, Keith wrote:
>>>
>>>> On Mar 6, 2017, at 9:13 AM, Pascal Mazon <pascal.mazon@6wind.com> wrote:
>>>>
>>>> Store the device name in dev->data->name, to have symmetrical behavior
>>>> between rte_pmd_tap_probe(name) and rte_pmd_tap_remove(name).
>>>>
>>>> The netdevice name (linux interface name) is stored in the name field of
>>>> struct pmd_internals.
>>>>
>>>> snprintf(data->name) has been moved closer to the rte_ethdev_allocate()
>>>> as it should use the same name.
>>>>
>>>> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
>>>> ---
>>>> drivers/net/tap/rte_eth_tap.c | 5 +++--
>>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
>>>> index 47a706070652..ece3a5fcc897 100644
>>>> --- a/drivers/net/tap/rte_eth_tap.c
>>>> +++ b/drivers/net/tap/rte_eth_tap.c
>>>> @@ -663,7 +663,9 @@ eth_dev_tap_create(const char *name, char *tap_name)
>>>> goto error_exit;
>>>> }
>>>>
>>>> - dev = rte_eth_dev_allocate(tap_name);
>>>> + /* name in allocation and data->name must be consistent */
>>>> + snprintf(data->name, sizeof(data->name), "%s", name);
>>>> + dev = rte_eth_dev_allocate(name);
>>>> if (!dev) {
>>>> RTE_LOG(ERR, PMD, "TAP Unable to allocate device struct\n");
>>>> goto error_exit;
>>>> @@ -691,7 +693,6 @@ 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);
>>>>
>>>> /* Presetup the fds to -1 as being not valid */
>>>> for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
>>>> --
>>>> 2.8.0.rc0
>>>
>>> Looks good to me, but Ferruh seems to be the expect here :-)
>>
>> One more minor update, and will be fine I guess J
>
> Since no more update required, I am using above as your "Acked-by”.
Acked-by: Keith Wiles <keith.wiles@intel.com>
>
>>
>>>>
>>>
>>> Regards,
>>> Keith
Regards,
Keith
next prev parent reply other threads:[~2017-03-06 16:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 8:54 [dpdk-dev] [PATCH] " Pascal Mazon
2017-03-03 15:19 ` Wiles, Keith
2017-03-05 21:35 ` Ferruh Yigit
2017-03-06 14:15 ` Wiles, Keith
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 [this message]
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=CF2E08F8-5363-4527-BC1F-E9EB2DBB4C02@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).