** Changed in: linux (Ubuntu Groovy)
Importance: Undecided => Medium
** Changed in: linux (Ubuntu Groovy)
Status: New => In Progress
** Changed in: linux (Ubuntu Focal)
Importance: Undecided => Medium
** Changed in: linux (Ubuntu Focal)
Status: New => In Progress
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1901842
Title:
Ubuntu 20.04 - multicast counter is not increased in ip -s
Status in linux package in Ubuntu:
Invalid
Status in linux source package in Focal:
In Progress
Status in linux source package in Groovy:
In Progress
Status in linux source package in Hirsute:
Invalid
Bug description:
[Impact]
on a mlx5 device rx-mcast counter is not increased in ip -s after receiving
mcast packets.
Rx-packets counter is increased normally.
[test case]
send multicast packets to a mlx5 device using mcast address (like 224.0.0.1)
# iperf --client 224.0.0.1 -u --bind 15.194.5.1
see that before and after sending the mcast counter remains the same
before:
# ip -s l show ens5f0
10: ens5f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode
DEFAULT group default qlen 1000
link/ether ec:0d:9a:d4:2d:fc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
1350216 893 0 0 0 0
TX: bytes packets errors dropped carrier collsns
16221 94 0 0 0 0
after
# ip -s l show ens5f0
10: ens5f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode
DEFAULT group default qlen 1000
link/ether ec:0d:9a:d4:2d:fc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
2700432 1786 0 0 0 0
TX: bytes packets errors dropped carrier collsns
16221 94 0 0 0 0
[Fix]
The issue is solved with upstream commit:
commit 47c97e6b10a1e3680cad539929da092bfa535446
Author: Ron Diskin <[email protected]>
Date: Sun May 10 14:39:51 2020 +0300
net/mlx5e: Fix multicast counter not up-to-date in "ip -s"
Currently the FW does not generate events for counters other than error
counters. Unlike ".get_ethtool_stats", ".ndo_get_stats64" (which ip -s
uses) might run in atomic context, while the FW interface is non atomic.
Thus, 'ip' is not allowed to issue FW commands, so it will only display
cached counters in the driver.
Add a SW counter (mcast_packets) in the driver to count rx multicast
packets. The counter also counts broadcast packets, as we consider it a
special case of multicast.
Use the counter value when calling "ip -s"/"ifconfig".
Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4
Ethernet functionality")
Signed-off-by: Ron Diskin <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
after applying this patch the mcast counter is increased.
before sending mcast packets
# ip -s l show ens5f0
10: ens5f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode
DEFAULT group default qlen 1000
link/ether ec:0d:9a:d4:2d:fc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
7182 41 0 0 0 0
after sending mcast packets
# ip -s l show ens5f0
10: ens5f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode
DEFAULT group default qlen 1000
link/ether ec:0d:9a:d4:2d:fc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
1350216 893 0 0 0 893
TX: bytes packets errors dropped carrier collsns
9860 58 0 0 0 0
The patch is applied with 2 rejected hunks that need to be inserted
manually with no changes.
[Regression Potential]
Regression risk is low since this patch is small and inserts only minor
changes to the statistics mechanism.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1901842/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp