Subject: [PATCH 33/41] virtio-net: enable TSO/checksum offloads for Q-in-Q vlans

From: Vlad Yasevich <[email-masked]>
Date: Tue, 23 May 2017 13:38:43 -0400

[ Upstream commit 2836b4f224d4fd7d1a2b23c3eecaf0f0ae199a74 ]

Since virtio does not provide it's own ndo_features_check handler,
TSO, and now checksum offload, are disabled for stacked vlans.
Re-enable the support and let the host take care of it.  This
restores/improves Guest-to-Guest performance over Q-in-Q vlans.

Acked-by: Jason Wang <[email-masked]>
Acked-by: Michael S. Tsirkin <[email-masked]>
Signed-off-by: Vladislav Yasevich <[email-masked]>
Signed-off-by: David S. Miller <[email-masked]>
---
 drivers/net/virtio_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f365846..d9d8f4f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1894,6 +1894,7 @@ static const struct net_device_ops virtnet_netdev = {
 	.ndo_poll_controller = virtnet_netpoll,
 #endif
 	.ndo_xdp		= virtnet_xdp,
+	.ndo_features_check	= passthru_features_check,
 };
 
 static void virtnet_config_changed_work(struct work_struct *work)
-- 
2.4.11