DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Pascal Mazon <pascal.mazon@6wind.com>, keith.wiles@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/tap: fix dev name look-up
Date: Mon, 6 Mar 2017 14:27:18 +0000	[thread overview]
Message-ID: <b7bdf25b-9e0d-0ee8-ba9c-6a666e475766@intel.com> (raw)
In-Reply-To: <64e79c8c7398e0af093168d614c0ca62dc28377e.1488808159.git.pascal.mazon@6wind.com>

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.

> 
> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
<...>

  reply	other threads:[~2017-03-06 14:27 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 [this message]
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=b7bdf25b-9e0d-0ee8-ba9c-6a666e475766@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@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).