aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-06-05 14:43:38 +0200
committerMohsin Kazmi <sykazmi@cisco.com>2020-06-09 15:18:12 +0200
commitb660a0e5b23ff40462467304fea7d3b92bf70f4f (patch)
treefb047b62b5eb504fb0e4e581effd4a25af475f80 /src
parentdbd5fb3db5d1edd33354cada459162407e30c023 (diff)
tap: enable gso/csum offload for tun
Type: improvement Change-Id: I5b9d5ea192776f14a45bf909acc4bef7793521e8 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/tap/tap.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index ea16f76bcb0..93f12e19abc 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -179,7 +179,6 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
{
vif->type = VIRTIO_IF_TYPE_TUN;
ifr.ifr_flags |= IFF_TUN;
- args->tap_flags &= ~(TAP_FLAG_GSO | TAP_FLAG_CSUM_OFFLOAD);
}
else
{
@@ -808,9 +807,6 @@ tap_csum_offload_enable_disable (vlib_main_t * vm, u32 sw_if_index,
vif = pool_elt_at_index (mm->interfaces, hw->dev_instance);
- if (vif->type == VIRTIO_IF_TYPE_TUN)
- return VNET_API_ERROR_UNIMPLEMENTED;
-
const unsigned int csum_offload_on = TUN_F_CSUM;
const unsigned int csum_offload_off = 0;
unsigned int offload = enable_disable ? csum_offload_on : csum_offload_off;
@@ -868,9 +864,6 @@ tap_gso_enable_disable (vlib_main_t * vm, u32 sw_if_index, int enable_disable)
vif = pool_elt_at_index (mm->interfaces, hw->dev_instance);
- if (vif->type == VIRTIO_IF_TYPE_TUN)
- return VNET_API_ERROR_UNIMPLEMENTED;
-
const unsigned int gso_on = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6;
const unsigned int gso_off = 0;
unsigned int offload = enable_disable ? gso_on : gso_off;