aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-08-21 16:07:03 +0200
committerDamjan Marion <dmarion@me.com>2018-09-20 09:12:12 +0000
commitee2e58f6ea802437ed52cc3e4d59b89d92757135 (patch)
tree9c84a87979cf99a89635446a9868f88c84fe14df /src/vat
parentfe0aa7648703f63159be8362836b39d4727fbb0c (diff)
vhost-user: Add disable feature support in api
Two flags to disable mergable rx buffers and indirect descriptors are added to api. Change-Id: Iba0ee9c48d19dfc3d3420a3fdaf44a1a1d325e99 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 0dde721aa1e..5e1114fdfbd 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -14053,6 +14053,8 @@ api_create_vhost_user_if (vat_main_t * vam)
u32 custom_dev_instance = ~0;
u8 hwaddr[6];
u8 use_custom_mac = 0;
+ u8 disable_mrg_rxbuf = 0;
+ u8 disable_indirect_desc = 0;
u8 *tag = 0;
int ret;
@@ -14071,6 +14073,10 @@ api_create_vhost_user_if (vat_main_t * vam)
use_custom_mac = 1;
else if (unformat (i, "server"))
is_server = 1;
+ else if (unformat (i, "disable_mrg_rxbuf"))
+ disable_mrg_rxbuf = 1;
+ else if (unformat (i, "disable_indirect_desc"))
+ disable_indirect_desc = 1;
else if (unformat (i, "tag %s", &tag))
;
else
@@ -14093,6 +14099,8 @@ api_create_vhost_user_if (vat_main_t * vam)
M (CREATE_VHOST_USER_IF, mp);
mp->is_server = is_server;
+ mp->disable_mrg_rxbuf = disable_mrg_rxbuf;
+ mp->disable_indirect_desc = disable_indirect_desc;
clib_memcpy (mp->sock_filename, file_name, vec_len (file_name));
vec_free (file_name);
if (custom_dev_instance != ~0)
@@ -14100,6 +14108,7 @@ api_create_vhost_user_if (vat_main_t * vam)
mp->renumber = 1;
mp->custom_dev_instance = ntohl (custom_dev_instance);
}
+
mp->use_custom_mac = use_custom_mac;
clib_memcpy (mp->mac_address, hwaddr, 6);
if (tag)
@@ -23632,6 +23641,7 @@ _(l2_interface_vlan_tag_rewrite, \
"[translate-2-[1|2]] [push_dot1q 0] tag1 <nn> tag2 <nn>") \
_(create_vhost_user_if, \
"socket <filename> [server] [renumber <dev_instance>] " \
+ "[disable_mrg_rxbuf] [disable_indirect_desc] " \
"[mac <mac_address>]") \
_(modify_vhost_user_if, \
"<intfc> | sw_if_index <nn> socket <filename>\n" \