Skip to content

Commit

Permalink
net/mlx5e: Fix condition when retrieving PTP-rqn
Browse files Browse the repository at this point in the history
When activating the PTP-RQ, redirect the RQT from drop-RQ to PTP-RQ.
Use mlx5e_channels_get_ptp_rqn to retrieve the rqn. This helper returns
a boolean (not status), hence caller should consider return value 0 as a
fail. Change the caller interpretation of the return value.

Fixes: 43ec0f4 ("net/mlx5e: Hide all implementation details of mlx5e_rx_res")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Aya Levin authored and Saeed Mahameed committed Sep 7, 2021
1 parent c91c1da commit 8db6a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ void mlx5e_rx_res_channels_activate(struct mlx5e_rx_res *res, struct mlx5e_chann
if (res->features & MLX5E_RX_RES_FEATURE_PTP) {
u32 rqn;

if (mlx5e_channels_get_ptp_rqn(chs, &rqn))
if (!mlx5e_channels_get_ptp_rqn(chs, &rqn))
rqn = res->drop_rqn;

err = mlx5e_rqt_redirect_direct(&res->ptp.rqt, rqn);
Expand Down

0 comments on commit 8db6a54

Please sign in to comment.