[dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:38 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From b14d5ed90a4bff8043d6cbf27930a36672eacf8b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 13 Jan 2020 15:40:31 +0800
Subject: [PATCH] net/virtio-user: check tap offload setting failure

[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]

The function vhost_kernel_tap_set_offload() could return errors,
the return value need to be checked. And there is no need to fail
when error is -ENOTSUP.

Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
---
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 2fbfecba12..2fa4f0d661 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -74,6 +74,7 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 	int sndbuf = INT_MAX;
 	struct ifreq ifr;
 	int tapfd;
+	int ret;
 
 	/* TODO:
 	 * 1. verify we can get/set vnet_hdr_len, tap_probe_vnet_hdr_len
@@ -139,7 +140,9 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 		goto error;
 	}
 
-	vhost_kernel_tap_set_offload(tapfd, features);
+	ret = vhost_kernel_tap_set_offload(tapfd, features);
+	if (ret < 0 && ret != -ENOTSUP)
+		goto error;
 
 	memset(&ifr, 0, sizeof(ifr));
 	ifr.ifr_hwaddr.sa_family = ARPHRD_ETHER;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:42.097645526 +0000
+++ 0092-net-virtio-user-check-tap-offload-setting-failure.patch	2020-02-11 11:17:38.532003815 +0000
@@ -1,14 +1,15 @@
-From 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 Mon Sep 17 00:00:00 2001
+From b14d5ed90a4bff8043d6cbf27930a36672eacf8b Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Mon, 13 Jan 2020 15:40:31 +0800
 Subject: [PATCH] net/virtio-user: check tap offload setting failure
 
+[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]
+
 The function vhost_kernel_tap_set_offload() could return errors,
 the return value need to be checked. And there is no need to fail
 when error is -ENOTSUP.
 
 Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>


More information about the stable mailing list