diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-10-07 15:57:32 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-10-07 19:54:44 +0000 |
commit | 90ea5dc1bd7adcedd0d5765c3ee04c98c4853337 (patch) | |
tree | fae4e9a246e0efdb3b4f8b8fb725ef8d32a45838 /src | |
parent | 02bfd641b69aab83397e217b9ca4e35a6aab05c8 (diff) |
rdma: fix crash when failing to detect numa node on create
Type: fix
Change-Id: Ibb8e7c1c13869c1dce2385f58bd7260fcf776c5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/rdma/device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/rdma/device.c b/src/plugins/rdma/device.c index 32b7ea55006..ea6d2785845 100644 --- a/src/plugins/rdma/device.c +++ b/src/plugins/rdma/device.c @@ -635,6 +635,11 @@ rdma_create_if (vlib_main_t * vm, rdma_create_if_args_t * args) rd->pci = vlib_pci_get_device_info (vm, &pci_addr, &args->error); if (!rd->pci) goto err2; + + /* if we failed to parse NUMA node, default to 0 */ + if (-1 == rd->pci->numa_node) + rd->pci->numa_node = 0; + rd->pool = vlib_buffer_pool_get_default_for_numa (vm, rd->pci->numa_node); if (strncmp ((char *) rd->pci->driver_name, "mlx5_core", 9)) |