the Linux kernel TAP device driver
*/
-option version = "3.0.0";
+option version = "4.0.0";
import "vnet/interface_types.api";
import "vnet/ethernet/ethernet_types.api";
import "vnet/ip/ip_types.api";
enum tap_flags {
- TAP_FLAG_GSO = 1,
+ TAP_API_FLAG_GSO = 1, /* enable gso on the interface */
+ TAP_API_FLAG_CSUM_OFFLOAD = 2, /* enable checksum offload without gso on the interface */
+ TAP_API_FLAG_PERSIST = 4, /* make the interface persistence to exist in linux even vpp crash/restart */
+ TAP_API_FLAG_ATTACH = 8, /* attach to the existing persistence interface after vpp crash/restart */
+ TAP_API_FLAG_TUN = 16, /* create TUN interface instead of tap */
+ TAP_API_FLAG_GRO_COALESCE = 32, /* enable packet coalescing on tx side, provided gso enabled */
};
/** \brief Initialize a new tap interface with the given parameters
@param use_random_mac - let the system generate a unique mac address
@param mac_address - mac addr to assign to the interface if use_random not set
@param num_rx_queues - number of rx queues
- @param tx_ring_sz - the number of entries of TX ring
- @param rx_ring_sz - the number of entries of RX ring
+ @param tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2
+ @param rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2
@param host_mtu_set - host MTU should be set
@param host_mtu_size - host MTU size
@param host_mac_addr_set - host side interface mac address should be set
@param tap_flags - flags for the TAP interface creation
@param host_if_name_set - host side interface name should be set
@param host_if_name - host side interface name
- @param host_namespace_set - host namespece should be set
+ @param host_namespace_set - host namespace should be set
@param host_namespace - host namespace to attach interface to
@param host_bridge_set - host bridge should be set
@param host_bridge - host bridge to attach interface to
bool use_random_mac [default=true];
vl_api_mac_address_t mac_address;
u8 num_rx_queues [default=1];
- u16 tx_ring_sz; /* optional, default is 256 entries, must be power of 2 */
- u16 rx_ring_sz; /* optional, default is 256 entries, must be power of 2 */
+ u16 tx_ring_sz [default=256];
+ u16 rx_ring_sz [default=256];
bool host_mtu_set;
u32 host_mtu_size;
bool host_mac_addr_set;
};
/** \brief Dump tap interfaces request
- @param sw_if_index - filter by sw_if_index UNIMPLEMENTED
+ @param sw_if_index - filter by sw_if_index
*/
define sw_interface_tap_v2_dump
{