[SRU][G/F][PATCH 0/1] net/mlx5e: Fix multicast counter not up-to-date in "ip -s"

William Breathitt Gray william.gray at canonical.com
Fri Jan 15 13:46:08 UTC 2021


[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 47c97e6b10a1
("net/mlx5e: Fix multicast counter not up-to-date in "ip -s"").

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. No change in the code of upstream path, only
context adjustments.

Ron Diskin (1):
  net/mlx5e: Fix multicast counter not up-to-date in "ip -s"

 drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h  | 5 +++++
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 8 +-------
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    | 4 ++++
 drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 ++
 4 files changed, 12 insertions(+), 7 deletions(-)

-- 
2.27.0




More information about the kernel-team mailing list