mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-16 17:15:26 +00:00
changelogs: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.58 Removed upstreamed patches: 1. target/linux/generic/backport-6.12/612-01-v6.17-net-dsa-tag_brcm-legacy-reorganize-functions.patch Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.58&id=a4daaf063f8269a5881154c5b77c5ef6639d65d3 2. target/linux/qualcommax/patches-6.12/0151-arm64-qcom-ipq6018-nss_port5.patch Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.58&id=9a7a5d50ee2e035325de9c720e4842d6759d2374 3. target/linux/realtek/patches-6.12/020-01-v6.18-timer-rtl-otto-work-around-dying-timers.patch Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.58&id=d0e217b33d42bfe52ef7ef447916a23a586e6e5c 4. target/linux/realtek/patches-6.12/020-03-v6.18-timer-rtl-otto-do-not-interfere-with-interrupts.patch Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.58&id=8cc561dd9d02f1753ae34dfdd565662828be9a9d Additional changes: - Manually adapted bcm27xx patch: * 950-0410-media-i2c-adv7180-Add-support-for-V4L2_CID_LINK_FREQ.patch Rebased and adjusted for kernel 6.12 to fix context conflicts. - Synced lantiq DTS (danube.dtsi) with upstream bindings to fix DT validation issues on kernel 6.12. - Manually adapted DTS to match OpenWrt's lantiq DTS layout. Compile-tested on x86_64 Run-tested on x86_64 Signed-off-by: gongzi miao <miaogongzi0227@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20777 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
52 lines
1.7 KiB
Diff
52 lines
1.7 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
|
|
@@ -1155,8 +1155,9 @@ 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);
|
|
+ unsigned long flags;
|
|
void *netdev;
|
|
- int inflight;
|
|
+ int cpu, inflight;
|
|
|
|
inflight = page_pool_release(pool);
|
|
/* In rare cases, a driver bug may cause inflight to go negative.
|
|
@@ -1168,6 +1169,21 @@ 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.
|
|
+ */
|
|
+ local_irq_save(flags);
|
|
+ for_each_online_cpu(cpu) {
|
|
+ struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
|
+
|
|
+ if (cpu == raw_smp_processor_id())
|
|
+ raise_softirq_irqoff(NET_RX_SOFTIRQ);
|
|
+ else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
|
|
+ smp_call_function_single_async(cpu, &sd->defer_csd);
|
|
+ }
|
|
+ local_irq_restore(flags);
|
|
+
|
|
/* Periodic warning for page pools the user can't see */
|
|
netdev = READ_ONCE(pool->slow.netdev);
|
|
if (time_after_eq(jiffies, pool->defer_warn) &&
|