From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 460DEA051C for ; Tue, 11 Feb 2020 12:29:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4069C2952; Tue, 11 Feb 2020 12:29:15 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 70D281BF99 for ; Tue, 11 Feb 2020 12:29:13 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id t23so3054170wmi.1 for ; Tue, 11 Feb 2020 03:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dd9oAbwzdQVH3SeZ8jKMTBZJ3l1ZmBoZuaqVLA5ca1E=; b=kYG+QVkA3JaCnYm926qBiFTKQiR9qkAfuOEj9xAP5XdeE0NzO5f4sacYnl9W3FxuVr WimKqiqUAT8kPEdHW0BaxX/lsmSro1O/vv5sc43V+w5WXO53edy0RTHQyy0Zd73C0vc1 feeP5xFr+T0XCBVbalGElys3TpTJ+S/+1GKVgwbZmidrFL/zf4ReyLJ4OPqVmJPmVoVL Yx/MH9CM03LIxlyhlCnBxLweig1L3mcO/f4YT8quuR/TJhYgUIs3uB/q0unbBgJggHY3 klvQIhZUYAZyydwOVf4L9f4ZONK/pPZdLi6Va09DYCTS4fpVuEPeNsglCjPP6yRne2ww l3TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dd9oAbwzdQVH3SeZ8jKMTBZJ3l1ZmBoZuaqVLA5ca1E=; b=Bxcod9owSft4rKNjIADm054SKn7M6GlqJBs3FY/hdPhs/k2Z9jRtWRYkohY0xV9+jK COsQ9dtMAbI5V9IiS9WCBv0ws93ku60dMU8bfGNdaFJhU7ZEgsDrNdytbGd595VTE/qG fJ+U9RXlbEetMVQF/NTDuVXzi55FElkeunDWeyQmraGPYNGJpEINZsc7x4fzMZpyO71A XvZM3OMMYJWxyem/ktr1Jg0+Qed8fHktJGqUtVBA9osz4++qg1HrfAS1tzWubeTMFdW5 R/o60PkHy7AElfXU7qgXb3cyB3kt1kh9M2KJLFtoN7yImMz33loC5XcG5WvKEcbuXNa8 2WkQ== X-Gm-Message-State: APjAAAXjXLqo1hNU9z2DMGVFoEGo8hNdJc4TZ09ThsSE8LYg+iyV9b8D +t1MWN71u2wXMoQKNquoXnz9GSWcT3c= X-Google-Smtp-Source: APXvYqyDD8Kisf0tFd4ny0nI8CWBDqkHFy9czND9trpWItyPR3KHaz5xCUaehiPabfwNciHCWDCbLA== X-Received: by 2002:a1c:660a:: with SMTP id a10mr5135456wmc.122.1581420553157; Tue, 11 Feb 2020 03:29:13 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id j5sm4933118wrb.33.2020.02.11.03.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:29:12 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Tiwei Bie , dpdk stable Date: Tue, 11 Feb 2020 11:20:38 +0000 Message-Id: <20200211112216.3929-92-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Reviewed-by: Tiwei Bie --- 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 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@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Tiwei Bie