From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 117E21B31B for ; Thu, 15 Feb 2018 13:03:31 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id t74so356725wme.3 for ; Thu, 15 Feb 2018 04:03:31 -0800 (PST) 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=AnPHK7ZPEGw+iFnEmtr4V+GPdvz0acHgidd17DpuNCE=; b=ATv4pD9w3Sxva4GufQX/zhCOTWS2/K7LhiOL7v2Xywy4KClm1F0r47XBN7Dn1+vRGT spoahPhFp+a0sotGbFgYY4pwuL4W5p3raY2/1T1jf5C1zSLNLZgtXx88PxYAWQYlkz6q Wo9k9TOD4k+BrIhWL8rfYHOy8DKb5upFfJOkoeOFoDi2e+g0HkQ6GQpZVDGkdRNKLpdj H1rsrox/VoPI8WMIR9DIuPdwLkgB1vMI1LZF5umgJ6m9BQpJdilxszSOa0KFyNnCPatV y/v1UBjcvnxwj+PDopzqrzhxGjBiYcmSlTBr0CIuLURXhn3twVQd2UKCpyDfQy7ZOvkX eZkQ== X-Gm-Message-State: APf1xPCxNsqY5grNV9u+0c8tIMsctU1rT+dklbjX4P9F4g+h28fNh7rt zpvYhVQalBuhC/BGoQGR2qI= X-Google-Smtp-Source: AH8x225uXCUbXCB6O0wiZ14uNmcMEgyEIHKthShrcg5df4mSRe0X/DFkOwupEroLD6E3BoZlkI3bow== X-Received: by 10.28.185.196 with SMTP id j187mr2014447wmf.94.1518696210651; Thu, 15 Feb 2018 04:03:30 -0800 (PST) Received: from localhost ([213.251.34.146]) by smtp.gmail.com with ESMTPSA id k125sm26029428wmd.48.2018.02.15.04.03.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 04:03:30 -0800 (PST) From: Luca Boccassi To: Jianfeng Tan Cc: Maxime Coquelin , dpdk stable Date: Thu, 15 Feb 2018 12:03:07 +0000 Message-Id: <20180215120309.28937-5-bluca@debian.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180215120309.28937-1-bluca@debian.org> References: <20180211124911.14557-2-bluca@debian.org> <20180215120309.28937-1-bluca@debian.org> Subject: [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' has been queued to LTS release 16.11.5 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: Thu, 15 Feb 2018 12:03:31 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.5 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/17/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 46c71a6e94c76ac2d9e3dfb07694940d28db5369 Mon Sep 17 00:00:00 2001 From: Jianfeng Tan Date: Mon, 12 Feb 2018 03:20:27 +0000 Subject: [PATCH] net/virtio-user: fix start with kernel vhost [ upstream commit bce7e9050f9b5e92cead60e8ac7768812ce898f2 ] After reset owner in below patch, we failed to set owner before sending further vhost messages. It is OK with vhost user implemented DPDK/VPP/Contrail, but it sees "Operation not permitted" error when used with vhost kernel. We fix this by setting owner every time the device is started. Fixes: 0d6a8752ac9d ("net/virtio-user: fix crash as features change") Signed-off-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 91f6a59a9..8bb155d8c 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -142,6 +142,9 @@ virtio_user_start_device(struct virtio_user_dev *dev) uint64_t features; int ret; + /* Do not check return as already done in init, or reset in stop */ + vhost_user_sock(dev->vhostfd, VHOST_USER_SET_OWNER, NULL); + /* Step 0: tell vhost to create queues */ if (virtio_user_queue_setup(dev, virtio_user_create_queue) < 0) goto error; @@ -240,6 +243,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, PMD_INIT_LOG(ERR, "backend set up fails"); return -1; } + if (vhost_user_sock(dev->vhostfd, VHOST_USER_SET_OWNER, NULL) < 0) { PMD_INIT_LOG(ERR, "set_owner fails: %s", strerror(errno)); return -1; -- 2.14.2