DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Olivier Matz <olivier.matz@6wind.com>, dev@dpdk.org
Cc: Chenbo Xia <chenbo.xia@intel.com>, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix advertising of protocol features
Date: Tue, 22 Dec 2020 11:48:31 +0100
Message-ID: <710fc978-a4ab-aa76-537a-3cd2f7e690af@redhat.com> (raw)
In-Reply-To: <20201218132352.15834-1-olivier.matz@6wind.com>



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 <maxime.coquelin@redhat.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> 
> 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 <maxime.coquelin@redhat.com>

Thanks!
Maxime


  reply	other threads:[~2020-12-22 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 12:52 [dpdk-dev] [PATCH] " Olivier Matz
2020-12-18 13:23 ` [dpdk-dev] [PATCH v2] " Olivier Matz
2020-12-22 10:48   ` Maxime Coquelin [this message]
2021-01-08  9:15   ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=710fc978-a4ab-aa76-537a-3cd2f7e690af@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git