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 017C0A0542 for ; Fri, 7 Feb 2020 16:14:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE07E1C124; Fri, 7 Feb 2020 16:14:11 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 233E61BF8E for ; Fri, 7 Feb 2020 16:14:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581088449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0VNO84a1slLySVPPkLhtG2G8zUNx7SqyoSha9BZkSVE=; b=EStvCN1dqGBm7BH68yHZ+0DTguYnYhcd0UaP0OAkSXmIkZqLpX7dn4jgqJi6c4308XjQYi x1mDRVYxys4HmiTmddvG3apJhKhPPmM+ToSpqh89zWLSZ+pW841cNZ7iccVWywEgHoGgYq ztX4JC+ArWEymtWe1W+GjkOHjHX+cT4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-358-elVIIrWxMYudKeVZeIdeuw-1; Fri, 07 Feb 2020 10:13:51 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0C64800D54; Fri, 7 Feb 2020 15:13:50 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD4D910016DA; Fri, 7 Feb 2020 15:13:49 +0000 (UTC) From: Kevin Traynor To: Yunjian Wang Cc: Tiwei Bie , dpdk stable Date: Fri, 7 Feb 2020 15:12:37 +0000 Message-Id: <20200207151248.29804-25-ktraynor@redhat.com> In-Reply-To: <20200207151248.29804-1-ktraynor@redhat.com> References: <20200207151248.29804-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: elVIIrWxMYudKeVZeIdeuw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/vhost: check creation failure' has been queued to LTS release 18.11.7 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 LTS release 18.11.7 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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/59e1f980a43d801e20= 2dc5b03e1d14f6abcb7281 Thanks. Kevin. --- >From 59e1f980a43d801e202dc5b03e1d14f6abcb7281 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 b70b9152f8..47d0102e0e 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1287,5 +1287,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, cha= r *iface_name, =20 =09rte_eth_dev_probing_finish(eth_dev); -=09return data->port_id; +=09return 0; =20 error: @@ -1425,6 +1425,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) =09=09dev->device.numa_node =3D rte_socket_id(); =20 -=09eth_dev_vhost_create(dev, iface_name, queues, dev->device.numa_node, -=09=09flags); +=09ret =3D eth_dev_vhost_create(dev, iface_name, queues, +=09=09=09=09 dev->device.numa_node, flags); +=09if (ret =3D=3D -1) +=09=09VHOST_LOG(ERR, "Failed to create %s\n", name); =20 out_free: --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-07 15:08:18.829379030 +0000 +++ 0025-net-vhost-check-creation-failure.patch=092020-02-07 15:08:17.54306= 2564 +0000 @@ -1 +1 @@ -From f04513bc89d90c2ad425f1be1e4716bb3c790fb2 Mon Sep 17 00:00:00 2001 +From 59e1f980a43d801e202dc5b03e1d14f6abcb7281 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 46f01a7f46..a63588986f 100644 +index b70b9152f8..47d0102e0e 100644 @@ -22 +23 @@ -@@ -1303,5 +1303,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, ch= ar *iface_name, +@@ -1287,5 +1287,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, ch= ar *iface_name, @@ -29 +30 @@ -@@ -1456,6 +1456,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) +@@ -1425,6 +1425,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) @@ -33 +34 @@ --=09=09flags, disable_flags); +-=09=09flags); @@ -35 +36 @@ -+=09=09=09=09 dev->device.numa_node, flags, disable_flags); ++=09=09=09=09 dev->device.numa_node, flags);