From: Shesha Sreenivasamurthy Date: Mon, 25 Apr 2016 17:34:53 +0000 (-0400) Subject: Disable TSO/CSUM offloading X-Git-Tag: v16.06-rc1~116 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F66%2F866%2F2;p=vpp.git Disable TSO/CSUM offloading Enabling these features breaks L4 traffic when a VHOST interface is bridged with a hardware interface which does not support such offloading. (Eg: enic) Change-Id: Ife3d292a8860eb60b82f1473e2d0dd7329e51d5e Signed-off-by: Shesha Sreenivasamurthy --- diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index 61a206cd7e1..7691ff8e301 100644 --- a/vnet/vnet/devices/dpdk/vhost_user.c +++ b/vnet/vnet/devices/dpdk/vhost_user.c @@ -422,6 +422,21 @@ dpdk_vhost_user_get_features(u32 hw_if_index, u64 * features) { *features = rte_vhost_feature_get(); +#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0) +#define OFFLOAD_FEATURES ((1ULL << VIRTIO_NET_F_HOST_TSO4) | \ + (1ULL << VIRTIO_NET_F_HOST_TSO6) | \ + (1ULL << VIRTIO_NET_F_CSUM) | \ + (1ULL << VIRTIO_NET_F_GUEST_CSUM) | \ + (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \ + (1ULL << VIRTIO_NET_F_GUEST_TSO6)) + + /* These are not suppoted as bridging/tunneling VHOST + * interfaces with hardware interfaces/drivers that does + * not support offloading breaks L4 traffic. + */ + *features &= (~OFFLOAD_FEATURES); +#endif + DBG_SOCK("supported features: 0x%lx", *features); return 0; }