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 F3A13A051C for ; Tue, 11 Feb 2020 12:28:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB1BD2B9C; Tue, 11 Feb 2020 12:28:01 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id A739F1BDFD for ; Tue, 11 Feb 2020 12:28:00 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id c84so3063835wme.4 for ; Tue, 11 Feb 2020 03:28:00 -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=7juur1glXOqDR6QfzrC+LicGKwkuR4k4aJPvIheu8EY=; b=EESIKFTkovU4CHxSj0RnAmAmcSVUne9t1A6rfyBBno8Ldmmj6MTHTLDvvghF8swaKj 2rw8aW2aE+jtooCbtEPvT5PuTI4FXcj+ZyzbOdp50Qm0Ahr4sjYx2FoPAw4XHWtTCM6g hihl9Zli8uMKumVm/niCU5lOScaBezdWMNtnKCTvZmKkOj/iBBWio6j4gC6yzfTyowcQ eeNsiqqfXmWrV7z1gtgehXfkmSIl0dZyKhyw8YSq5x2nbWa/CITY1O3t291yEnjw/rdE RLCceZf7BfvFOWiCfq8a4+Dm46aWXLFmmTL50sED8GDG3V7yrrBqaZJUlcHkGvH73rFC U/rQ== 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=7juur1glXOqDR6QfzrC+LicGKwkuR4k4aJPvIheu8EY=; b=ZZfWj9tLjvgGDQypmiaYqmjrlTrFSCXYJskj3KKBVQGLswRIH4dWgO1DQ5wJgatgzr rB5mRsbCRYFDiIHbKDYFuk/d2euXDN2cgflBrjutjwPwp8Vaz5VwkptXFmr7YoZSg7FM xul3H8gd9sTyV42GaCl3BaJDFU3Jl9AkwCR2ADzABMwn2iznaHGsKV5cNrwRhMys2yBo rBABO9e2hEkfAQRaZ3WWDRz9hDTYhOSSrSW1T2nDnvNiPBRHfiMPXfJuDR74dzRhgpLy Dug3EZnNCx2vWjFw0sppAplvJ19qO5bxAJA+zBNpwKV2QRv5edwoC7qR+mRTp/BKwdl9 NJUQ== X-Gm-Message-State: APjAAAUUd81SNIYMqXKgSfmvfA7o5MknncWjoBm/VeZCaNYF3moJH7Ag 5BJSJRsNUPww+efsMYbbxxM= X-Google-Smtp-Source: APXvYqzzx5w9XF75y4lug7WmrspTVxjU8BfOhrUQ2Defa0xwj7VpnGp5u+2vet/7UYOEgyCw3WSmIw== X-Received: by 2002:a1c:a952:: with SMTP id s79mr5389604wme.83.1581420480351; Tue, 11 Feb 2020 03:28:00 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r3sm4971663wrn.34.2020.02.11.03.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:27:59 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Tiwei Bie , dpdk stable Date: Tue, 11 Feb 2020 11:20:09 +0000 Message-Id: <20200211112216.3929-63-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/vhost: check creation 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 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 7 Jan 2020 11:25:48 +0800 Subject: [PATCH] net/vhost: check creation failure [ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ] The function eth_dev_vhost_create() could return errors, the return value need to be checked. Fixes: ee584e9710b9 ("vhost: add driver on top of the library") Signed-off-by: Yunjian Wang Reviewed-by: Tiwei Bie --- drivers/net/vhost/rte_eth_vhost.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 46f01a7f46..a63588986f 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1302,7 +1302,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, } rte_eth_dev_probing_finish(eth_dev); - return data->port_id; + return 0; error: if (internal) { @@ -1455,8 +1455,10 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) if (dev->device.numa_node == SOCKET_ID_ANY) dev->device.numa_node = rte_socket_id(); - eth_dev_vhost_create(dev, iface_name, queues, dev->device.numa_node, - flags, disable_flags); + ret = eth_dev_vhost_create(dev, iface_name, queues, + dev->device.numa_node, flags, disable_flags); + if (ret == -1) + VHOST_LOG(ERR, "Failed to create %s\n", name); out_free: rte_kvargs_free(kvlist); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.227581606 +0000 +++ 0063-net-vhost-check-creation-failure.patch 2020-02-11 11:17:38.456002394 +0000 @@ -1,13 +1,14 @@ -From f04513bc89d90c2ad425f1be1e4716bb3c790fb2 Mon Sep 17 00:00:00 2001 +From 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 7 Jan 2020 11:25:48 +0800 Subject: [PATCH] net/vhost: check creation failure +[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ] + The function eth_dev_vhost_create() could return errors, the return value need to be checked. Fixes: ee584e9710b9 ("vhost: add driver on top of the library") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Tiwei Bie