aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/tap')
-rw-r--r--src/vnet/devices/tap/cli.c2
-rw-r--r--src/vnet/devices/tap/tap.c3
-rw-r--r--src/vnet/devices/tap/tap.h19
3 files changed, 15 insertions, 9 deletions
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 5c676d32d60..5738ef237b6 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -105,6 +105,8 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
args.tap_flags |= TAP_FLAG_PACKED;
else if (unformat (line_input, "in-order"))
args.tap_flags |= TAP_FLAG_IN_ORDER;
+ else if (unformat (line_input, "consistent-qp"))
+ args.tap_flags |= TAP_FLAG_CONSISTENT_QP;
else if (unformat (line_input, "hw-addr %U",
unformat_ethernet_address, args.mac_addr.bytes))
args.mac_addr_set = 1;
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index b0b0a3af13f..bb91200a525 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -212,6 +212,9 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
}
}
+ if (args->tap_flags & TAP_FLAG_CONSISTENT_QP)
+ vif->consistent_qp = 1;
+
/* if namespace is specified, all further netlink messages should be executed
* after we change our net namespace */
if (args->host_namespace)
diff --git a/src/vnet/devices/tap/tap.h b/src/vnet/devices/tap/tap.h
index 1df2fb7e1ad..66f5576c5be 100644
--- a/src/vnet/devices/tap/tap.h
+++ b/src/vnet/devices/tap/tap.h
@@ -22,15 +22,16 @@
#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) \
- _ (PACKED, 6) \
- _ (IN_ORDER, 7)
+#define foreach_tapv2_flags \
+ _ (GSO, 0) \
+ _ (CSUM_OFFLOAD, 1) \
+ _ (PERSIST, 2) \
+ _ (ATTACH, 3) \
+ _ (TUN, 4) \
+ _ (GRO_COALESCE, 5) \
+ _ (PACKED, 6) \
+ _ (IN_ORDER, 7) \
+ _ (CONSISTENT_QP, 8)
typedef enum
{