|
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
|
|
|
|
/**
|
|
/**
|
|
* napi_disable - prevent NAPI from scheduling
|
|
* napi_disable - prevent NAPI from scheduling
|
|
-@@ -3362,6 +3363,7 @@ struct softnet_data {
|
|
|
|
|
|
+@@ -3363,6 +3364,7 @@ struct softnet_data {
|
|
unsigned int processed;
|
|
unsigned int processed;
|
|
unsigned int time_squeeze;
|
|
unsigned int time_squeeze;
|
|
unsigned int received_rps;
|
|
unsigned int received_rps;
|
|
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
#endif
|
|
#endif
|
|
--- a/net/core/dev.c
|
|
--- a/net/core/dev.c
|
|
+++ b/net/core/dev.c
|
|
+++ b/net/core/dev.c
|
|
-@@ -4563,7 +4563,7 @@ static int rps_ipi_queued(struct softnet
|
|
|
|
|
|
+@@ -4583,7 +4583,7 @@ static int rps_ipi_queued(struct softnet
|
|
#ifdef CONFIG_RPS
|
|
#ifdef CONFIG_RPS
|
|
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
|
|
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
|
|
|
|
|
|
@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
sd->rps_ipi_next = mysd->rps_ipi_list;
|
|
sd->rps_ipi_next = mysd->rps_ipi_list;
|
|
mysd->rps_ipi_list = sd;
|
|
mysd->rps_ipi_list = sd;
|
|
|
|
|
|
-@@ -5744,6 +5744,8 @@ static DEFINE_PER_CPU(struct work_struct
|
|
|
|
|
|
+@@ -5764,6 +5764,8 @@ static DEFINE_PER_CPU(struct work_struct
|
|
/* Network device is going away, flush any packets still pending */
|
|
/* Network device is going away, flush any packets still pending */
|
|
static void flush_backlog(struct work_struct *work)
|
|
static void flush_backlog(struct work_struct *work)
|
|
{
|
|
{
|
|
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
struct sk_buff *skb, *tmp;
|
|
struct sk_buff *skb, *tmp;
|
|
struct softnet_data *sd;
|
|
struct softnet_data *sd;
|
|
|
|
|
|
-@@ -5759,9 +5761,18 @@ static void flush_backlog(struct work_st
|
|
|
|
|
|
+@@ -5779,9 +5781,18 @@ static void flush_backlog(struct work_st
|
|
input_queue_head_incr(sd);
|
|
input_queue_head_incr(sd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
|
|
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
|
|
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
|
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
|
__skb_unlink(skb, &sd->process_queue);
|
|
__skb_unlink(skb, &sd->process_queue);
|
|
-@@ -5769,7 +5780,18 @@ static void flush_backlog(struct work_st
|
|
|
|
|
|
+@@ -5789,7 +5800,18 @@ static void flush_backlog(struct work_st
|
|
input_queue_head_incr(sd);
|
|
input_queue_head_incr(sd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
static bool flush_required(int cpu)
|
|
static bool flush_required(int cpu)
|
|
-@@ -6452,6 +6474,7 @@ static int process_backlog(struct napi_s
|
|
|
|
|
|
+@@ -6472,6 +6494,7 @@ static int process_backlog(struct napi_s
|
|
|
|
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
rps_lock(sd);
|
|
rps_lock(sd);
|
|
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
if (skb_queue_empty(&sd->input_pkt_queue)) {
|
|
if (skb_queue_empty(&sd->input_pkt_queue)) {
|
|
/*
|
|
/*
|
|
* Inline a custom version of __napi_complete().
|
|
* Inline a custom version of __napi_complete().
|
|
-@@ -6461,7 +6484,8 @@ static int process_backlog(struct napi_s
|
|
|
|
|
|
+@@ -6481,7 +6504,8 @@ static int process_backlog(struct napi_s
|
|
* We can use a plain write instead of clear_bit(),
|
|
* We can use a plain write instead of clear_bit(),
|
|
* and we dont need an smp_mb() memory barrier.
|
|
* and we dont need an smp_mb() memory barrier.
|
|
*/
|
|
*/
|
|
@@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
again = false;
|
|
again = false;
|
|
} else {
|
|
} else {
|
|
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
|
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
|
-@@ -6878,6 +6902,57 @@ int dev_set_threaded(struct net_device *
|
|
|
|
|
|
+@@ -6898,6 +6922,57 @@ int dev_set_threaded(struct net_device *
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(dev_set_threaded);
|
|
EXPORT_SYMBOL(dev_set_threaded);
|
|
|
|
|
|
@@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
|
|
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
|
|
int (*poll)(struct napi_struct *, int), int weight)
|
|
int (*poll)(struct napi_struct *, int), int weight)
|
|
{
|
|
{
|
|
-@@ -11354,6 +11429,9 @@ static int dev_cpu_dead(unsigned int old
|
|
|
|
|
|
+@@ -11378,6 +11453,9 @@ static int dev_cpu_dead(unsigned int old
|
|
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
|
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
|
local_irq_enable();
|
|
local_irq_enable();
|
|
|
|
|
|
@@ -172,7 +172,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
#ifdef CONFIG_RPS
|
|
#ifdef CONFIG_RPS
|
|
remsd = oldsd->rps_ipi_list;
|
|
remsd = oldsd->rps_ipi_list;
|
|
oldsd->rps_ipi_list = NULL;
|
|
oldsd->rps_ipi_list = NULL;
|
|
-@@ -11693,6 +11771,7 @@ static int __init net_dev_init(void)
|
|
|
|
|
|
+@@ -11717,6 +11795,7 @@ static int __init net_dev_init(void)
|
|
sd->cpu = i;
|
|
sd->cpu = i;
|
|
#endif
|
|
#endif
|
|
|
|
|