[v2] vhost: suppress error if NUMA is not available
Checks
Commit Message
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>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
Version 2:
* Fixed 'check-git-log.sh' warning.
lib/librte_vhost/vhost.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 08/10/2018 09:24 AM, 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>
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>
> Version 2:
> * Fixed 'check-git-log.sh' warning.
>
> lib/librte_vhost/vhost.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks!
Maxime
On 08/10/2018 09:24 AM, 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>
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>
> Version 2:
> * Fixed 'check-git-log.sh' warning.
>
> lib/librte_vhost/vhost.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to dpdk-next-virtio
Thanks,
Maxime
@@ -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,