[v3,8/8] vdpa/mlx5: enable status protocol feature

Message ID 20200706112452.1474533-9-amorenoz@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series vhost: improve Vhost/vDPA device init |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Adrian Moreno July 6, 2020, 11:24 a.m. UTC
From: Maxime Coquelin <maxime.coquelin@redhat.com>

This patch advertises VHOST_USER_PROTOCOL_F_STATUS
support in the MLX5 driver so that that the protocol
feature is negotiated.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Chenbo Xia July 7, 2020, 3:23 a.m. UTC | #1
> -----Original Message-----
> From: Adrian Moreno <amorenoz@redhat.com>
> Sent: Monday, July 6, 2020 7:25 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; shahafs@mellanox.com; matan@mellanox.com;
> maxime.coquelin@redhat.com; Wang, Xiao W <xiao.w.wang@intel.com>;
> viacheslavo@mellanox.com
> Cc: jasowang@redhat.com; lulu@redhat.com
> Subject: [PATCH v3 8/8] vdpa/mlx5: enable status protocol feature
> 
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> This patch advertises VHOST_USER_PROTOCOL_F_STATUS support in the MLX5
> driver so that that the protocol feature is negotiated.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
> index dbd36ab0c..83901e37f 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
> @@ -39,7 +39,8 @@
>  			     (1ULL <<
> VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
>  			     (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)
> | \
>  			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
> -			     (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU))
> +			     (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) | \
> +			     (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
> 
>  #define MLX5_VDPA_MAX_RETRIES 20
>  #define MLX5_VDPA_USEC 1000
> --
> 2.26.2

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
  

Patch

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index dbd36ab0c..83901e37f 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -39,7 +39,8 @@ 
 			     (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
-			     (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU))
+			     (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) | \
+			     (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
 
 #define MLX5_VDPA_MAX_RETRIES 20
 #define MLX5_VDPA_USEC 1000