From: Pascal Mazon <pascal.mazon@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: keith.wiles@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/tap: fix dev name look-up
Date: Mon, 6 Mar 2017 15:57:50 +0100 [thread overview]
Message-ID: <20170306155750.55dfb49f@paques.dev.6wind.com> (raw)
In-Reply-To: <b7bdf25b-9e0d-0ee8-ba9c-6a666e475766@intel.com>
On Mon, 6 Mar 2017 14:27:18 +0000
Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> On 3/6/2017 1:51 PM, Pascal Mazon 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.
>
> +1 for this.
>
> >
> > There's no need to allocate an rte_eth_dev_data, as it is done in
> > rte_eth_dev_allocate()/rte_eth_dev_data_alloc().
>
> Allocating rte_eth_dev_data, although rte_eth_dev_allocate() does
> already, common practice for virtual devices, for a reason.
>
> rte_eth_dev_allocate() allocates device data from a shared memory, so
> that multiple DPDK processes can access same device data, this may
> make sense for physical devices, since there is a single physical
> resource.
>
> But for virtual devices, each DPDK process may want to have
> independent instance of the virtual device, that is why PMD itself
> allocates data and overwrites with existing dev->data.
>
> Also this may lead unexpected results for some multi process use
> cases, like secondary process virtual device corrupt primary process
> physical device data.
>
> I believe it is good to keep this as it is.
>
I see your point.
I'll send a v3 with just the correct "name" used for allocation.
And I'll move the snprintf(data->name) closer, to insist it must use the
same name as in allocation.
Regards,
Pascal
> >
> > Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
> <...>
next prev parent reply other threads:[~2017-03-06 14:58 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 [this message]
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=20170306155750.55dfb49f@paques.dev.6wind.com \
--to=pascal.mazon@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=keith.wiles@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).