Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: wangxun: improve statistics support
@ 2026-07-31  7:49 Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf Mengyuan Lou
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

This series improves statistics support for Wangxun drivers.
Currently, VF drivers do not periodically refresh software statistics,
do not expose per-queue statistics through the generic netdev statistics
interface, and do not provide ndo_get_stats64().
The first patch fixes the suspend/resume flow for wxvf so the service
task and device lifecycle are handled correctly. The second patch makes
wx_update_stats() safe for VF drivers by allowing it to cope with
temporarily missing queue pointers during queue reconfiguration.
Once periodic statistics updates are available, libwx can implement
netdev_stat_ops, allowing Wangxun drivers to expose standard per-queue
statistics through the generic netdev qstats infrastructure.

Finally, VF drivers register ndo_get_stats64() so standard interface
statistics are also available.

Mengyuan Lou (5):
  net: libwx: fix suspend/resume for wxvf
  net: libwx: enable wx_update_stats for VF drivers
  net: libwx: Add per queue netdev-genl stats apis
  net: Wangxun: add support for basic qstats
  net: wangxun: add ndo_get_stats64 support

 drivers/net/ethernet/wangxun/libwx/wx_hw.c    |  8 +++
 drivers/net/ethernet/wangxun/libwx/wx_lib.c   | 51 +++++++++++++++++++
 drivers/net/ethernet/wangxun/libwx/wx_lib.h   |  1 +
 .../net/ethernet/wangxun/libwx/wx_vf_common.c | 23 ++++++++-
 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c |  1 +
 .../net/ethernet/wangxun/ngbevf/ngbevf_main.c |  2 +
 .../net/ethernet/wangxun/txgbe/txgbe_main.c   |  1 +
 .../ethernet/wangxun/txgbevf/txgbevf_main.c   |  2 +
 8 files changed, 87 insertions(+), 2 deletions(-)

-- 
2.30.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
@ 2026-07-31  7:49 ` Mengyuan Lou
  2026-07-31  8:54   ` Breno Leitao
  2026-07-31  7:49 ` [PATCH net-next 2/5] net: libwx: enable wx_update_stats for VF drivers Mengyuan Lou
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

Fix the suspend/resume sequence by:
* protecting the open/close path with RTNL,
* closing the netdev before releasing interrupt resources,
* re-enabling the PCI device and restoring bus mastering during resume,
* rebuilding the interrupt scheme, and
* reopening the interface when it was running before suspend.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
---
 .../net/ethernet/wangxun/libwx/wx_vf_common.c | 21 +++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
index 26de78e9a69e..e8448783df3e 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
@@ -16,9 +16,13 @@ int wxvf_suspend(struct device *dev_d)
 	struct pci_dev *pdev = to_pci_dev(dev_d);
 	struct wx *wx = pci_get_drvdata(pdev);
 
+	rtnl_lock();
 	netif_device_detach(wx->netdev);
+	if (netif_running(wx->netdev))
+		wxvf_close(wx->netdev);
 	wx_clear_interrupt_scheme(wx);
 	pci_disable_device(pdev);
+	rtnl_unlock();
 
 	return 0;
 }
@@ -34,12 +38,25 @@ int wxvf_resume(struct device *dev_d)
 {
 	struct pci_dev *pdev = to_pci_dev(dev_d);
 	struct wx *wx = pci_get_drvdata(pdev);
+	int err = 0;
+
+	err = pci_enable_device_mem(pdev);
+	if (err) {
+		dev_err(&pdev->dev, "Cannot enable PCI device from suspend\n");
+		return err;
+	}
 
 	pci_set_master(pdev);
-	wx_init_interrupt_scheme(wx);
+	rtnl_lock();
+	err = wx_init_interrupt_scheme(wx);
+	if (!err && netif_running(wx->netdev))
+		err = wxvf_open(wx->netdev);
+	rtnl_unlock();
+	if (err)
+		return err;
 	netif_device_attach(wx->netdev);
 
-	return 0;
+	return err;
 }
 EXPORT_SYMBOL(wxvf_resume);
 
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 2/5] net: libwx: enable wx_update_stats for VF drivers
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf Mengyuan Lou
@ 2026-07-31  7:49 ` Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 3/5] net: libwx: Add per queue netdev-genl stats apis Mengyuan Lou
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

Make wx_update_stats() safe for VF drivers. The helper
iterates over all ring pointers, but some entries may be NULL after queue
reconfiguration, so skip missing rings.

With these changes, the VF service task can safely invoke
wx_update_stats() periodically to keep the software statistics
up-to-date.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_hw.c        | 8 ++++++++
 drivers/net/ethernet/wangxun/libwx/wx_vf_common.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 260e14d5d541..349afbe60132 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -2886,6 +2886,8 @@ void wx_update_stats(struct wx *wx)
 	for (i = 0; i < wx->num_rx_queues; i++) {
 		struct wx_ring *rx_ring = wx->rx_ring[i];
 
+		if (!rx_ring)
+			continue;
 		non_eop_descs += rx_ring->rx_stats.non_eop_descs;
 		alloc_rx_buff_failed += rx_ring->rx_stats.alloc_rx_buff_failed;
 		hw_csum_rx_good += rx_ring->rx_stats.csum_good_cnt;
@@ -2911,12 +2913,17 @@ void wx_update_stats(struct wx *wx)
 	for (i = 0; i < wx->num_tx_queues; i++) {
 		struct wx_ring *tx_ring = wx->tx_ring[i];
 
+		if (!tx_ring)
+			continue;
 		restart_queue += tx_ring->tx_stats.restart_queue;
 		tx_busy += tx_ring->tx_stats.tx_busy;
 	}
 	wx->restart_queue = restart_queue;
 	wx->tx_busy = tx_busy;
 
+	if (wx->pdev->is_virtfn)
+		goto skip_hw_stats;
+
 	wx_update_xoff_rx_lfc(wx);
 
 	hwstats->gprc += rd32(wx, WX_RDM_PKT_CNT);
@@ -2956,6 +2963,7 @@ void wx_update_stats(struct wx *wx)
 		hwstats->qmprc += rd32_wrap(wx, WX_PX_MPRC(i),
 					    &wx->last_stats.qmprc[i]);
 
+skip_hw_stats:
 	spin_unlock(&wx->hw_stats_lock);
 }
 EXPORT_SYMBOL(wx_update_stats);
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
index e8448783df3e..f116677fb9df 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
@@ -5,6 +5,7 @@
 #include <linux/pci.h>
 
 #include "wx_type.h"
+#include "wx_hw.h"
 #include "wx_mbx.h"
 #include "wx_lib.h"
 #include "wx_vf.h"
@@ -426,6 +427,7 @@ static void wxvf_service_task(struct work_struct *work)
 
 	wxvf_link_config_subtask(wx);
 	wxvf_reset_subtask(wx);
+	wx_update_stats(wx);
 	wx_service_event_complete(wx);
 }
 
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 3/5] net: libwx: Add per queue netdev-genl stats apis
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 2/5] net: libwx: enable wx_update_stats for VF drivers Mengyuan Lou
@ 2026-07-31  7:49 ` Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 4/5] net: Wangxun: add support for basic qstats Mengyuan Lou
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

Implement netdev_stat_ops for libwx devices to support the generic
netdev queue statistics interface.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_lib.c | 49 +++++++++++++++++++++
 drivers/net/ethernet/wangxun/libwx/wx_lib.h |  1 +
 2 files changed, 50 insertions(+)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index 31572f59b9ce..ae20733c703d 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -5,6 +5,7 @@
 #include <net/ip6_checksum.h>
 #include <net/page_pool/helpers.h>
 #include <net/inet_ecn.h>
+#include <net/netdev_queues.h>
 #include <linux/workqueue.h>
 #include <linux/iopoll.h>
 #include <linux/sctp.h>
@@ -3100,6 +3101,54 @@ void wx_get_stats64(struct net_device *netdev,
 }
 EXPORT_SYMBOL(wx_get_stats64);
 
+static void wx_get_queue_stats_rx(struct net_device *dev, int idx,
+				  struct netdev_queue_stats_rx *stats)
+{
+	struct wx *wx = netdev_priv(dev);
+	struct wx_ring *ring = wx->rx_ring[idx];
+
+	stats->packets = ring->stats.packets;
+	stats->bytes = ring->stats.bytes;
+	stats->alloc_fail = wx->alloc_rx_buff_failed;
+	stats->csum_complete = wx->hw_csum_rx_good;
+	stats->csum_bad = wx->hw_csum_rx_error;
+}
+
+static void wx_get_queue_stats_tx(struct net_device *dev, int idx,
+				  struct netdev_queue_stats_tx *stats)
+{
+	struct wx *wx = netdev_priv(dev);
+	struct wx_ring *ring = wx->tx_ring[idx];
+
+	stats->packets = ring->stats.packets;
+	stats->bytes = ring->stats.bytes;
+}
+
+static void wx_get_base_stats(struct net_device *dev,
+			      struct netdev_queue_stats_rx *rx,
+			      struct netdev_queue_stats_tx *tx)
+{
+	rx->bytes = 0;
+	rx->packets = 0;
+	rx->alloc_fail = 0;
+	rx->csum_complete = 0;
+	rx->csum_bad = 0;
+	tx->bytes = 0;
+	tx->packets = 0;
+}
+
+static const struct netdev_stat_ops wx_stat_ops = {
+	.get_queue_stats_rx  = wx_get_queue_stats_rx,
+	.get_queue_stats_tx  = wx_get_queue_stats_tx,
+	.get_base_stats      = wx_get_base_stats,
+};
+
+void wx_set_stat_ops(struct net_device *netdev)
+{
+	netdev->stat_ops = &wx_stat_ops;
+}
+EXPORT_SYMBOL(wx_set_stat_ops);
+
 int wx_set_features(struct net_device *netdev, netdev_features_t features)
 {
 	netdev_features_t changed = netdev->features ^ features;
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.h b/drivers/net/ethernet/wangxun/libwx/wx_lib.h
index bc671786978e..cf6dd74fef87 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.h
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.h
@@ -30,6 +30,7 @@ void wx_free_resources(struct wx *wx);
 int wx_setup_resources(struct wx *wx);
 void wx_get_stats64(struct net_device *netdev,
 		    struct rtnl_link_stats64 *stats);
+void wx_set_stat_ops(struct net_device *netdev);
 int wx_set_features(struct net_device *netdev, netdev_features_t features);
 netdev_features_t wx_fix_features(struct net_device *netdev,
 				  netdev_features_t features);
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 4/5] net: Wangxun: add support for basic qstats
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
                   ` (2 preceding siblings ...)
  2026-07-31  7:49 ` [PATCH net-next 3/5] net: libwx: Add per queue netdev-genl stats apis Mengyuan Lou
@ 2026-07-31  7:49 ` Mengyuan Lou
  2026-07-31  7:49 ` [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support Mengyuan Lou
  2026-07-31 23:44 ` [PATCH net-next 0/5] net: wangxun: improve statistics support Jakub Kicinski
  5 siblings, 0 replies; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

Implement netdev_stat_ops and export the basic per-queue stats
for ngbe, ngbevf, txgbe and txgbevf.
This allows to report per-queue statistics through
the standard networking infrastructure, making them available via
interfaces such as the qstats-get Netlink API.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
---
 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c       | 1 +
 drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c     | 1 +
 drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
index a16221995909..d965f7af1697 100644
--- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
+++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
@@ -700,6 +700,7 @@ static int ngbe_probe(struct pci_dev *pdev,
 	wx->driver_name = ngbe_driver_name;
 	ngbe_set_ethtool_ops(netdev);
 	netdev->netdev_ops = &ngbe_netdev_ops;
+	wx_set_stat_ops(netdev);
 
 	netdev->features = NETIF_F_SG | NETIF_F_IP_CSUM |
 			   NETIF_F_TSO | NETIF_F_TSO6 |
diff --git a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
index d79cf8d8484f..b6bab050837a 100644
--- a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
+++ b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
@@ -190,6 +190,7 @@ static int ngbevf_probe(struct pci_dev *pdev,
 	wx->driver_name = KBUILD_MODNAME;
 	wx_set_ethtool_ops_vf(netdev);
 	netdev->netdev_ops = &ngbevf_netdev_ops;
+	wx_set_stat_ops(netdev);
 
 	/* setup the private structure */
 	err = ngbevf_sw_init(wx);
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
index c277863baf67..7f3d72e53fd3 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
@@ -745,6 +745,7 @@ static int txgbe_probe(struct pci_dev *pdev,
 	wx->driver_name = txgbe_driver_name;
 	txgbe_set_ethtool_ops(netdev);
 	netdev->netdev_ops = &txgbe_netdev_ops;
+	wx_set_stat_ops(netdev);
 	netdev->udp_tunnel_nic_info = &txgbe_udp_tunnels;
 
 	/* setup the private structure */
diff --git a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
index 8b16b900820a..2dd119bd52e5 100644
--- a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
+++ b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
@@ -255,6 +255,7 @@ static int txgbevf_probe(struct pci_dev *pdev,
 	wx->driver_name = KBUILD_MODNAME;
 	wx_set_ethtool_ops_vf(netdev);
 	netdev->netdev_ops = &txgbevf_netdev_ops;
+	wx_set_stat_ops(netdev);
 
 	/* setup the private structure */
 	err = txgbevf_sw_init(wx);
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
                   ` (3 preceding siblings ...)
  2026-07-31  7:49 ` [PATCH net-next 4/5] net: Wangxun: add support for basic qstats Mengyuan Lou
@ 2026-07-31  7:49 ` Mengyuan Lou
  2026-07-31  8:52   ` Breno Leitao
  2026-07-31 23:44 ` [PATCH net-next 0/5] net: wangxun: improve statistics support Jakub Kicinski
  5 siblings, 1 reply; 15+ messages in thread
From: Mengyuan Lou @ 2026-07-31  7:49 UTC (permalink / raw)
  To: netdev
  Cc: jiawenwu, duanqiangwen, linglingzhang, andrew+netdev, davem,
	edumazet, kuba, pabeni, Mengyuan Lou

Expose network statistics for Wangxun VF drivers by registering the
ndo_get_stats64 callback.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_lib.c         | 2 ++
 drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
 drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
 3 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index ae20733c703d..a4ca01c18c6a 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -3092,6 +3092,8 @@ void wx_get_stats64(struct net_device *netdev,
 	}
 
 	rcu_read_unlock();
+	if (wx->pdev->is_virtfn)
+		return;
 
 	hwstats = &wx->stats;
 	stats->rx_errors = hwstats->crcerrs + hwstats->rlec;
diff --git a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
index b6bab050837a..b4817c58992b 100644
--- a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
+++ b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
@@ -48,6 +48,7 @@ static const struct net_device_ops ngbevf_netdev_ops = {
 	.ndo_start_xmit         = wx_xmit_frame,
 	.ndo_validate_addr      = eth_validate_addr,
 	.ndo_set_mac_address    = wx_set_mac_vf,
+	.ndo_get_stats64        = wx_get_stats64,
 };
 
 static void ngbevf_set_num_queues(struct wx *wx)
diff --git a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
index 2dd119bd52e5..1e30d8f2183a 100644
--- a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
+++ b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
@@ -44,6 +44,7 @@ static const struct net_device_ops txgbevf_netdev_ops = {
 	.ndo_start_xmit         = wx_xmit_frame,
 	.ndo_validate_addr      = eth_validate_addr,
 	.ndo_set_mac_address    = wx_set_mac_vf,
+	.ndo_get_stats64        = wx_get_stats64,
 };
 
 static void txgbevf_set_num_queues(struct wx *wx)
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support
  2026-07-31  7:49 ` [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support Mengyuan Lou
@ 2026-07-31  8:52   ` Breno Leitao
  2026-07-31  9:41     ` mengyuanlou
  0 siblings, 1 reply; 15+ messages in thread
From: Breno Leitao @ 2026-07-31  8:52 UTC (permalink / raw)
  To: Mengyuan Lou
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, kuba, pabeni

On Fri, Jul 31, 2026 at 03:49:58PM +0800, Mengyuan Lou wrote:
> Expose network statistics for Wangxun VF drivers by registering the
> ndo_get_stats64 callback.
> 
> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
> ---
>  drivers/net/ethernet/wangxun/libwx/wx_lib.c         | 2 ++
>  drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
>  drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> index ae20733c703d..a4ca01c18c6a 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> @@ -3092,6 +3092,8 @@ void wx_get_stats64(struct net_device *netdev,
>  	}
>  
>  	rcu_read_unlock();
> +	if (wx->pdev->is_virtfn)
> +		return;

Why you don't want to populate the other entries?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf
  2026-07-31  7:49 ` [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf Mengyuan Lou
@ 2026-07-31  8:54   ` Breno Leitao
  0 siblings, 0 replies; 15+ messages in thread
From: Breno Leitao @ 2026-07-31  8:54 UTC (permalink / raw)
  To: Mengyuan Lou
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, kuba, pabeni

On Fri, Jul 31, 2026 at 03:49:54PM +0800, Mengyuan Lou wrote:
> Fix the suspend/resume sequence by:
> * protecting the open/close path with RTNL,
> * closing the netdev before releasing interrupt resources,
> * re-enabling the PCI device and restoring bus mastering during resume,
> * rebuilding the interrupt scheme, and
> * reopening the interface when it was running before suspend.
> 
> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
> ---
>  .../net/ethernet/wangxun/libwx/wx_vf_common.c | 21 +++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
> index 26de78e9a69e..e8448783df3e 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
> @@ -16,9 +16,13 @@ int wxvf_suspend(struct device *dev_d)
>  	struct pci_dev *pdev = to_pci_dev(dev_d);
>  	struct wx *wx = pci_get_drvdata(pdev);
>  
> +	rtnl_lock();
>  	netif_device_detach(wx->netdev);
> +	if (netif_running(wx->netdev))
> +		wxvf_close(wx->netdev);
>  	wx_clear_interrupt_scheme(wx);
>  	pci_disable_device(pdev);
> +	rtnl_unlock();

Why not before pci_disable_device()?

>  	return 0;
>  }
> @@ -34,12 +38,25 @@ int wxvf_resume(struct device *dev_d)
>  {
>  	struct pci_dev *pdev = to_pci_dev(dev_d);
>  	struct wx *wx = pci_get_drvdata(pdev);
> +	int err = 0;

Nit: You don't need =0 here.

otherwise looks good.
--breno

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support
  2026-07-31  8:52   ` Breno Leitao
@ 2026-07-31  9:41     ` mengyuanlou
  2026-07-31 13:14       ` Breno Leitao
  0 siblings, 1 reply; 15+ messages in thread
From: mengyuanlou @ 2026-07-31  9:41 UTC (permalink / raw)
  To: Breno Leitao
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, kuba, pabeni



> 2026年7月31日 16:52,Breno Leitao <leitao@debian.org> 写道:
> 
> On Fri, Jul 31, 2026 at 03:49:58PM +0800, Mengyuan Lou wrote:
>> Expose network statistics for Wangxun VF drivers by registering the
>>  callback.
>> 
>> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
>> ---
>> drivers/net/ethernet/wangxun/libwx/wx_lib.c         | 2 ++
>> drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
>> drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
>> 3 files changed, 4 insertions(+)
>> 
>> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>> index ae20733c703d..a4ca01c18c6a 100644
>> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>> @@ -3092,6 +3092,8 @@ void wx_get_stats64(struct net_device *netdev,
>> }
>> 
>> rcu_read_unlock();
>> + if (wx->pdev->is_virtfn)
>> + return;
> 
> Why you don't want to populate the other entries?

The hardware does not provide the err counts on the vf.
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support
  2026-07-31  9:41     ` mengyuanlou
@ 2026-07-31 13:14       ` Breno Leitao
  2026-08-03  6:50         ` mengyuanlou
  0 siblings, 1 reply; 15+ messages in thread
From: Breno Leitao @ 2026-07-31 13:14 UTC (permalink / raw)
  To: mengyuanlou@net-swift.com
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, kuba, pabeni

On Fri, Jul 31, 2026 at 05:41:33PM +0800, mengyuanlou@net-swift.com wrote:
> 
> 
> > 2026年7月31日 16:52,Breno Leitao <leitao@debian.org> 写道:
> > 
> > On Fri, Jul 31, 2026 at 03:49:58PM +0800, Mengyuan Lou wrote:
> >> Expose network statistics for Wangxun VF drivers by registering the
> >>  callback.
> >> 
> >> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
> >> ---
> >> drivers/net/ethernet/wangxun/libwx/wx_lib.c         | 2 ++
> >> drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
> >> drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
> >> 3 files changed, 4 insertions(+)
> >> 
> >> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> >> index ae20733c703d..a4ca01c18c6a 100644
> >> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> >> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> >> @@ -3092,6 +3092,8 @@ void wx_get_stats64(struct net_device *netdev,
> >> }
> >> 
> >> rcu_read_unlock();
> >> + if (wx->pdev->is_virtfn)
> >> + return;
> > 
> > Why you don't want to populate the other entries?
> 
> The hardware does not provide the err counts on the vf.

Right, but hwstats fields will be zero, right?

Does this early return buys us anything?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 0/5] net: wangxun: improve statistics support
  2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
                   ` (4 preceding siblings ...)
  2026-07-31  7:49 ` [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support Mengyuan Lou
@ 2026-07-31 23:44 ` Jakub Kicinski
  2026-08-03  8:00   ` mengyuanlou
  5 siblings, 1 reply; 15+ messages in thread
From: Jakub Kicinski @ 2026-07-31 23:44 UTC (permalink / raw)
  To: Mengyuan Lou
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, pabeni

On Fri, 31 Jul 2026 15:49:53 +0800 Mengyuan Lou wrote:
> This series improves statistics support for Wangxun drivers.
> Currently, VF drivers do not periodically refresh software statistics,
> do not expose per-queue statistics through the generic netdev statistics
> interface, and do not provide ndo_get_stats64().
> The first patch fixes the suspend/resume flow for wxvf so the service
> task and device lifecycle are handled correctly. The second patch makes
> wx_update_stats() safe for VF drivers by allowing it to cope with
> temporarily missing queue pointers during queue reconfiguration.
> Once periodic statistics updates are available, libwx can implement
> netdev_stat_ops, allowing Wangxun drivers to expose standard per-queue
> statistics through the generic netdev qstats infrastructure.

Were you able to run the qstats-related selftests against these devices?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support
  2026-07-31 13:14       ` Breno Leitao
@ 2026-08-03  6:50         ` mengyuanlou
  0 siblings, 0 replies; 15+ messages in thread
From: mengyuanlou @ 2026-08-03  6:50 UTC (permalink / raw)
  To: Breno Leitao
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, kuba, pabeni



> 2026年7月31日 21:14,Breno Leitao <leitao@debian.org> 写道:
> 
> On Fri, Jul 31, 2026 at 05:41:33PM +0800, mengyuanlou@net-swift.com wrote:
>> 
>> 
>>> 2026年7月31日 16:52,Breno Leitao <leitao@debian.org> 写道:
>>> 
>>> On Fri, Jul 31, 2026 at 03:49:58PM +0800, Mengyuan Lou wrote:
>>>> Expose network statistics for Wangxun VF drivers by registering the
>>>> callback.
>>>> 
>>>> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
>>>> ---
>>>> drivers/net/ethernet/wangxun/libwx/wx_lib.c         | 2 ++
>>>> drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c   | 1 +
>>>> drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c | 1 +
>>>> 3 files changed, 4 insertions(+)
>>>> 
>>>> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>>>> index ae20733c703d..a4ca01c18c6a 100644
>>>> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>>>> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
>>>> @@ -3092,6 +3092,8 @@ void wx_get_stats64(struct net_device *netdev,
>>>> }
>>>> 
>>>> rcu_read_unlock();
>>>> + if (wx->pdev->is_virtfn)
>>>> + return;
>>> 
>>> Why you don't want to populate the other entries?
>> 
>> The hardware does not provide the err counts on the vf.
> 
> Right, but hwstats fields will be zero, right?
> 
> Does this early return buys us anything?
> 

You're right. I write the code based on the hardware concept, in fact, this is really unnecessary.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 0/5] net: wangxun: improve statistics support
  2026-07-31 23:44 ` [PATCH net-next 0/5] net: wangxun: improve statistics support Jakub Kicinski
@ 2026-08-03  8:00   ` mengyuanlou
  2026-08-03 20:59     ` Jakub Kicinski
  0 siblings, 1 reply; 15+ messages in thread
From: mengyuanlou @ 2026-08-03  8:00 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, pabeni

Hi,

➜ PF
python3 -m pyynl.cli \ --spec /root/Work/mirror-net-next/Documentation/netlink/specs/netdev.yaml \ --dump qstats-get \ --json '{"ifindex":160,"scope":"queue"}' [{'ifindex': 160, 'queue-id': 0, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 16737, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 61}, {'ifindex': 160, 'queue-id': 1, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 1507, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 11}, {'ifindex': 160, 'queue-id': 2, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 0, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 0}, {'ifindex': 160, 'queue-id': 3, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 5831, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 17}, {'ifindex': 160, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 880, 'tx-packets': 8}, {'ifindex': 160, 'queue-id': 1, 'queue-type': 'tx', 'tx-bytes': 4672, 'tx-packets': 36}, {'ifindex': 160, 'queue-id': 2, 'queue-type': 'tx', 'tx-bytes': 6860, 'tx-packets': 20}, {'ifindex': 160, 'queue-id': 3, 'queue-type': 'tx', 'tx-bytes': 992, 'tx-packets': 16}]

➜ VF
python3 -m pyynl.cli --spec /root/Work/mirror-net-next/Documentation/netlink/specs/netdev.yaml --dump qstats-get --json '{"ifindex":236,"scope":"queue"}' [{'ifindex': 236, 'queue-id': 0, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 16836, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 58}, {'ifindex': 236, 'queue-id': 1, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 1507, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 11}, {'ifindex': 236, 'queue-id': 2, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 3448, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 24}, {'ifindex': 236, 'queue-id': 3, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 7546, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 22}, {'ifindex': 236, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 0, 'tx-packets': 0}, {'ifindex': 236, 'queue-id': 1, 'queue-type': 'tx', 'tx-bytes': 2750, 'tx-packets': 25}, {'ifindex': 236, 'queue-id': 2, 'queue-type': 'tx', 'tx-bytes': 12671, 'tx-packets': 53}, {'ifindex': 236, 'queue-id': 3, 'queue-type': 'tx', 'tx-bytes': 1670, 'tx-packets': 25}]

 root @roy-System-Product-Name ➜ …/mirror-net-next/tools/testing/selftests     main ?3   15:54:46 
✘  python3 ./drivers/net/stats.py
TAP version 13
1..8
ok 1 stats.check_pause
ok 2 stats.check_fec
ok 3 stats.check_fec_hist
ok 4 stats.pkt_byte_sum
ok 5 stats.qstat_by_ifindex
ok 6 stats.check_down
ok 7 stats.procfs_hammer
# completed up/down cycles: 76
ok 8 stats.procfs_downup_hammer
# Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0


> 2026年8月1日 07:44,Jakub Kicinski <kuba@kernel.org> 写道:
> 
> On Fri, 31 Jul 2026 15:49:53 +0800 Mengyuan Lou wrote:
>> This series improves statistics support for Wangxun drivers.
>> Currently, VF drivers do not periodically refresh software statistics,
>> do not expose per-queue statistics through the generic netdev statistics
>> interface, and do not provide ndo_get_stats64().
>> The first patch fixes the suspend/resume flow for wxvf so the service
>> task and device lifecycle are handled correctly. The second patch makes
>> wx_update_stats() safe for VF drivers by allowing it to cope with
>> temporarily missing queue pointers during queue reconfiguration.
>> Once periodic statistics updates are available, libwx can implement
>> netdev_stat_ops, allowing Wangxun drivers to expose standard per-queue
>> statistics through the generic netdev qstats infrastructure.
> 
> Were you able to run the qstats-related selftests against these devices?
> 
 I have tested these devices with netdev.yaml for pf/vf devices.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 0/5] net: wangxun: improve statistics support
  2026-08-03  8:00   ` mengyuanlou
@ 2026-08-03 20:59     ` Jakub Kicinski
  2026-08-04  6:14       ` mengyuanlou
  0 siblings, 1 reply; 15+ messages in thread
From: Jakub Kicinski @ 2026-08-03 20:59 UTC (permalink / raw)
  To: mengyuanlou@net-swift.com
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, pabeni

On Mon, 3 Aug 2026 16:00:15 +0800 mengyuanlou@net-swift.com wrote:
> root @roy-System-Product-Name ➜ …/mirror-net-next/tools/testing/selftests     main ?3   15:54:46 
> ✘  python3 ./drivers/net/stats.py
> TAP version 13
> 1..8
> ok 1 stats.check_pause
> ok 2 stats.check_fec
> ok 3 stats.check_fec_hist
> ok 4 stats.pkt_byte_sum
> ok 5 stats.qstat_by_ifindex
> ok 6 stats.check_down
> ok 7 stats.procfs_hammer
> # completed up/down cycles: 76
> ok 8 stats.procfs_downup_hammer
> # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0

Thanks, did you set up the env variables like NETIF?
The context you shared does not specify how you set things up..

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 0/5] net: wangxun: improve statistics support
  2026-08-03 20:59     ` Jakub Kicinski
@ 2026-08-04  6:14       ` mengyuanlou
  0 siblings, 0 replies; 15+ messages in thread
From: mengyuanlou @ 2026-08-04  6:14 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, jiawenwu, duanqiangwen, linglingzhang, andrew+netdev,
	davem, edumazet, pabeni



> 2026年8月4日 04:59,Jakub Kicinski <kuba@kernel.org> 写道:
> 
> On Mon, 3 Aug 2026 16:00:15 +0800 mengyuanlou@net-swift.com wrote:
>> root @roy-System-Product-Name ➜ …/mirror-net-next/tools/testing/selftests     main ?3   15:54:46 
>> ✘  python3 ./drivers/net/stats.py
>> TAP version 13
>> 1..8
>> ok 1 stats.check_pause
>> ok 2 stats.check_fec
>> ok 3 stats.check_fec_hist
>> ok 4 stats.pkt_byte_sum
>> ok 5 stats.qstat_by_ifindex
>> ok 6 stats.check_down
>> ok 7 stats.procfs_hammer
>> # completed up/down cycles: 76
>> ok 8 stats.procfs_downup_hammer
>> # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0
> 
> Thanks, did you set up the env variables like NETIF?
> The context you shared does not specify how you set things up..
> 

Thanks, I just set NETIF to PF/VF(ngbe) devices. And do the tests again.


✘  NETIF=enp6s0f0 python3 -u ./drivers/net/stats.py
TAP version 13
1..8
ok 1 stats.check_pause
ok 2 stats.check_fec # SKIP FEC not supported by the device
ok 3 stats.check_fec_hist # SKIP FEC not supported by the device
ok 4 stats.pkt_byte_sum
ok 5 stats.qstat_by_ifindex
ok 6 stats.check_down
ok 7 stats.procfs_hammer
# completed up/down cycles: 50
ok 8 stats.procfs_downup_hammer
# Totals: pass:6 fail:0 xfail:0 xpass:0 skip:2 error:0

dmesg -w

……
[1283721.111104] ngbe 0000:06:00.0: removed PHC on enp6s0f0
[1283721.187152] ngbe 0000:06:00.0 enp6s0f0: PHY [ngbe-600:00] driver [Generic FE-GE Realtek PHY] (irq=POLL)
[1283721.187455] ngbe 0000:06:00.0: registered PHC device on enp6s0f0
[1283721.187496] ngbe 0000:06:00.0 enp6s0f0: configuring for phy/rgmii-rxid link mode
[1283721.262749] ngbe 0000:06:00.0: removed PHC on enp6s0f0
[1283721.286142] ngbe 0000:06:00.0 enp6s0f0: PHY [ngbe-600:00] driver [Generic FE-GE Realtek PHY] (irq=POLL)
[1283721.286289] ngbe 0000:06:00.0: registered PHC device on enp6s0f0
[1283721.286329] ngbe 0000:06:00.0 enp6s0f0: configuring for phy/rgmii-rxid link mode
[1283721.309968] ngbe 0000:06:00.0: removed PHC on enp6s0f0
[1283721.386142] ngbe 0000:06:00.0 enp6s0f0: PHY [ngbe-600:00] driver [Generic FE-GE Realtek PHY] (irq=POLL)
[1283721.386389] ngbe 0000:06:00.0: registered PHC device on enp6s0f0
[1283721.386430] ngbe 0000:06:00.0 enp6s0f0: configuring for phy/rgmii-rxid link mode
[1283721.460411] ngbe 0000:06:00.0: removed PHC on enp6s0f0
[1283721.484139] ngbe 0000:06:00.0 enp6s0f0: PHY [ngbe-600:00] driver [Generic FE-GE Realtek PHY] (irq=POLL)
[1283721.484255] ngbe 0000:06:00.0: registered PHC device on enp6s0f0
[1283721.484295] ngbe 0000:06:00.0 enp6s0f0: configuring for phy/rgmii-rxid link mode
[1283721.506989] ngbe 0000:06:00.0: removed PHC on enp6s0f0
[1283721.583146] ngbe 0000:06:00.0 enp6s0f0: PHY [ngbe-600:00] driver [Generic FE-GE Realtek PHY] (irq=POLL)
[1283721.583446] ngbe 0000:06:00.0: registered PHC device on enp6s0f0
[1283721.583487] ngbe 0000:06:00.0 enp6s0f0: configuring for phy/rgmii-rxid link mode
[1283724.663809] ngbe 0000:06:00.0 enp6s0f0: Link is Up - 1Gbps/Full - flow control rx/tx
[1283724.855515] ngbevf 0000:07:00.4 enp6s0f0v1: Link is Up - 1Gbps
[1283724.919544] ngbevf 0000:07:00.0 enp6s0f0v0: Link is Up - 1Gbps
[1283726.903575] ngbevf 0000:07:00.4 enp6s0f0v1: Link is Down
[1283727.927585] ngbevf 0000:07:00.4 enp6s0f0v1: Link is Up - 1Gbps


✘  NETIF=enp6s0f0v0 python3 -u ./drivers/net/stats.py
TAP version 13
1..8
ok 1 stats.check_pause # SKIP pause not supported by the device
ok 2 stats.check_fec # SKIP FEC not supported by the device
ok 3 stats.check_fec_hist # SKIP FEC not supported by the device
ok 4 stats.pkt_byte_sum
ok 5 stats.qstat_by_ifindex
ok 6 stats.check_down
ok 7 stats.procfs_hammer
# Exception| Traceback (most recent call last):
# Exception|   File "/root/Work/mirror-net-next/tools/testing/selftests/net/lib/py/ksft.py", line 420, in ksft_run
# Exception|     func(*args)
# Exception|     ~~~~^^^^^^^
# Exception|   File "/root/Work/mirror-net-next/tools/testing/selftests/net/lib/py/ksft.py", line 257, in wrapper
# Exception|     return func(*args, **kwargs)
# Exception|   File "/root/Work/mirror-net-next/tools/testing/selftests/./drivers/net/stats.py", line 268, in procfs_downup_hammer
# Exception|     channels = ethnl.channels_get({'header': {'dev-index': cfg.ifindex}})
# Exception|   File "/root/Work/mirror-net-next/tools/net/ynl/pyynl/lib/ynl.py", line 1440, in _op
# Exception|     return self._ops(ops)[0]
# Exception|            ~~~~~~~~~^^^^^
# Exception|   File "/root/Work/mirror-net-next/tools/net/ynl/pyynl/lib/ynl.py", line 1397, in _ops
# Exception|     raise NlError(nl_msg)
# Exception| net.ynl.pyynl.lib.ynl.NlError: Netlink error: Operation not supported
# Exception| 
not ok 8 stats.procfs_downup_hammer
# Totals: pass:4 fail:1 xfail:0 xpass:0 skip:3 error:0

Dmesg -w

[1283852.025298] ngbevf 0000:07:00.0 enp6s0f0v0: Link is Up - 1Gbps
[1283869.049493] ngbevf 0000:07:00.0 enp6s0f0v0: Link is Up - 1Gbps



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-08-04  6:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31  7:49 [PATCH net-next 0/5] net: wangxun: improve statistics support Mengyuan Lou
2026-07-31  7:49 ` [PATCH net-next 1/5] net: libwx: fix suspend/resume for wxvf Mengyuan Lou
2026-07-31  8:54   ` Breno Leitao
2026-07-31  7:49 ` [PATCH net-next 2/5] net: libwx: enable wx_update_stats for VF drivers Mengyuan Lou
2026-07-31  7:49 ` [PATCH net-next 3/5] net: libwx: Add per queue netdev-genl stats apis Mengyuan Lou
2026-07-31  7:49 ` [PATCH net-next 4/5] net: Wangxun: add support for basic qstats Mengyuan Lou
2026-07-31  7:49 ` [PATCH net-next 5/5] net: wangxun: add ndo_get_stats64 support Mengyuan Lou
2026-07-31  8:52   ` Breno Leitao
2026-07-31  9:41     ` mengyuanlou
2026-07-31 13:14       ` Breno Leitao
2026-08-03  6:50         ` mengyuanlou
2026-07-31 23:44 ` [PATCH net-next 0/5] net: wangxun: improve statistics support Jakub Kicinski
2026-08-03  8:00   ` mengyuanlou
2026-08-03 20:59     ` Jakub Kicinski
2026-08-04  6:14       ` mengyuanlou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox