net/mlx5e: Consider PTP-RQ when setting RX VLAN stripping

Add PTP-RQ to the loop when setting rx-vlan-offload feature via ethtool.
On PTP-RQ's creation, set rx-vlan-offload into its parameters.

Fixes: a099da8ffc ("net/mlx5e: Add RQ to PTP channel")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Aya Levin
2021-06-30 11:17:12 +03:00
committed by Saeed Mahameed
parent 9841d58f35
commit a759f845d1
2 changed files with 7 additions and 2 deletions

View File

@@ -482,8 +482,11 @@ static void mlx5e_ptp_build_params(struct mlx5e_ptp *c,
params->log_sq_size = orig->log_sq_size; params->log_sq_size = orig->log_sq_size;
mlx5e_ptp_build_sq_param(c->mdev, params, &cparams->txq_sq_param); mlx5e_ptp_build_sq_param(c->mdev, params, &cparams->txq_sq_param);
} }
if (test_bit(MLX5E_PTP_STATE_RX, c->state)) /* RQ */
if (test_bit(MLX5E_PTP_STATE_RX, c->state)) {
params->vlan_strip_disable = orig->vlan_strip_disable;
mlx5e_ptp_build_rq_param(c->mdev, c->netdev, c->priv->q_counter, cparams); mlx5e_ptp_build_rq_param(c->mdev, c->netdev, c->priv->q_counter, cparams);
}
} }
static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params, static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,

View File

@@ -3384,7 +3384,7 @@ static int mlx5e_modify_channels_scatter_fcs(struct mlx5e_channels *chs, bool en
static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd) static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd)
{ {
int err = 0; int err;
int i; int i;
for (i = 0; i < chs->num; i++) { for (i = 0; i < chs->num; i++) {
@@ -3392,6 +3392,8 @@ static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd)
if (err) if (err)
return err; return err;
} }
if (chs->ptp && test_bit(MLX5E_PTP_STATE_RX, chs->ptp->state))
return mlx5e_modify_rq_vsd(&chs->ptp->rq, vsd);
return 0; return 0;
} }