DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ilya Maximets <i.maximets@samsung.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
	Zhihong Wang <zhihong.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: suppress error if numa is not available
Date: Fri, 10 Aug 2018 10:24:29 +0300	[thread overview]
Message-ID: <20180810072336eucas1p27b000aea0d5adbcb0a9849444bb67e87~JdQXy_oIN1914019140eucas1p2x@eucas1p2.samsung.com> (raw)
In-Reply-To: <20180810030326.GA88853@debian.sh.intel.com>

On 10.08.2018 06:03, Tiwei Bie wrote:
> 
> [PATCH] vhost: suppress error if numa is not available
> 
> s/numa/NUMA/
> 
> Otherwise check-git-log.sh [1] will complain:
> 
> Wrong headline lowercase:
>         vhost: suppress error if numa is not available

Sure. Thanks for pointing that. I'll send v2.

> 
> Apart from that,
> 
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> 
> [1] https://github.com/DPDK/dpdk/blob/11a1f847d281/devtools/check-git-log.sh#L109
> 
> Thanks
> 
> On Thu, Aug 09, 2018 at 07:09:38PM +0300, Ilya Maximets wrote:
>> It's a common case that 'get_mempolicy' fails on systems
>> without NUMA support. No need to flag an error in log for
>> this situation.
>>
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>  lib/librte_vhost/vhost.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
>> index 3c9be10..91026b3 100644
>> --- a/lib/librte_vhost/vhost.c
>> +++ b/lib/librte_vhost/vhost.c
>> @@ -8,6 +8,7 @@
>>  #include <stdint.h>
>>  #include <stdlib.h>
>>  #ifdef RTE_LIBRTE_VHOST_NUMA
>> +#include <numa.h>
>>  #include <numaif.h>
>>  #endif
>>  
>> @@ -480,7 +481,7 @@ rte_vhost_get_numa_node(int vid)
>>  	int numa_node;
>>  	int ret;
>>  
>> -	if (dev == NULL)
>> +	if (dev == NULL || numa_available() != 0)
>>  		return -1;
>>  
>>  	ret = get_mempolicy(&numa_node, NULL, 0, dev,
>> -- 
>> 2.7.4
>>
> 
> 

  reply	other threads:[~2018-08-10  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180809160856eucas1p2e22900aa2de83e9b17f5843151557d7b@eucas1p2.samsung.com>
2018-08-09 16:09 ` Ilya Maximets
2018-08-10  3:03   ` Tiwei Bie
2018-08-10  7:24     ` Ilya Maximets [this message]
     [not found]   ` <CGME20180810072408eucas1p2ab45e26b6540bdf5634efad9080391d5@eucas1p2.samsung.com>
2018-08-10  7:24     ` [dpdk-dev] [PATCH v2] vhost: suppress error if NUMA " Ilya Maximets
2018-08-10 16:30       ` Maxime Coquelin
2018-08-10 16:38       ` Maxime Coquelin

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='20180810072336eucas1p27b000aea0d5adbcb0a9849444bb67e87~JdQXy_oIN1914019140eucas1p2x@eucas1p2.samsung.com' \
    --to=i.maximets@samsung.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@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).