X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvat%2Fapi_format.c;h=90f79079fbe194bc49f1d2da9f5d892f4b53c5b9;hb=3d5f08a82;hp=4dd3f054ff351f5bdd2b587963c496cd51ac0270;hpb=eabd4249826259d2221ed339ea4bbe9e7bf7560e;p=vpp.git diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 4dd3f054ff3..90f79079fbe 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -28,8 +28,8 @@ #include #include #include -#include #include +#include #include #include @@ -2396,8 +2396,8 @@ static void vl_api_vxlan_gpe_add_del_tunnel_reply_t_handler_json vam->result_ready = 1; } -static void vl_api_gre_tunnel_add_del_reply_t_handler - (vl_api_gre_tunnel_add_del_reply_t * mp) +static void vl_api_create_vhost_user_if_reply_t_handler + (vl_api_create_vhost_user_if_reply_t * mp) { vat_main_t *vam = &vat_main; i32 retval = ntohl (mp->retval); @@ -2411,10 +2411,11 @@ static void vl_api_gre_tunnel_add_del_reply_t_handler vam->sw_if_index = ntohl (mp->sw_if_index); vam->result_ready = 1; } + vam->regenerate_interface_table = 1; } -static void vl_api_gre_tunnel_add_del_reply_t_handler_json - (vl_api_gre_tunnel_add_del_reply_t * mp) +static void vl_api_create_vhost_user_if_reply_t_handler_json + (vl_api_create_vhost_user_if_reply_t * mp) { vat_main_t *vam = &vat_main; vat_json_node_t node; @@ -2430,8 +2431,8 @@ static void vl_api_gre_tunnel_add_del_reply_t_handler_json vam->result_ready = 1; } -static void vl_api_create_vhost_user_if_reply_t_handler - (vl_api_create_vhost_user_if_reply_t * mp) +static void vl_api_create_vhost_user_if_v2_reply_t_handler + (vl_api_create_vhost_user_if_v2_reply_t * mp) { vat_main_t *vam = &vat_main; i32 retval = ntohl (mp->retval); @@ -2448,8 +2449,8 @@ static void vl_api_create_vhost_user_if_reply_t_handler vam->regenerate_interface_table = 1; } -static void vl_api_create_vhost_user_if_reply_t_handler_json - (vl_api_create_vhost_user_if_reply_t * mp) +static void vl_api_create_vhost_user_if_v2_reply_t_handler_json + (vl_api_create_vhost_user_if_v2_reply_t * mp) { vat_main_t *vam = &vat_main; vat_json_node_t node; @@ -3283,6 +3284,7 @@ _(l2_fib_clear_table_reply) \ _(l2_interface_efp_filter_reply) \ _(l2_interface_vlan_tag_rewrite_reply) \ _(modify_vhost_user_if_reply) \ +_(modify_vhost_user_if_v2_reply) \ _(delete_vhost_user_if_reply) \ _(want_l2_macs_events_reply) \ _(input_acl_set_interface_reply) \ @@ -3290,8 +3292,6 @@ _(ipsec_spd_add_del_reply) \ _(ipsec_interface_add_del_spd_reply) \ _(ipsec_spd_entry_add_del_reply) \ _(ipsec_sad_entry_add_del_reply) \ -_(ipsec_tunnel_if_add_del_reply) \ -_(ipsec_tunnel_if_set_sa_reply) \ _(delete_loopback_reply) \ _(bd_ip_mac_add_del_reply) \ _(bd_ip_mac_flush_reply) \ @@ -3450,14 +3450,14 @@ _(ADD_NODE_NEXT_REPLY, add_node_next_reply) \ _(VXLAN_ADD_DEL_TUNNEL_REPLY, vxlan_add_del_tunnel_reply) \ _(VXLAN_OFFLOAD_RX_REPLY, vxlan_offload_rx_reply) \ _(VXLAN_TUNNEL_DETAILS, vxlan_tunnel_details) \ -_(GRE_TUNNEL_ADD_DEL_REPLY, gre_tunnel_add_del_reply) \ -_(GRE_TUNNEL_DETAILS, gre_tunnel_details) \ _(L2_FIB_CLEAR_TABLE_REPLY, l2_fib_clear_table_reply) \ _(L2_INTERFACE_EFP_FILTER_REPLY, l2_interface_efp_filter_reply) \ _(L2_INTERFACE_VLAN_TAG_REWRITE_REPLY, l2_interface_vlan_tag_rewrite_reply) \ _(SW_INTERFACE_VHOST_USER_DETAILS, sw_interface_vhost_user_details) \ _(CREATE_VHOST_USER_IF_REPLY, create_vhost_user_if_reply) \ _(MODIFY_VHOST_USER_IF_REPLY, modify_vhost_user_if_reply) \ +_(CREATE_VHOST_USER_IF_V2_REPLY, create_vhost_user_if_v2_reply) \ +_(MODIFY_VHOST_USER_IF_V2_REPLY, modify_vhost_user_if_v2_reply) \ _(DELETE_VHOST_USER_IF_REPLY, delete_vhost_user_if_reply) \ _(SHOW_VERSION_REPLY, show_version_reply) \ _(SHOW_THREADS_REPLY, show_threads_reply) \ @@ -3475,8 +3475,6 @@ _(IPSEC_INTERFACE_ADD_DEL_SPD_REPLY, ipsec_interface_add_del_spd_reply) \ _(IPSEC_SPD_ENTRY_ADD_DEL_REPLY, ipsec_spd_entry_add_del_reply) \ _(IPSEC_SAD_ENTRY_ADD_DEL_REPLY, ipsec_sad_entry_add_del_reply) \ _(IPSEC_SA_DETAILS, ipsec_sa_details) \ -_(IPSEC_TUNNEL_IF_ADD_DEL_REPLY, ipsec_tunnel_if_add_del_reply) \ -_(IPSEC_TUNNEL_IF_SET_SA_REPLY, ipsec_tunnel_if_set_sa_reply) \ _(DELETE_LOOPBACK_REPLY, delete_loopback_reply) \ _(BD_IP_MAC_ADD_DEL_REPLY, bd_ip_mac_add_del_reply) \ _(BD_IP_MAC_FLUSH_REPLY, bd_ip_mac_flush_reply) \ @@ -9708,165 +9706,6 @@ api_vxlan_tunnel_dump (vat_main_t * vam) return ret; } -static int -api_gre_tunnel_add_del (vat_main_t * vam) -{ - unformat_input_t *line_input = vam->input; - vl_api_address_t src = { }, dst = - { - }; - vl_api_gre_tunnel_add_del_t *mp; - vl_api_gre_tunnel_type_t t_type; - u8 is_add = 1; - u8 src_set = 0; - u8 dst_set = 0; - u32 outer_table_id = 0; - u32 session_id = 0; - u32 instance = ~0; - int ret; - - t_type = GRE_API_TUNNEL_TYPE_L3; - - while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) - { - if (unformat (line_input, "del")) - is_add = 0; - else if (unformat (line_input, "instance %d", &instance)) - ; - else if (unformat (line_input, "src %U", unformat_vl_api_address, &src)) - { - src_set = 1; - } - else if (unformat (line_input, "dst %U", unformat_vl_api_address, &dst)) - { - dst_set = 1; - } - else if (unformat (line_input, "outer-table-id %d", &outer_table_id)) - ; - else if (unformat (line_input, "teb")) - t_type = GRE_API_TUNNEL_TYPE_TEB; - else if (unformat (line_input, "erspan %d", &session_id)) - t_type = GRE_API_TUNNEL_TYPE_ERSPAN; - else - { - errmsg ("parse error '%U'", format_unformat_error, line_input); - return -99; - } - } - - if (src_set == 0) - { - errmsg ("tunnel src address not specified"); - return -99; - } - if (dst_set == 0) - { - errmsg ("tunnel dst address not specified"); - return -99; - } - - M (GRE_TUNNEL_ADD_DEL, mp); - - clib_memcpy (&mp->tunnel.src, &src, sizeof (mp->tunnel.src)); - clib_memcpy (&mp->tunnel.dst, &dst, sizeof (mp->tunnel.dst)); - - mp->tunnel.instance = htonl (instance); - mp->tunnel.outer_table_id = htonl (outer_table_id); - mp->is_add = is_add; - mp->tunnel.session_id = htons ((u16) session_id); - mp->tunnel.type = htonl (t_type); - - S (mp); - W (ret); - return ret; -} - -static void vl_api_gre_tunnel_details_t_handler - (vl_api_gre_tunnel_details_t * mp) -{ - vat_main_t *vam = &vat_main; - - print (vam->ofp, "%11d%11d%24U%24U%13d%14d%12d", - ntohl (mp->tunnel.sw_if_index), - ntohl (mp->tunnel.instance), - format_vl_api_address, &mp->tunnel.src, - format_vl_api_address, &mp->tunnel.dst, - mp->tunnel.type, ntohl (mp->tunnel.outer_table_id), - ntohl (mp->tunnel.session_id)); -} - -static void vl_api_gre_tunnel_details_t_handler_json - (vl_api_gre_tunnel_details_t * mp) -{ - vat_main_t *vam = &vat_main; - vat_json_node_t *node = NULL; - - if (VAT_JSON_ARRAY != vam->json_tree.type) - { - ASSERT (VAT_JSON_NONE == vam->json_tree.type); - vat_json_init_array (&vam->json_tree); - } - node = vat_json_array_add (&vam->json_tree); - - vat_json_init_object (node); - vat_json_object_add_uint (node, "sw_if_index", - ntohl (mp->tunnel.sw_if_index)); - vat_json_object_add_uint (node, "instance", ntohl (mp->tunnel.instance)); - - vat_json_object_add_address (node, "src", &mp->tunnel.src); - vat_json_object_add_address (node, "dst", &mp->tunnel.dst); - vat_json_object_add_uint (node, "tunnel_type", mp->tunnel.type); - vat_json_object_add_uint (node, "outer_table_id", - ntohl (mp->tunnel.outer_table_id)); - vat_json_object_add_uint (node, "session_id", mp->tunnel.session_id); -} - -static int -api_gre_tunnel_dump (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_gre_tunnel_dump_t *mp; - vl_api_control_ping_t *mp_ping; - u32 sw_if_index; - u8 sw_if_index_set = 0; - int ret; - - /* Parse args required to build the message */ - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "sw_if_index %d", &sw_if_index)) - sw_if_index_set = 1; - else - break; - } - - if (sw_if_index_set == 0) - { - sw_if_index = ~0; - } - - if (!vam->json_output) - { - print (vam->ofp, "%11s%11s%24s%24s%13s%14s%12s", - "sw_if_index", "instance", "src_address", "dst_address", - "tunnel_type", "outer_fib_id", "session_id"); - } - - /* Get list of gre-tunnel interfaces */ - M (GRE_TUNNEL_DUMP, mp); - - mp->sw_if_index = htonl (sw_if_index); - - S (mp); - - /* Use a control ping for synchronization */ - MPING (CONTROL_PING, mp_ping); - S (mp_ping); - - W (ret); - return ret; -} - static int api_l2_fib_clear_table (vat_main_t * vam) { @@ -10058,13 +9897,11 @@ api_create_vhost_user_if (vat_main_t * vam) mp->disable_indirect_desc = disable_indirect_desc; mp->enable_gso = enable_gso; mp->enable_packed = enable_packed; + mp->custom_dev_instance = ntohl (custom_dev_instance); clib_memcpy (mp->sock_filename, file_name, vec_len (file_name)); vec_free (file_name); if (custom_dev_instance != ~0) - { - mp->renumber = 1; - mp->custom_dev_instance = ntohl (custom_dev_instance); - } + mp->renumber = 1; mp->use_custom_mac = use_custom_mac; clib_memcpy (mp->mac_address, hwaddr, 6); @@ -10139,14 +9976,177 @@ api_modify_vhost_user_if (vat_main_t * vam) mp->is_server = is_server; mp->enable_gso = enable_gso; mp->enable_packed = enable_packed; + mp->custom_dev_instance = ntohl (custom_dev_instance); + clib_memcpy (mp->sock_filename, file_name, vec_len (file_name)); + vec_free (file_name); + if (custom_dev_instance != ~0) + mp->renumber = 1; + + S (mp); + W (ret); + return ret; +} + +static int +api_create_vhost_user_if_v2 (vat_main_t * vam) +{ + unformat_input_t *i = vam->input; + vl_api_create_vhost_user_if_v2_t *mp; + u8 *file_name; + u8 is_server = 0; + u8 file_name_set = 0; + 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; + u8 enable_gso = 0; + u8 enable_packed = 0; + u8 enable_event_idx = 0; + int ret; + + /* Shut up coverity */ + clib_memset (hwaddr, 0, sizeof (hwaddr)); + + while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) + { + if (unformat (i, "socket %s", &file_name)) + { + file_name_set = 1; + } + else if (unformat (i, "renumber %" PRIu32, &custom_dev_instance)) + ; + else if (unformat (i, "mac %U", unformat_ethernet_address, hwaddr)) + 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, "gso")) + enable_gso = 1; + else if (unformat (i, "packed")) + enable_packed = 1; + else if (unformat (i, "event-idx")) + enable_event_idx = 1; + else if (unformat (i, "tag %s", &tag)) + ; + else + break; + } + + if (file_name_set == 0) + { + errmsg ("missing socket file name"); + return -99; + } + + if (vec_len (file_name) > 255) + { + errmsg ("socket file name too long"); + return -99; + } + vec_add1 (file_name, 0); + + M (CREATE_VHOST_USER_IF_V2, mp); + + mp->is_server = is_server; + mp->disable_mrg_rxbuf = disable_mrg_rxbuf; + mp->disable_indirect_desc = disable_indirect_desc; + mp->enable_gso = enable_gso; + mp->enable_packed = enable_packed; + mp->enable_event_idx = enable_event_idx; + mp->custom_dev_instance = ntohl (custom_dev_instance); clib_memcpy (mp->sock_filename, file_name, vec_len (file_name)); vec_free (file_name); if (custom_dev_instance != ~0) + mp->renumber = 1; + + mp->use_custom_mac = use_custom_mac; + clib_memcpy (mp->mac_address, hwaddr, 6); + if (tag) + strncpy ((char *) mp->tag, (char *) tag, ARRAY_LEN (mp->tag) - 1); + vec_free (tag); + + S (mp); + W (ret); + return ret; +} + +static int +api_modify_vhost_user_if_v2 (vat_main_t * vam) +{ + unformat_input_t *i = vam->input; + vl_api_modify_vhost_user_if_v2_t *mp; + u8 *file_name; + u8 is_server = 0; + u8 file_name_set = 0; + u32 custom_dev_instance = ~0; + u8 sw_if_index_set = 0; + u32 sw_if_index = (u32) ~ 0; + u8 enable_gso = 0; + u8 enable_packed = 0; + u8 enable_event_idx = 0; + int ret; + + while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { - mp->renumber = 1; - mp->custom_dev_instance = ntohl (custom_dev_instance); + if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index)) + sw_if_index_set = 1; + else if (unformat (i, "sw_if_index %d", &sw_if_index)) + sw_if_index_set = 1; + else if (unformat (i, "socket %s", &file_name)) + { + file_name_set = 1; + } + else if (unformat (i, "renumber %" PRIu32, &custom_dev_instance)) + ; + else if (unformat (i, "server")) + is_server = 1; + else if (unformat (i, "gso")) + enable_gso = 1; + else if (unformat (i, "packed")) + enable_packed = 1; + else if (unformat (i, "event-idx")) + enable_event_idx = 1; + else + break; } + if (sw_if_index_set == 0) + { + errmsg ("missing sw_if_index or interface name"); + return -99; + } + + if (file_name_set == 0) + { + errmsg ("missing socket file name"); + return -99; + } + + if (vec_len (file_name) > 255) + { + errmsg ("socket file name too long"); + return -99; + } + vec_add1 (file_name, 0); + + M (MODIFY_VHOST_USER_IF_V2, mp); + + mp->sw_if_index = ntohl (sw_if_index); + mp->is_server = is_server; + mp->enable_gso = enable_gso; + mp->enable_packed = enable_packed; + mp->enable_event_idx = enable_event_idx; + mp->custom_dev_instance = ntohl (custom_dev_instance); + clib_memcpy (mp->sock_filename, file_name, vec_len (file_name)); + vec_free (file_name); + if (custom_dev_instance != ~0) + mp->renumber = 1; + S (mp); W (ret); return ret; @@ -11178,206 +11178,6 @@ api_ipsec_sad_entry_add_del (vat_main_t * vam) return ret; } -static int -api_ipsec_tunnel_if_add_del (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_ipsec_tunnel_if_add_del_t *mp; - u32 local_spi = 0, remote_spi = 0; - u32 crypto_alg = 0, integ_alg = 0; - u8 *lck = NULL, *rck = NULL; - u8 *lik = NULL, *rik = NULL; - vl_api_address_t local_ip = { 0 }; - vl_api_address_t remote_ip = { 0 }; - f64 before = 0; - u8 is_add = 1; - u8 esn = 0; - u8 anti_replay = 0; - u8 renumber = 0; - u32 instance = ~0; - u32 count = 1, jj; - int ret = -1; - - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "del")) - is_add = 0; - else if (unformat (i, "esn")) - esn = 1; - else if (unformat (i, "anti-replay")) - anti_replay = 1; - else if (unformat (i, "count %d", &count)) - ; - else if (unformat (i, "local_spi %d", &local_spi)) - ; - else if (unformat (i, "remote_spi %d", &remote_spi)) - ; - else - if (unformat (i, "local_ip %U", unformat_vl_api_address, &local_ip)) - ; - else - if (unformat (i, "remote_ip %U", unformat_vl_api_address, &remote_ip)) - ; - else if (unformat (i, "local_crypto_key %U", unformat_hex_string, &lck)) - ; - else - if (unformat (i, "remote_crypto_key %U", unformat_hex_string, &rck)) - ; - else if (unformat (i, "local_integ_key %U", unformat_hex_string, &lik)) - ; - else if (unformat (i, "remote_integ_key %U", unformat_hex_string, &rik)) - ; - else - if (unformat - (i, "crypto_alg %U", unformat_ipsec_api_crypto_alg, &crypto_alg)) - { - if (crypto_alg >= IPSEC_CRYPTO_N_ALG) - { - errmsg ("unsupported crypto-alg: '%U'\n", - format_ipsec_crypto_alg, crypto_alg); - return -99; - } - } - else - if (unformat - (i, "integ_alg %U", unformat_ipsec_api_integ_alg, &integ_alg)) - { - if (integ_alg >= IPSEC_INTEG_N_ALG) - { - errmsg ("unsupported integ-alg: '%U'\n", - format_ipsec_integ_alg, integ_alg); - return -99; - } - } - else if (unformat (i, "instance %u", &instance)) - renumber = 1; - else - { - errmsg ("parse error '%U'\n", format_unformat_error, i); - return -99; - } - } - - if (count > 1) - { - /* Turn on async mode */ - vam->async_mode = 1; - vam->async_errors = 0; - before = vat_time_now (vam); - } - - for (jj = 0; jj < count; jj++) - { - M (IPSEC_TUNNEL_IF_ADD_DEL, mp); - - mp->is_add = is_add; - mp->esn = esn; - mp->anti_replay = anti_replay; - - if (jj > 0) - increment_address (&remote_ip); - - clib_memcpy (&mp->local_ip, &local_ip, sizeof (local_ip)); - clib_memcpy (&mp->remote_ip, &remote_ip, sizeof (remote_ip)); - - mp->local_spi = htonl (local_spi + jj); - mp->remote_spi = htonl (remote_spi + jj); - mp->crypto_alg = (u8) crypto_alg; - - mp->local_crypto_key_len = 0; - if (lck) - { - mp->local_crypto_key_len = vec_len (lck); - if (mp->local_crypto_key_len > sizeof (mp->local_crypto_key)) - mp->local_crypto_key_len = sizeof (mp->local_crypto_key); - clib_memcpy (mp->local_crypto_key, lck, mp->local_crypto_key_len); - } - - mp->remote_crypto_key_len = 0; - if (rck) - { - mp->remote_crypto_key_len = vec_len (rck); - if (mp->remote_crypto_key_len > sizeof (mp->remote_crypto_key)) - mp->remote_crypto_key_len = sizeof (mp->remote_crypto_key); - clib_memcpy (mp->remote_crypto_key, rck, mp->remote_crypto_key_len); - } - - mp->integ_alg = (u8) integ_alg; - - mp->local_integ_key_len = 0; - if (lik) - { - mp->local_integ_key_len = vec_len (lik); - if (mp->local_integ_key_len > sizeof (mp->local_integ_key)) - mp->local_integ_key_len = sizeof (mp->local_integ_key); - clib_memcpy (mp->local_integ_key, lik, mp->local_integ_key_len); - } - - mp->remote_integ_key_len = 0; - if (rik) - { - mp->remote_integ_key_len = vec_len (rik); - if (mp->remote_integ_key_len > sizeof (mp->remote_integ_key)) - mp->remote_integ_key_len = sizeof (mp->remote_integ_key); - clib_memcpy (mp->remote_integ_key, rik, mp->remote_integ_key_len); - } - - if (renumber) - { - mp->renumber = renumber; - mp->show_instance = ntohl (instance); - } - S (mp); - } - - /* When testing multiple add/del ops, use a control-ping to sync */ - if (count > 1) - { - vl_api_control_ping_t *mp_ping; - f64 after; - f64 timeout; - - /* Shut off async mode */ - vam->async_mode = 0; - - MPING (CONTROL_PING, mp_ping); - S (mp_ping); - - timeout = vat_time_now (vam) + 1.0; - while (vat_time_now (vam) < timeout) - if (vam->result_ready == 1) - goto out; - vam->retval = -99; - - out: - if (vam->retval == -99) - errmsg ("timeout"); - - if (vam->async_errors > 0) - { - errmsg ("%d asynchronous errors", vam->async_errors); - vam->retval = -98; - } - vam->async_errors = 0; - after = vat_time_now (vam); - - /* slim chance, but we might have eaten SIGTERM on the first iteration */ - if (jj > 0) - count = jj; - - print (vam->ofp, "%d tunnels in %.6f secs, %.2f tunnels/sec", - count, after - before, count / (after - before)); - } - else - { - /* Wait for a reply... */ - W (ret); - return ret; - } - - return ret; -} - static void vl_api_ipsec_sa_details_t_handler (vl_api_ipsec_sa_details_t * mp) { @@ -11486,57 +11286,6 @@ api_ipsec_sa_dump (vat_main_t * vam) return ret; } -static int -api_ipsec_tunnel_if_set_sa (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_ipsec_tunnel_if_set_sa_t *mp; - u32 sw_if_index = ~0; - u32 sa_id = ~0; - u8 is_outbound = (u8) ~ 0; - int ret; - - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index)) - ; - else if (unformat (i, "sa_id %d", &sa_id)) - ; - else if (unformat (i, "outbound")) - is_outbound = 1; - else if (unformat (i, "inbound")) - is_outbound = 0; - else - { - clib_warning ("parse error '%U'", format_unformat_error, i); - return -99; - } - } - - if (sw_if_index == ~0) - { - errmsg ("interface must be specified"); - return -99; - } - - if (sa_id == ~0) - { - errmsg ("SA ID must be specified"); - return -99; - } - - M (IPSEC_TUNNEL_IF_SET_SA, mp); - - mp->sw_if_index = htonl (sw_if_index); - mp->sa_id = htonl (sa_id); - mp->is_outbound = is_outbound; - - S (mp); - W (ret); - - return ret; -} - static int api_get_first_msg_id (vat_main_t * vam) { @@ -15217,10 +14966,6 @@ _(vxlan_add_del_tunnel, \ "{ | mcast_sw_if_index } [instance ]}\n" \ "vni [encap-vrf-id ] [decap-next ] [del]") \ _(vxlan_tunnel_dump, "[ | sw_if_index ]") \ -_(gre_tunnel_add_del, \ - "src dst [outer-fib-id ] [instance ]\n" \ - "[teb | erspan ] [del]") \ -_(gre_tunnel_dump, "[ | sw_if_index ]") \ _(l2_fib_clear_table, "") \ _(l2_interface_efp_filter, "sw_if_index enable | disable") \ _(l2_interface_vlan_tag_rewrite, \ @@ -15234,6 +14979,13 @@ _(create_vhost_user_if, \ _(modify_vhost_user_if, \ " | sw_if_index socket \n" \ "[server] [renumber ] [gso] [packed]") \ +_(create_vhost_user_if_v2, \ + "socket [server] [renumber ] " \ + "[disable_mrg_rxbuf] [disable_indirect_desc] [gso] " \ + "[mac ] [packed] [event-idx]") \ +_(modify_vhost_user_if_v2, \ + " | sw_if_index socket \n" \ + "[server] [renumber ] [gso] [packed] [event-idx]")\ _(delete_vhost_user_if, " | sw_if_index ") \ _(sw_interface_vhost_user_dump, " | sw_if_index ") \ _(show_version, "") \ @@ -15263,13 +15015,7 @@ _(ipsec_spd_entry_add_del, "spd_id priority action \n" \ " (inbound|outbound) [sa_id ] laddr_start \n" \ " laddr_stop raddr_start raddr_stop \n" \ " [lport_start lport_stop ] [rport_start rport_stop ]" ) \ -_(ipsec_tunnel_if_add_del, "local_spi remote_spi \n" \ - " crypto_alg local_crypto_key remote_crypto_key \n" \ - " integ_alg local_integ_key remote_integ_key \n" \ - " local_ip remote_ip [esn] [anti_replay] [del]\n" \ - " [instance ]") \ _(ipsec_sa_dump, "[sa_id ]") \ -_(ipsec_tunnel_if_set_sa, " sa_id \n") \ _(delete_loopback,"sw_if_index ") \ _(bd_ip_mac_add_del, "bd_id [del]") \ _(bd_ip_mac_flush, "bd_id ") \