2
0
forked from Ivasoft/openwrt

kernel: bump 5.4 to 5.4.133

Manually rebased:
  pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
This commit is contained in:
John Audia
2021-07-19 05:17:10 -04:00
committed by Hauke Mehrtens
parent 2b2ac841e0
commit 5408e811b2
26 changed files with 66 additions and 87 deletions

View File

@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
local_irq_save(flags);
____napi_schedule(this_cpu_ptr(&softnet_data), n);
local_irq_restore(flags);
@@ -5978,6 +5984,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
@@ -5982,6 +5988,10 @@ EXPORT_SYMBOL(napi_schedule_prep);
*/
void __napi_schedule_irqoff(struct napi_struct *n)
{
@@ -115,11 +115,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ queue_work(napi_workq, &n->work);
+ return;
+ }
+
____napi_schedule(this_cpu_ptr(&softnet_data), n);
}
EXPORT_SYMBOL(__napi_schedule_irqoff);
@@ -6239,9 +6250,89 @@ static void init_gro_hash(struct napi_st
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
____napi_schedule(this_cpu_ptr(&softnet_data), n);
else
@@ -6246,9 +6256,89 @@ static void init_gro_hash(struct napi_st
napi->gro_bitmask = 0;
}
@@ -209,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INIT_LIST_HEAD(&napi->poll_list);
hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
napi->timer.function = napi_watchdog;
@@ -6258,6 +6349,7 @@ void netif_napi_add(struct net_device *d
@@ -6265,6 +6355,7 @@ void netif_napi_add(struct net_device *d
#ifdef CONFIG_NETPOLL
napi->poll_owner = -1;
#endif
@@ -217,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
set_bit(NAPI_STATE_SCHED, &napi->state);
set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list);
@@ -6298,6 +6390,7 @@ static void flush_gro_hash(struct napi_s
@@ -6305,6 +6396,7 @@ static void flush_gro_hash(struct napi_s
void netif_napi_del(struct napi_struct *napi)
{
might_sleep();
@@ -225,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (napi_hash_del(napi))
synchronize_net();
list_del_init(&napi->dev_list);
@@ -6310,50 +6403,18 @@ EXPORT_SYMBOL(netif_napi_del);
@@ -6317,50 +6409,18 @@ EXPORT_SYMBOL(netif_napi_del);
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{
@@ -239,8 +238,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
have = netpoll_poll_lock(n);
- weight = n->weight;
+ work = __napi_poll(n, &do_repoll);
-
- /* This NAPI_STATE_SCHED test is for avoiding a race
- * with netpoll's poll_napi(). Only the entity which
- * obtains the lock and sees NAPI_STATE_SCHED set will
@@ -254,7 +252,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- }
-
- WARN_ON_ONCE(work > weight);
-
+ work = __napi_poll(n, &do_repoll);
- if (likely(work < weight))
- goto out_unlock;
-
@@ -280,7 +279,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Some drivers may have called napi_schedule
* prior to exhausting their budget.
@@ -10333,6 +10394,10 @@ static int __init net_dev_init(void)
@@ -10340,6 +10400,10 @@ static int __init net_dev_init(void)
sd->backlog.weight = weight_p;
}