X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Ftap%2Ftap.h;h=a9cd4766c3c2a82153a49d3e139a098ab9731ae9;hp=c1ac7a61229a4d21e4a069380a984bcc570ccced;hb=d88fc0fce;hpb=6bb080f1e54391b161cf211a9cfa3f488f2fd331 diff --git a/src/vnet/devices/tap/tap.h b/src/vnet/devices/tap/tap.h index c1ac7a61229..a9cd4766c3c 100644 --- a/src/vnet/devices/tap/tap.h +++ b/src/vnet/devices/tap/tap.h @@ -22,6 +22,21 @@ #define MIN(x,y) (((x)<(y))?(x):(y)) #endif +#define foreach_tapv2_flags \ + _ (GSO, 0) \ + _ (CSUM_OFFLOAD, 1) \ + _ (PERSIST, 2) \ + _ (ATTACH, 3) \ + _ (TUN, 4) \ + _ (GRO_COALESCE, 5) + +typedef enum +{ +#define _(a, b) TAP_FLAG_##a = (1 << b), + foreach_tapv2_flags +#undef _ +} tap_flag_t; + typedef struct { u32 id; @@ -31,11 +46,6 @@ typedef struct u16 rx_ring_sz; u16 tx_ring_sz; u32 tap_flags; -#define TAP_FLAG_GSO (1 << 0) -#define TAP_FLAG_CSUM_OFFLOAD (1 << 1) -#define TAP_FLAG_PERSIST (1 << 2) -#define TAP_FLAG_ATTACH (1 << 3) -#define TAP_FLAG_TUN (1 << 4) u8 *host_namespace; u8 *host_if_name; mac_address_t host_mac_addr;