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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

William Breathitt Gray
[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


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

William Breathitt Gray
From: Ron Diskin <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1901842

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 <[hidden email]>
Reviewed-by: Tariq Toukan <[hidden email]>
Reviewed-by: Moshe Shemesh <[hidden email]>
Signed-off-by: Saeed Mahameed <[hidden email]>
(backported from commit 47c97e6b10a1e3680cad539929da092bfa535446)
[ vilhelmgray: context adjustments ]
Signed-off-by: William Breathitt Gray <[hidden email]>
---
 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(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
index f07b1399744e..b6418823c63a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
@@ -27,6 +27,11 @@
 
 #define INL_HDR_START_SZ (sizeof(((struct mlx5_wqe_eth_seg *)NULL)->inline_hdr.start))
 
+static inline bool mlx5e_skb_is_multicast(struct sk_buff *skb)
+{
+ return skb->pkt_type == PACKET_MULTICAST || skb->pkt_type == PACKET_BROADCAST;
+}
+
 static inline bool
 mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n)
 {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 8b8581f71e79..24fc71116f48 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3629,6 +3629,7 @@ void mlx5e_fold_sw_stats64(struct mlx5e_priv *priv, struct rtnl_link_stats64 *s)
 
  s->rx_packets   += rq_stats->packets + xskrq_stats->packets;
  s->rx_bytes     += rq_stats->bytes + xskrq_stats->bytes;
+ s->multicast    += rq_stats->mcast_packets + xskrq_stats->mcast_packets;
 
  for (j = 0; j < priv->max_opened_tc; j++) {
  struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
@@ -3644,7 +3645,6 @@ void
 mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
 {
  struct mlx5e_priv *priv = netdev_priv(dev);
- struct mlx5e_vport_stats *vstats = &priv->stats.vport;
  struct mlx5e_pport_stats *pstats = &priv->stats.pport;
 
  /* In switchdev mode, monitor counters doesn't monitor
@@ -3679,12 +3679,6 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
  stats->rx_errors = stats->rx_length_errors + stats->rx_crc_errors +
    stats->rx_frame_errors;
  stats->tx_errors = stats->tx_aborted_errors + stats->tx_carrier_errors;
-
- /* vport multicast also counts packets that are dropped due to steering
- * or rx out of buffer
- */
- stats->multicast =
- VPORT_COUNTER_GET(vstats, received_eth_multicast.packets);
 }
 
 static void mlx5e_set_rx_mode(struct net_device *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 066bada4ccd1..386f49949a23 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -49,6 +49,7 @@
 #include "en/xdp.h"
 #include "en/xsk/rx.h"
 #include "en/health.h"
+#include "en/txrx.h"
 
 static inline bool mlx5e_rx_hw_stamp(struct hwtstamp_config *config)
 {
@@ -1022,6 +1023,9 @@ static inline void mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,
  mlx5e_enable_ecn(rq, skb);
 
  skb->protocol = eth_type_trans(skb, netdev);
+
+ if (unlikely(mlx5e_skb_is_multicast(skb)))
+ stats->mcast_packets++;
 }
 
 static inline void mlx5e_complete_rx_cqe(struct mlx5e_rq *rq,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
index 869f3502f631..f19329039f5a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
@@ -68,6 +68,7 @@ struct mlx5e_sw_stats {
  u64 tx_nop;
  u64 rx_lro_packets;
  u64 rx_lro_bytes;
+ u64 rx_mcast_packets;
  u64 rx_ecn_mark;
  u64 rx_removed_vlan_packets;
  u64 rx_csum_unnecessary;
@@ -235,6 +236,7 @@ struct mlx5e_rq_stats {
  u64 csum_none;
  u64 lro_packets;
  u64 lro_bytes;
+ u64 mcast_packets;
  u64 ecn_mark;
  u64 removed_vlan_packets;
  u64 xdp_drop;
--
2.27.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

William Breathitt Gray
In reply to this post by William Breathitt Gray
From: Ron Diskin <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1901842

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 <[hidden email]>
Reviewed-by: Tariq Toukan <[hidden email]>
Reviewed-by: Moshe Shemesh <[hidden email]>
Signed-off-by: Saeed Mahameed <[hidden email]>
(backported from commit 47c97e6b10a1e3680cad539929da092bfa535446)
[ vilhelmgray: context adjustments ]
Signed-off-by: William Breathitt Gray <[hidden email]>
---
 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(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
index e9d4a61b6bbb..f0aa23d0665b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
@@ -18,6 +18,11 @@ enum mlx5e_icosq_wqe_type {
 #endif
 };
 
+static inline bool mlx5e_skb_is_multicast(struct sk_buff *skb)
+{
+ return skb->pkt_type == PACKET_MULTICAST || skb->pkt_type == PACKET_BROADCAST;
+}
+
 static inline bool
 mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n)
 {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 2651a2ebd2e5..4be75bccad8f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3657,6 +3657,7 @@ void mlx5e_fold_sw_stats64(struct mlx5e_priv *priv, struct rtnl_link_stats64 *s)
 
  s->rx_packets   += rq_stats->packets + xskrq_stats->packets;
  s->rx_bytes     += rq_stats->bytes + xskrq_stats->bytes;
+ s->multicast    += rq_stats->mcast_packets + xskrq_stats->mcast_packets;
 
  for (j = 0; j < priv->max_opened_tc; j++) {
  struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
@@ -3672,7 +3673,6 @@ void
 mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
 {
  struct mlx5e_priv *priv = netdev_priv(dev);
- struct mlx5e_vport_stats *vstats = &priv->stats.vport;
  struct mlx5e_pport_stats *pstats = &priv->stats.pport;
 
  /* In switchdev mode, monitor counters doesn't monitor
@@ -3707,12 +3707,6 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
  stats->rx_errors = stats->rx_length_errors + stats->rx_crc_errors +
    stats->rx_frame_errors;
  stats->tx_errors = stats->tx_aborted_errors + stats->tx_carrier_errors;
-
- /* vport multicast also counts packets that are dropped due to steering
- * or rx out of buffer
- */
- stats->multicast =
- VPORT_COUNTER_GET(vstats, received_eth_multicast.packets);
 }
 
 static void mlx5e_set_rx_mode(struct net_device *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 84f023c891a1..a783487e91bd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -50,6 +50,7 @@
 #include "en/xdp.h"
 #include "en/xsk/rx.h"
 #include "en/health.h"
+#include "en/txrx.h"
 
 static inline bool mlx5e_rx_hw_stamp(struct hwtstamp_config *config)
 {
@@ -1055,6 +1056,9 @@ static inline void mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,
  mlx5e_enable_ecn(rq, skb);
 
  skb->protocol = eth_type_trans(skb, netdev);
+
+ if (unlikely(mlx5e_skb_is_multicast(skb)))
+ stats->mcast_packets++;
 }
 
 static inline void mlx5e_complete_rx_cqe(struct mlx5e_rq *rq,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
index 2e1cca1923b9..be7cda283781 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
@@ -119,6 +119,7 @@ struct mlx5e_sw_stats {
  u64 tx_nop;
  u64 rx_lro_packets;
  u64 rx_lro_bytes;
+ u64 rx_mcast_packets;
  u64 rx_ecn_mark;
  u64 rx_removed_vlan_packets;
  u64 rx_csum_unnecessary;
@@ -298,6 +299,7 @@ struct mlx5e_rq_stats {
  u64 csum_none;
  u64 lro_packets;
  u64 lro_bytes;
+ u64 mcast_packets;
  u64 ecn_mark;
  u64 removed_vlan_packets;
  u64 xdp_drop;
--
2.27.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

Stefan Bader-2
In reply to this post by William Breathitt Gray
On 15.01.21 14:46, William Breathitt Gray wrote:

> [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.
Again, as a reminder, the regression potential in the sru template for the bug
report does not aim for a liklyhood. Rather an outlook of what could be going
wrong and how that would manifest. Like a case where the counter worked before
for some reason, no longer works after the change.

Acked-by: Stefan Bader <[hidden email]>

>
> 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(-)
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Khaled Elmously
In reply to this post by William Breathitt Gray

Acked-by: Khalid Elmously <[hidden email]>


On 2021-01-15 08:46:08 , William Breathitt Gray wrote:

> [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
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

Khaled Elmously
In reply to this post by William Breathitt Gray
On 2021-01-15 08:46:08 , William Breathitt Gray wrote:

> [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
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team