DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes
@ 2019-11-12  8:53 Viacheslav Ovsiienko
  2019-11-12  8:56 ` Matan Azrad
  2019-11-12 11:41 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Viacheslav Ovsiienko @ 2019-11-12  8:53 UTC (permalink / raw)
  To: dev; +Cc: matan, rasland, orika

Host adapter attributes are queried from kernel via multiple
DevX calls. The retrieved data were erroneously overwritten,
the order of querying is fixed.

Fixes: e470ec789d4d ("net/mlx5: fill meter capabilities using DevX")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_devx_cmds.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c b/drivers/net/mlx5/mlx5_devx_cmds.c
index dcb7609..9893287 100644
--- a/drivers/net/mlx5/mlx5_devx_cmds.c
+++ b/drivers/net/mlx5/mlx5_devx_cmds.c
@@ -335,6 +335,11 @@ struct mlx5_devx_obj *
 	attr->log_max_hairpin_num_packets = MLX5_GET
 		(cmd_hca_cap, hcattr, log_min_hairpin_wq_data_sz);
 	attr->vhca_id = MLX5_GET(cmd_hca_cap, hcattr, vhca_id);
+	attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
+					  eth_net_offloads);
+	attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
+	attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
+					       flex_parser_protocols);
 	attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);
 	if (attr->qos.sup) {
 		MLX5_SET(query_hca_cap_in, in, op_mod,
@@ -358,11 +363,6 @@ struct mlx5_devx_obj *
 		attr->qos.flow_meter_reg_c_ids =
 			MLX5_GET(qos_cap, hcattr, flow_meter_reg_id);
 	}
-	attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
-					  eth_net_offloads);
-	attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
-	attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
-					       flex_parser_protocols);
 	if (!attr->eth_net_offloads)
 		return 0;
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes
  2019-11-12  8:53 [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes Viacheslav Ovsiienko
@ 2019-11-12  8:56 ` Matan Azrad
  2019-11-12 11:41 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2019-11-12  8:56 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam



From: Viacheslav Ovsiienko
> Host adapter attributes are queried from kernel via multiple DevX calls. The
> retrieved data were erroneously overwritten, the order of querying is fixed.
> 
> Fixes: e470ec789d4d ("net/mlx5: fill meter capabilities using DevX")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes
  2019-11-12  8:53 [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes Viacheslav Ovsiienko
  2019-11-12  8:56 ` Matan Azrad
@ 2019-11-12 11:41 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-11-12 11:41 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Matan Azrad, Ori Kam

Hi,

> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Sent: Tuesday, November 12, 2019 10:54 AM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>
> Subject: [PATCH] net/mlx5: fix query host adapter attributes
> 
> Host adapter attributes are queried from kernel via multiple
> DevX calls. The retrieved data were erroneously overwritten,
> the order of querying is fixed.
> 
> Fixes: e470ec789d4d ("net/mlx5: fill meter capabilities using DevX")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_devx_cmds.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c
> b/drivers/net/mlx5/mlx5_devx_cmds.c
> index dcb7609..9893287 100644
> --- a/drivers/net/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/net/mlx5/mlx5_devx_cmds.c
> @@ -335,6 +335,11 @@ struct mlx5_devx_obj *
>  	attr->log_max_hairpin_num_packets = MLX5_GET
>  		(cmd_hca_cap, hcattr, log_min_hairpin_wq_data_sz);
>  	attr->vhca_id = MLX5_GET(cmd_hca_cap, hcattr, vhca_id);
> +	attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
> +					  eth_net_offloads);
> +	attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
> +	attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
> +					       flex_parser_protocols);
>  	attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);
>  	if (attr->qos.sup) {
>  		MLX5_SET(query_hca_cap_in, in, op_mod,
> @@ -358,11 +363,6 @@ struct mlx5_devx_obj *
>  		attr->qos.flow_meter_reg_c_ids =
>  			MLX5_GET(qos_cap, hcattr, flow_meter_reg_id);
>  	}
> -	attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
> -					  eth_net_offloads);
> -	attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
> -	attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
> -					       flex_parser_protocols);
>  	if (!attr->eth_net_offloads)
>  		return 0;
> 
> --
> 1.8.3.1


Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-12 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12  8:53 [dpdk-dev] [PATCH] net/mlx5: fix query host adapter attributes Viacheslav Ovsiienko
2019-11-12  8:56 ` Matan Azrad
2019-11-12 11:41 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).