From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 2456E1B7A9 for ; Tue, 15 May 2018 15:48:54 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id p4-v6so234871wrh.3 for ; Tue, 15 May 2018 06:48:54 -0700 (PDT) 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; bh=tCE+ozk9OcbM9PUtSiwRQhsAQ570k8GojnwVeMuyYZk=; b=ZiOs+RIKIianS/XWr/NB12Ug4jbChohYgWsO9zSnjPChSSVDXQKZQu2LYIUGIExGqP lFEYhVJ6E9KTX9615BMJLd2b2QdTdkeTeXk5PLzEHEJPwD7F/F3k7b55/Fj8S8tqo4Mu b+j1x9ERKqrRAqlqEtL1N60DbZGRCEZpR1MQh04DcUjvLyEeVP8dVGYvI256AgJ5CfvZ JO/mGXqtAQh3Tpo2UY2Rkk0vA6BT9if3IKQThAdU26zQtk2Db3Ea6Xx/tsohdjD0VcPA p9NA5O4RZerNqYyIg16XxN+mmWqOa6tBAGgRpLfs/3/lkKS8RHrsgZJhzT6n7PFGiV8b FWdQ== 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; bh=tCE+ozk9OcbM9PUtSiwRQhsAQ570k8GojnwVeMuyYZk=; b=DXe9e3mEkY0bI8ViD1Tgof6EZ25fb3y5+fmdcBJEw4nmy+8ZmuFS49Dt4064uGIgD3 CUQey5/JD+NEkSBqdJmOEkQMIbEtoTyn0IhbfnmO2/55qhlxeTOmEJKKLTlWplUgGu2v YovgLyci0UYYWqbHz2O6IVky94PjE7wMjtv2Va7U5HhPaWvNC5aqC5Fw8GMHTJmw/P+d uTFHLGVwJKVKCetrYfD/V+IeQgKpTw7VPPfpfJ9cyz9yP9ljpuR0VNfwEr0t5eEIbuHD nxuZAkrwGON2pEBlrGTBWnwY3cVganufUk9AYi+VTAHGLuLjwDxdPnEgTxHKfukrWdDC cktg== X-Gm-Message-State: ALKqPwdgPNEja9xBkiqmwZKburc7KPHPYDsiS2izEJuli5iZHe7netYt vW5H86I2fcdo8QcV2RjO3YrpbAckKw8= X-Google-Smtp-Source: AB8JxZrO5DK2JTHkqAyZbJUFm4fcHuAfkifilf+JTxKpr3dLqpxiHZLFi216M5ttFUl1gPH10xqV4w== X-Received: by 2002:adf:8248:: with SMTP id 66-v6mr11046155wrb.127.1526392133881; Tue, 15 May 2018 06:48:53 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id g7-v6sm123742wrb.60.2018.05.15.06.48.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:48:52 -0700 (PDT) From: luca.boccassi@gmail.com To: Ciara Loftus Cc: Maxime Coquelin , dpdk stable Date: Tue, 15 May 2018 14:46:54 +0100 Message-Id: <20180515134731.9337-43-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/vhost: initialise device as inactive' has been queued to stable release 18.02.2 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: Tue, 15 May 2018 13:48:54 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 98615efc2819b0cc56f8ab41a810de402515288e 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 e392d719b..1a1d532e7 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; }; @@ -1105,6 +1105,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.14.2