[dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node

Rich Lane rich.lane at bigswitch.com
Wed Jun 8 23:51:33 CEST 2016


On Mon, Jun 6, 2016 at 8:51 PM, Yuanhan Liu <yuanhan.liu at linux.intel.com>
wrote:
>
> @@ -248,14 +248,9 @@ new_device(struct virtio_net *dev)
>         internal = eth_dev->data->dev_private;
>
>  #ifdef RTE_LIBRTE_VHOST_NUMA
> -       ret  = get_mempolicy(&newnode, NULL, 0, dev,
> -                       MPOL_F_NODE | MPOL_F_ADDR);
> -       if (ret < 0) {
> -               RTE_LOG(ERR, PMD, "Unknown numa node\n");
> -               return -1;
> -       }
> -
> -       eth_dev->data->numa_node = newnode;
> +       newnode = rte_vhost_get_numa_node(dev->vid);
> +       if (newnode > 0)
>

Should be "newnode >= 0".

+               eth_dev->data->numa_node = newnode;
>  #endif
>


More information about the dev mailing list