mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-05-19 12:56:41 +00:00
Manually rebuild hack patches: - 200-tools_portability.patch - 204-module_strip.patch - 210-darwin_scripts_include.patch - 251-kconfig.patch - 421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch - 610-net-page_pool-try-to-free-deferred-skbs-while-waitin.patch - 721-net-add-packet-mangeling.patch - 725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch - 760-net-usb-r8152-add-LED-configuration-from-OF.patch - 800-GPIO-add-named-gpio-exports.patch - 901-debloat_sock_diag.patch - 902-debloat_proc.patch - 904-debloat_dma_buf.patch - 910-kobject_uevent.patch - 911-kobject_add_broadcast_uevent.patch - 930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> [ improve commit title ] Link: https://github.com/openwrt/openwrt/pull/16547 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Fri, 3 Jan 2025 19:29:00 +0100
|
|
Subject: [PATCH] net: page_pool: try to free deferred skbs while waiting for
|
|
pool release
|
|
|
|
The NAPI defer list can accumulate no longer used skbs, which can be reused
|
|
during alloc. If this happens on a CPU that otherwise does not do any
|
|
rx softirq processing, skbs can be held indefinitely, causing warnings
|
|
on releasing page pools.
|
|
Deal with this by scheduling rx softirq on all CPUs.
|
|
|
|
Patch by Lorenzo Bianconi
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
|
|
--- a/net/core/page_pool.c
|
|
+++ b/net/core/page_pool.c
|
|
@@ -1063,7 +1063,7 @@ static void page_pool_release_retry(stru
|
|
struct delayed_work *dwq = to_delayed_work(wq);
|
|
struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw);
|
|
void *netdev;
|
|
- int inflight;
|
|
+ int cpu, inflight;
|
|
|
|
inflight = page_pool_release(pool);
|
|
/* In rare cases, a driver bug may cause inflight to go negative.
|
|
@@ -1075,6 +1075,17 @@ static void page_pool_release_retry(stru
|
|
if (inflight <= 0)
|
|
return;
|
|
|
|
+ /* Run NET_RX_SOFTIRQ in order to free pending skbs in softnet_data
|
|
+ * defer_list that can stay in the list until we have enough queued
|
|
+ * traffic.
|
|
+ */
|
|
+ for_each_online_cpu(cpu) {
|
|
+ struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
|
+
|
|
+ if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
|
|
+ smp_call_function_single_async(cpu, &sd->defer_csd);
|
|
+ }
|
|
+
|
|
/* Periodic warning for page pools the user can't see */
|
|
netdev = READ_ONCE(pool->slow.netdev);
|
|
if (time_after_eq(jiffies, pool->defer_warn) &&
|