diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2020-09-02 11:59:37 +0000 |
---|---|---|
committer | Mohsin Kazmi <sykazmi@cisco.com> | 2020-09-02 12:00:31 +0000 |
commit | a1a2246eab0269f3ee330d3866fba44e29a31639 (patch) | |
tree | fdca27d0c2deeab409962740860e47f8a0426fb0 /src/vnet | |
parent | 518251bc8a3e67e25a041bf54d6bb01a2233838b (diff) |
tap: add the static assert for api flags
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia1276d00dded36ee28b4b2e93b4cc7c1df6b1eef
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/devices/tap/tapv2_api.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vnet/devices/tap/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c index 5aca93ec310..ea618521aa4 100644 --- a/src/vnet/devices/tap/tapv2_api.c +++ b/src/vnet/devices/tap/tapv2_api.c @@ -126,6 +126,25 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp) ap->host_mtu_set = 1; } + STATIC_ASSERT (((int) TAP_API_FLAG_GSO == (int) TAP_FLAG_GSO), + "tap gso api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_CSUM_OFFLOAD == + (int) TAP_FLAG_CSUM_OFFLOAD), + "tap checksum offload api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_PERSIST == (int) TAP_FLAG_PERSIST), + "tap persist api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_ATTACH == (int) TAP_FLAG_ATTACH), + "tap attach api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_TUN == (int) TAP_FLAG_TUN), + "tap tun api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_GRO_COALESCE == + (int) TAP_FLAG_GRO_COALESCE), + "tap gro coalesce api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_PACKED == (int) TAP_FLAG_PACKED), + "tap packed api flag mismatch"); + STATIC_ASSERT (((int) TAP_API_FLAG_IN_ORDER == + (int) TAP_FLAG_IN_ORDER), "tap in-order api flag mismatch"); + ap->tap_flags = ntohl (mp->tap_flags); tap_create_if (vm, ap); |