aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-04-30 19:05:56 +0200
committerDamjan Marion <dmarion@me.com>2020-05-04 13:56:29 +0000
commitd88fc0fcedb402e3dc82cb44280d4567a6a13266 (patch)
tree24f5f0a9231067437045f1df458312682c5298b1 /src/vat
parent6bb080f1e54391b161cf211a9cfa3f488f2fd331 (diff)
tap: refactor existing flags
Type: refactor This patch refactor the existing flags and also add a new flag for packet coalescing. Change-Id: Ic826e4c81313f26d87c475cdf666b06cbed60a3a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index c3441eb6986..d443239a940 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -7360,15 +7360,19 @@ api_tap_create_v2 (vat_main_t * vam)
else if (unformat (i, "host-mtu-size %u", &host_mtu_size))
host_mtu_set = 1;
else if (unformat (i, "no-gso"))
- tap_flags &= ~TAP_FLAG_GSO;
+ tap_flags &= ~TAP_API_FLAG_GSO;
else if (unformat (i, "gso"))
- tap_flags |= TAP_FLAG_GSO;
+ tap_flags |= TAP_API_FLAG_GSO;
else if (unformat (i, "csum-offload"))
- tap_flags |= TAP_FLAG_CSUM_OFFLOAD;
+ tap_flags |= TAP_API_FLAG_CSUM_OFFLOAD;
else if (unformat (i, "persist"))
- tap_flags |= TAP_FLAG_PERSIST;
+ tap_flags |= TAP_API_FLAG_PERSIST;
else if (unformat (i, "attach"))
- tap_flags |= TAP_FLAG_ATTACH;
+ tap_flags |= TAP_API_FLAG_ATTACH;
+ else if (unformat (i, "tun"))
+ tap_flags |= TAP_API_FLAG_TUN;
+ else if (unformat (i, "gro-coalesce"))
+ tap_flags |= TAP_API_FLAG_GRO_COALESCE;
else
break;
}
@@ -20587,7 +20591,7 @@ _(l2_flags, \
_(bridge_flags, \
"bd_id <bridge-domain-id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
_(tap_create_v2, \
- "id <num> [hw-addr <mac-addr>] [host-if-name <name>] [host-ns <name>] [num-rx-queues <num>] [rx-ring-size <num>] [tx-ring-size <num>] [host-bridge <name>] [host-mac-addr <mac-addr>] [host-ip4-addr <ip4addr/mask>] [host-ip6-addr <ip6addr/mask>] [host-mtu-size <mtu>] [gso | no-gso | csum-offload] [persist] [attach]") \
+ "id <num> [hw-addr <mac-addr>] [host-if-name <name>] [host-ns <name>] [num-rx-queues <num>] [rx-ring-size <num>] [tx-ring-size <num>] [host-bridge <name>] [host-mac-addr <mac-addr>] [host-ip4-addr <ip4addr/mask>] [host-ip6-addr <ip6addr/mask>] [host-mtu-size <mtu>] [gso | no-gso | csum-offload | gro-coalesce] [persist] [attach] [tun]") \
_(tap_delete_v2, \
"<vpp-if-name> | sw_if_index <id>") \
_(sw_interface_tap_v2_dump, "") \