From 423f723a5a07099ad3119c4b4f089cf680912d9d Mon Sep 17 00:00:00 2001 From: Shesha Sreenivasamurthy Date: Mon, 25 Apr 2016 13:34:53 -0400 Subject: 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 --- vnet/vnet/devices/dpdk/vhost_user.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vnet') diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index 61a206cd..7691ff8e 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; } -- cgit