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 8CD78A052A for ; Tue, 22 Dec 2020 11:48:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47BDECA60; Tue, 22 Dec 2020 11:48:41 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 24F09CA3B for ; Tue, 22 Dec 2020 11:48:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608634118; 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=4QEPRdPuJglFN4K0HMCj4uU9rJpqKAcUNStWQ9RTa9U=; b=byrGKUrL1401Rlp8+Vod5g4YAQ4xCqQiPDHjMO6ijo8J3IxooUIoPaTcFP+LwB91LFR3l4 V2kcKCM3MgPq6xZFH6LEl3UZNmj3xRO7SKZLPlA2OMNJKvvMnMmmZOgsAYuzRVT4SHVcVK sUFY1UhlYlA7JZVPqjMKK0py+LJM7wE= 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-556-WxDaZKmiPCiJtrKW3ZvVVA-1; Tue, 22 Dec 2020 05:48:36 -0500 X-MC-Unique: WxDaZKmiPCiJtrKW3ZvVVA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1BF121922965; Tue, 22 Dec 2020 10:48:35 +0000 (UTC) Received: from [10.36.110.46] (unknown [10.36.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0050C5DF25; Tue, 22 Dec 2020 10:48:33 +0000 (UTC) To: Olivier Matz , dev@dpdk.org Cc: Chenbo Xia , stable@dpdk.org References: <20201218125217.12963-1-olivier.matz@6wind.com> <20201218132352.15834-1-olivier.matz@6wind.com> From: Maxime Coquelin Message-ID: <710fc978-a4ab-aa76-537a-3cd2f7e690af@redhat.com> Date: Tue, 22 Dec 2020 11:48:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201218132352.15834-1-olivier.matz@6wind.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH v2] net/virtio-user: fix advertising of protocol features 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" On 12/18/20 2:23 PM, Olivier Matz wrote: > When connected to a vhost-user backend, the flag > VHOST_USER_F_PROTOCOL_FEATURES is not advertised, preventing to do > multiqueue (the VHOST_USER_PROTOCOL_F_MQ protocol feature is ignored by > some backends if the VHOST_USER_F_PROTOCOL_FEATURES feature is not set). > > When setting vhost-user features, advertise this flag if it was > advertised by our peer. > > Fixes: 8e7561054ac7 ("net/virtio: support vhost-user protocol features") > Cc: stable@dpdk.org > > Suggested-by: Maxime Coquelin > Signed-off-by: Olivier Matz > --- > > v2 > * fix obvious fallthrough case, sorry for the noise > > drivers/net/virtio/virtio_user/vhost_user.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c > index b93e65c60b..350eed4182 100644 > --- a/drivers/net/virtio/virtio_user/vhost_user.c > +++ b/drivers/net/virtio/virtio_user/vhost_user.c > @@ -297,13 +297,18 @@ vhost_user_sock(struct virtio_user_dev *dev, > if (has_reply_ack) > msg.flags |= VHOST_USER_NEED_REPLY_MASK; > /* Fallthrough */ > - case VHOST_USER_SET_FEATURES: > case VHOST_USER_SET_PROTOCOL_FEATURES: > case VHOST_USER_SET_LOG_BASE: > msg.payload.u64 = *((__u64 *)arg); > msg.size = sizeof(m.payload.u64); > break; > > + case VHOST_USER_SET_FEATURES: > + msg.payload.u64 = *((__u64 *)arg) | (dev->device_features & > + (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)); > + msg.size = sizeof(m.payload.u64); > + break; > + > case VHOST_USER_SET_OWNER: > case VHOST_USER_RESET_OWNER: > break; > Reviewed-by: Maxime Coquelin Thanks! Maxime