Only update lossy buffers config when manual PFC configuration was done
in mlx5en(4). Submitted by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
9b0d03698b
commit
6fbbf1abad
@ -1046,6 +1046,7 @@ struct mlx5e_priv {
|
||||
u_int clbr_gen;
|
||||
|
||||
struct mlx5e_dcbx dcbx;
|
||||
bool sw_is_port_buf_owner;
|
||||
|
||||
struct pfil_head *pfil;
|
||||
struct mlx5e_channel channel[];
|
||||
|
@ -3903,7 +3903,7 @@ mlx5e_sysctl_rx_priority_flow_control(SYSCTL_HANDLER_ARGS)
|
||||
/* check if update is required */
|
||||
if (rx_pfc != priv->params.rx_priority_flow_control) {
|
||||
err = -mlx5e_set_port_pfc(priv);
|
||||
if (err == 0)
|
||||
if (err == 0 && priv->sw_is_port_buf_owner)
|
||||
err = mlx5e_update_buf_lossy(priv);
|
||||
}
|
||||
done:
|
||||
|
@ -263,6 +263,7 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
priv->sw_is_port_buf_owner = true;
|
||||
err = update_buffer_lossy(mtu, pfc->pfc_en, buffer, xoff,
|
||||
&port_buffer, &update_buffer);
|
||||
if (err)
|
||||
@ -316,13 +317,16 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,
|
||||
|
||||
/* Apply the settings */
|
||||
if (update_buffer) {
|
||||
priv->sw_is_port_buf_owner = true;
|
||||
err = port_set_buffer(priv, &port_buffer);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (update_prio2buffer)
|
||||
if (update_prio2buffer) {
|
||||
priv->sw_is_port_buf_owner = true;
|
||||
err = mlx5e_port_set_priority2buffer(priv->mdev, prio2buffer);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user