diff options
author | Steven Luong <sluong@cisco.com> | 2019-03-14 09:57:09 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-18 11:11:50 +0000 |
commit | ee8ba6877efb916b88255821f94ef33437724f75 (patch) | |
tree | aeb507c38ba53a60791c7084f6f47d540608971f /src/plugins/vmxnet3/vmxnet3_test.c | |
parent | a990a2e4930014f025338d8ce186abfa12ec09ff (diff) |
vmxnet3: auto bind support
For creating the vmxnet3 interface, add the bind option to automatically bind
the pci to vfio-pci module which removes the need for manual bind. Manual bind
still works, should people prefer to go that route.
Change-Id: Ife75926f8755d754a08dd0ecff0f1de326ad5ba1
Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/plugins/vmxnet3/vmxnet3_test.c')
-rw-r--r-- | src/plugins/vmxnet3/vmxnet3_test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/vmxnet3/vmxnet3_test.c b/src/plugins/vmxnet3/vmxnet3_test.c index bb9f93e95cc..fe491b2a41d 100644 --- a/src/plugins/vmxnet3/vmxnet3_test.c +++ b/src/plugins/vmxnet3/vmxnet3_test.c @@ -117,12 +117,16 @@ api_vmxnet3_create (vat_main_t * vam) } else if (unformat (i, "elog")) args.enable_elog = 1; + else if (unformat (i, "bind")) + args.bind = 1; else if (unformat (i, "rx-queue-size %u", &args.rxq_size)) ; else if (unformat (i, "tx-queue-size %u", &args.txq_size)) ; else if (unformat (i, "num-tx-queues %u", &args.txq_num)) ; + else if (unformat (i, "num-rx-queues %u", &args.rxq_num)) + ; else { clib_warning ("unknown input '%U'", format_unformat_error, i); @@ -137,6 +141,8 @@ api_vmxnet3_create (vat_main_t * vam) mp->rxq_size = clib_host_to_net_u16 (args.rxq_size); mp->txq_size = clib_host_to_net_u16 (args.txq_size); mp->txq_num = clib_host_to_net_u16 (args.txq_num); + mp->rxq_num = clib_host_to_net_u16 (args.rxq_num); + mp->bind = args.bind; S (mp); W (ret); @@ -289,7 +295,8 @@ vl_api_vmxnet3_details_t_handler (vl_api_vmxnet3_details_t * mp) */ #define foreach_vpe_api_msg \ _(vmxnet3_create, "<pci-address> [rx-queue-size <size>] " \ - "[tx-queue-size <size>] [num-tx-queues <num>]") \ + "[tx-queue-size <size>] [num-tx-queues <num>]" \ + "[num-rx-queues <num>] [bind]") \ _(vmxnet3_delete, "sw_if_index <sw_if_index>") \ _(vmxnet3_dump, "") |