kernel: port page pool release fix to 6.12
authorFelix Fietkau <[email protected]>
Mon, 20 Oct 2025 19:10:26 +0000 (19:10 +0000)
committerFelix Fietkau <[email protected]>
Mon, 20 Oct 2025 19:12:55 +0000 (21:12 +0200)
Port missing fix from 610dd871aa59b

Signed-off-by: Felix Fietkau <[email protected]>
target/linux/generic/hack-6.12/610-net-page_pool-try-to-free-deferred-skbs-while-waitin.patch

index 5db35ac9a5d4a86d97e285b33310723b7cbe96ab..8717f51b9d3346762f0796ad65772f5987e8cf71 100644 (file)
@@ -16,16 +16,18 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/net/core/page_pool.c
 +++ b/net/core/page_pool.c
-@@ -1124,7 +1124,7 @@ static void page_pool_release_retry(stru
+@@ -1123,8 +1123,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.
-@@ -1136,6 +1136,17 @@ static void page_pool_release_retry(stru
+@@ -1136,6 +1137,21 @@ static void page_pool_release_retry(stru
        if (inflight <= 0)
                return;
  
@@ -33,12 +35,16 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +       * 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 (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
++              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);