From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id A48518D95 for ; Sun, 20 May 2018 15:09:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 52B2D21C46; Sun, 20 May 2018 09:09:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 20 May 2018 09:09:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=UiJKMYaUwbgtM1wAP JIdPH/1mjwtVYNKMV/oc6i7G7k=; b=nw3cWqaua66lSoy5EQSQeMZfJ5JpVYJba wXI5HOK2bf5surqx8L8ItS/FQz+kpm6tnFsfbcxCL3HXxB1yEkwcfKnAp5ZUqJOv mg5nNH2h7kMPs36j+g7S6tOpIzcoUx7Kr32exHtv7sESY3evrkJEbgBKy1/7fkjH SM3Pp3BXCdncB/yjewwSBVBgU4LEBQh3SGdihkR4wQCAvjcnmPMOWFaJwCCDs2Rz HTB+9uryHLf8GEF0zW66dgbMKVBE+0mzB2gzGA9lNWqt9/5QAbh14i4+38yJQ/41 X1APgsGM65p9qkuYlSdvnylfTyifYEAltsNtBtJARnVFSsNbwVXAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=UiJKMYaUwbgtM1wAPJIdPH/1mjwtVYNKMV/oc6i7G7k=; b=nlalTCKU us6kp+rAyyyw7DzdvZSndGi+DkVsB/uvv2x9DaSdu4fth36wboeiDV34U4MYMeQ7 UqKzL9FKQKtTfj6054b0s0P1rGBsodBLd6QtydCZXrZbLHt+fmYMgOZ/5FGBvxnx 9Gy2rAQ5n57sPUXuU/Xdms9980/qP3NiEle4d24tKL2yIKBFnrTMVJMlnRcnl/2e ZWiWC7h74htrPKQRB8HzC2OAlc384/g13lQSHRA9CVdwh3EW3VWZxC8E+NEkvIP/ fhais5gxr/rodDX9AH7pUn4sqWrz5yy9hJIQjy5kG+qzXTLE+mue2M8HpQJqAl3/ sd4ngiio/Qh6Kg== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.80]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B0A81025C; Sun, 20 May 2018 09:09:04 -0400 (EDT) From: Yuanhan Liu To: Ciara Loftus Cc: Maxime Coquelin , dpdk stable Date: Sun, 20 May 2018 21:02:34 +0800 Message-Id: <20180520130246.16287-18-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180520130246.16287-1-yliu@fridaylinux.org> References: <20180520130246.16287-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/vhost: initialise device as inactive' has been queued to LTS release 17.11.3 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: , X-List-Received-Date: Sun, 20 May 2018 13:09:06 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/27/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 340466ddf98ee1f2e59a1167186c6ca76da0170e Mon Sep 17 00:00:00 2001 From: Ciara Loftus Date: Thu, 3 May 2018 14:17:03 +0100 Subject: [PATCH] net/vhost: initialise device as inactive [ upstream commit aee6c97f006cea7b1c791b21b222442437ee5403 ] rte_eth_vhost_get_vid_from_port_id returns a value of 0 if called before the first call to the new_device callback. A vid value >=0 suggests the device is active which is not the case in this instance. Initialise vid to a negative value to prevent this. Fixes: ee584e9710b9 ("vhost: add driver on top of the library") Signed-off-by: Ciara Loftus Reviewed-by: Maxime Coquelin --- drivers/net/vhost/rte_eth_vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index caf9fce0a..6091b3224 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -117,7 +117,7 @@ struct pmd_internal { char *dev_name; char *iface_name; uint16_t max_queues; - uint16_t vid; + int vid; rte_atomic32_t started; }; @@ -1108,6 +1108,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->nb_rx_queues = queues; data->nb_tx_queues = queues; internal->max_queues = queues; + internal->vid = -1; data->dev_link = pmd_link; data->mac_addrs = eth_addr; data->dev_flags = RTE_ETH_DEV_INTR_LSC; -- 2.11.0