aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShesha Sreenivasamurthy <shesha@cisco.com>2016-04-25 13:34:53 -0400
committerDamjan Marion <damarion@cisco.com>2016-04-25 19:09:31 +0000
commit423f723a5a07099ad3119c4b4f089cf680912d9d (patch)
tree497580bc8d07cf6fb29d818308295a7c94dd9c60
parentcbdd897846aa13b2d16c3379b7344a1b830ce80e (diff)
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 <shesha@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/vhost_user.c15
1 files changed, 15 insertions, 0 deletions
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;
}