aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/gso/gso.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-05-12 13:42:58 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-05-20 11:24:33 +0000
commit1140266af1aad6f87fee4fca918a7482d5dc02ba (patch)
treed3b58856cb922f011518fa9be5af1e4acb858416 /src/vnet/gso/gso.c
parentaefcd1a3579ec2c93f606b151d563d87ea211387 (diff)
gso: fix the gso segmentation
Type: fix This fix is backported from master partial of patch: gso: add vxlan tunnel support It fixes required number of buffers for segmentation and also enables gso infra node on sub-interfaces. Change-Id: I2cf93cdb39c67e2252a3549905d141fffa95d249 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/gso/gso.c')
-rw-r--r--src/vnet/gso/gso.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vnet/gso/gso.c b/src/vnet/gso/gso.c
index cf90d22696d..231196adc5d 100644
--- a/src/vnet/gso/gso.c
+++ b/src/vnet/gso/gso.c
@@ -34,9 +34,11 @@ vnet_sw_interface_gso_enable_disable (u32 sw_if_index, u8 enable)
em = &ethernet_main;
si = vnet_get_sw_interface (vnm, sw_if_index);
- /*
- * only ethernet HW interfaces are supported at this time
- */
+ if (si->type == VNET_SW_INTERFACE_TYPE_SUB)
+ {
+ si = vnet_get_sup_sw_interface (vnm, sw_if_index);
+ }
+
if (si->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
{
return (VNET_API_ERROR_INVALID_VALUE);