Commit eb9ead0d authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Zheng Zengkai
Browse files

ethtool: pause: make sure we init driver stats



stable inclusion
from stable-5.10.32
commit 1aec111c944fc0d29ba48385d56d229f4f8bac90
bugzilla: 51796

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

commit 16756d3e upstream.

The intention was for pause statistics to not be reported
when driver does not have the relevant callback (only
report an empty netlink nest). What happens currently
we report all 0s instead. Make sure statistics are
initialized to "not set" (which is -1) so the dumping
code skips them.

Fixes: 9a27a330 ("ethtool: add standard pause stats")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent bbfe1207
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment