mirror of
https://github.com/cjdelisle/openwrt.git
synced 2025-10-08 05:57:10 +00:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.103 removed upstream patches: generic-backport/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch [1] generic-backport/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch [2] update patch to upstream function change bcm53x/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch changed function xhci_disable_and_free_slot() upstream [3] All other patches auto-refreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=93879b3ba967a33834727abf34ea08764339fe0b [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=c66caf21b1d0a0847adc34d368e3f6753a2cbd53 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host?h=v6.6.103&id=e600de541c37f97482fea2a7a26f186141e7ddea Suggested-by: Leo Barsky <leobrsky@proton.me> Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com> Link: https://github.com/openwrt/openwrt/pull/19898 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From: Breno Leitao <leitao@debian.org>
|
|
Date: Wed, 28 Feb 2024 03:31:21 -0800
|
|
Subject: [PATCH] net: get stats64 if device if driver is configured
|
|
|
|
If the network driver is relying in the net core to do stats allocation,
|
|
then we want to dev_get_tstats64() instead of netdev_stats_to_stats64(),
|
|
since there are per-cpu stats that needs to be taken in consideration.
|
|
|
|
This will also simplify the drivers in regard to statistics. Once the
|
|
driver sets NETDEV_PCPU_STAT_TSTATS, it doesn't not need to allocate the
|
|
stacks, neither it needs to set `.ndo_get_stats64 = dev_get_tstats64`
|
|
for the generic stats collection function anymore.
|
|
|
|
Signed-off-by: Breno Leitao <leitao@debian.org>
|
|
Reviewed-by: Simon Horman <horms@kernel.org>
|
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
---
|
|
|
|
--- a/net/core/dev.c
|
|
+++ b/net/core/dev.c
|
|
@@ -10715,6 +10715,8 @@ struct rtnl_link_stats64 *dev_get_stats(
|
|
ops->ndo_get_stats64(dev, storage);
|
|
} else if (ops->ndo_get_stats) {
|
|
netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
|
|
+ } else if (dev->pcpu_stat_type == NETDEV_PCPU_STAT_TSTATS) {
|
|
+ dev_get_tstats64(dev, storage);
|
|
} else {
|
|
netdev_stats_to_stats64(storage, &dev->stats);
|
|
}
|