DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tetsuya Mukawa <mukawa@igel.co.jp>
To: Ciara Loftus <ciara.loftus@intel.com>, dev@dpdk.org
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	"Tan, Jianfeng" <jianfeng.tan@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: Fix retrieval of numa information in PMD
Date: Wed, 6 Apr 2016 15:49:25 +0900	[thread overview]
Message-ID: <5704B175.3040700@igel.co.jp> (raw)
In-Reply-To: <1459872587-11655-1-git-send-email-ciara.loftus@intel.com>

On 2016/04/06 1:09, Ciara Loftus wrote:
> After some testing, it was found that retrieving numa information
> about a vhost device via a call to get_mempolicy is more
> accurate when performed during the new_device callback versus
> the vring_state_changed callback, in particular upon initial boot
> of the VM.  Performing this check during new_device is also
> potentially more efficient as this callback is only triggered once
> during device initialisation, compared with vring_state_changed
> which may be called multiple times depending on the number of
> queues assigned to the device.
>
> Reorganise the code to perform this check and assign the correct
> socket_id to the device during the new_device callback.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index 4cc6bec..b1eb082 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
>

Hi,

I appreciate fixing it.
Just one worry is that state changed event may be occurred before new
device event.
The users should not call rte_eth_dev_socket_id() until new device event
comes, even if they catch queue state events.
Otherwise, they will get wrong socket id to call
rte_eth_rx/tx_queue_setup().

So how about commenting it in 'rte_eth_vhost.h'?

Thanks,
Tetsuya

  parent reply	other threads:[~2016-04-06  6:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 16:09 Ciara Loftus
2016-04-06  5:03 ` Yuanhan Liu
2016-04-06 16:45   ` Thomas Monjalon
2016-04-06  5:32 ` Tan, Jianfeng
2016-04-06  5:44   ` Yuanhan Liu
2016-04-06  6:05     ` Tan, Jianfeng
2016-04-06  6:17       ` Yuanhan Liu
2016-04-06  6:32         ` Tan, Jianfeng
2016-04-06  6:49 ` Tetsuya Mukawa [this message]
2016-04-06  7:17   ` Yuanhan Liu
2016-04-06  7:28     ` Tetsuya Mukawa
2016-04-06  9:37     ` Loftus, Ciara
2016-04-06 16:09       ` Yuanhan Liu
2016-04-06 16:12         ` Thomas Monjalon
2016-04-06 16:43           ` Yuanhan Liu

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=5704B175.3040700@igel.co.jp \
    --to=mukawa@igel.co.jp \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=yuanhan.liu@linux.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).