summaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/device.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-03-28 23:34:56 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-03-29 00:23:57 +0000
commit96d4e533638f585feb606e04b837396be5c503ed (patch)
tree482e4d10c12c0bc22e4badc71e35c965e395d796 /src/plugins/rdma/device.c
parenta03d18238350f9941357caca28957395ad737810 (diff)
rdma: add option to specify inteface name
Change-Id: Ic6244511b88bdd42756f74e3163a70b8014e8547 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/rdma/device.c')
-rw-r--r--src/plugins/rdma/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/rdma/device.c b/src/plugins/rdma/device.c
index 31112a923d0..4098d3c8bb2 100644
--- a/src/plugins/rdma/device.c
+++ b/src/plugins/rdma/device.c
@@ -248,6 +248,7 @@ rdma_dev_cleanup (rdma_device_t * rd)
vec_free (rd->rxqs);
vec_free (rd->txqs);
+ vec_free (rd->name);
pool_put (rm->devices, rd);
}
@@ -430,6 +431,7 @@ rdma_create_if (vlib_main_t * vm, rdma_create_if_args_t * args)
pool_get_zero (rm->devices, rd);
rd->dev_instance = rd - rm->devices;
rd->per_interface_next_index = ~0;
+ rd->name = vec_dup (args->name);
/* check if device exist and if it is bound to mlx5_core */
s = format (s, "/sys/class/net/%s/device/driver/module%c", args->ifname, 0);