[v1,1/2] common/mlx5: get number of ports that can be bonded
Checks
Commit Message
Get HCA capability: number of physical ports that can be bonded.
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 5 +++--
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
Comments
On 10/28/20 11:44 AM, Xueming Li wrote:
> Get HCA capability: number of physical ports that can be bonded.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> drivers/common/mlx5/mlx5_devx_cmds.c | 5 +++--
> drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
> 2 files changed, 4 insertions(+), 2 deletions(-)
Applied to dpdk-next-virtio/main.
Thanks!
Maxime
@@ -711,6 +711,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
attr->non_wire_sq = MLX5_GET(cmd_hca_cap, hcattr, non_wire_sq);
attr->log_max_static_sq_wq = MLX5_GET(cmd_hca_cap, hcattr,
log_max_static_sq_wq);
+ attr->num_lag_ports = MLX5_GET(cmd_hca_cap, hcattr, num_lag_ports);
attr->dev_freq_khz = MLX5_GET(cmd_hca_cap, hcattr,
device_frequency_khz);
attr->scatter_fcs_w_decap_disable =
@@ -1429,8 +1430,8 @@ mlx5_devx_cmd_create_tis(void *ctx,
tis_ctx = MLX5_ADDR_OF(create_tis_in, in, ctx);
MLX5_SET(tisc, tis_ctx, strict_lag_tx_port_affinity,
tis_attr->strict_lag_tx_port_affinity);
- MLX5_SET(tisc, tis_ctx, strict_lag_tx_port_affinity,
- tis_attr->strict_lag_tx_port_affinity);
+ MLX5_SET(tisc, tis_ctx, lag_tx_port_affinity,
+ tis_attr->lag_tx_port_affinity);
MLX5_SET(tisc, tis_ctx, prio, tis_attr->prio);
MLX5_SET(tisc, tis_ctx, transport_domain,
tis_attr->transport_domain);
@@ -99,6 +99,7 @@ struct mlx5_hca_attr {
uint32_t cross_channel:1;
uint32_t non_wire_sq:1; /* SQ with non-wire ops is supported. */
uint32_t log_max_static_sq_wq:5; /* Static WQE size SQ. */
+ uint32_t num_lag_ports:4; /* Number of ports can be bonded. */
uint32_t dev_freq_khz; /* Timestamp counter frequency, kHz. */
uint32_t scatter_fcs_w_decap_disable:1;
uint32_t regex:1;