diff options
author | Steven Luong <sluong@cisco.com> | 2020-11-17 13:30:44 -0800 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-01-08 13:10:58 +0000 |
commit | 27ba5008a16eddccc0b285272de7f89fd0aa3a24 (patch) | |
tree | 3065040b62ee15ac45b1c1d77dd7421dcb558a5d /src/vpp/api/custom_dump.c | |
parent | ed4b38e868c7cabb8e88cc0f1254c95a8f1c5939 (diff) |
vhost: Add event index for interrupt notification to driver
VPP only supports a poor man's approach for interrupt notification to the
driver. It uses a simple binary flag for "interrupt needed" or "interrupt
not needed". Most drivers support more sophisticated event index already.
This feature is to add the long due missing feature and make it configurable,
off by default.
Type: feature
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
Diffstat (limited to 'src/vpp/api/custom_dump.c')
-rw-r--r-- | src/vpp/api/custom_dump.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 1bc4cde900d..cd81a722b99 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -1627,6 +1627,57 @@ static void *vl_api_modify_vhost_user_if_t_print FINISH; } +static void *vl_api_create_vhost_user_if_v2_t_print + (vl_api_create_vhost_user_if_v2_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: create_vhost_user_if_v2 "); + + s = format (s, "socket %s ", mp->sock_filename); + if (mp->is_server) + s = format (s, "server "); + if (mp->renumber) + s = format (s, "renumber %d ", (mp->custom_dev_instance)); + if (mp->disable_mrg_rxbuf) + s = format (s, "disable_mrg_rxbuf "); + if (mp->disable_indirect_desc) + s = format (s, "disable_indirect_desc "); + if (mp->tag[0]) + s = format (s, "tag %s ", mp->tag); + if (mp->enable_gso) + s = format (s, "gso "); + if (mp->enable_event_idx) + s = format (s, "event-idx "); + if (mp->enable_packed) + s = format (s, "packed"); + + FINISH; +} + +static void *vl_api_modify_vhost_user_if_v2_t_print + (vl_api_modify_vhost_user_if_v2_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: modify_vhost_user_if_v2 "); + + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "socket %s ", mp->sock_filename); + if (mp->is_server) + s = format (s, "server "); + if (mp->renumber) + s = format (s, "renumber %d ", (mp->custom_dev_instance)); + if (mp->enable_gso) + s = format (s, "gso "); + if (mp->enable_event_idx) + s = format (s, "event-idx "); + if (mp->enable_packed) + s = format (s, "packed"); + + FINISH; +} + static void *vl_api_delete_vhost_user_if_t_print (vl_api_delete_vhost_user_if_t * mp, void *handle) { @@ -2995,6 +3046,8 @@ _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \ _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \ _(CREATE_VHOST_USER_IF, create_vhost_user_if) \ _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \ +_(CREATE_VHOST_USER_IF_V2, create_vhost_user_if_v2) \ +_(MODIFY_VHOST_USER_IF_V2, modify_vhost_user_if_v2) \ _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \ _(SW_INTERFACE_DUMP, sw_interface_dump) \ _(CONTROL_PING, control_ping) \ |