提交 192fd72b 编写于 作者: F Feras Daoud 提交者: Xie XiuQi

net/mlx5e: IPoIB, Initialize max_opened_tc in mlx5i_init flow

mainline inclusion
from mainline-4.20
commit 6dae6f06f0fc
category: bugfix
bugzilla: 6101
CVE: NA

-------------------------------------------------

Enhanced ipoib does not initialize max_opened_tc causing wrong ethtool
statistics. As mlx5e_grp_sw_update_stats relies on this variable, without
this change, the TX statistics will not be updated.

Fixes: 05909bab ("net/mlx5e: Avoid reset netdev stats on configuration changes")
Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NKeefe LIU <liuqifa@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 13fcec4d
...@@ -83,6 +83,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev, ...@@ -83,6 +83,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
priv->netdev = netdev; priv->netdev = netdev;
priv->profile = profile; priv->profile = profile;
priv->ppriv = ppriv; priv->ppriv = ppriv;
priv->max_opened_tc = 1;
mutex_init(&priv->state_lock); mutex_init(&priv->state_lock);
mlx5_query_port_max_mtu(mdev, &max_mtu, 1); mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册