wlan-ap-Telecominfraproject/feeds/qca-wifi-7/ipq53xx/patches-6.1/0444-net-prefetch-skb-while-dequeuing-from-backlog-list.patch
John Crispin 68cf54d9f7 qca-wifi-7: update to ath12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:52 +01:00

37 lines
1.0 KiB
Diff

From 636896a375ffbc62f0ef6c10d8102854021e3c4d Mon Sep 17 00:00:00 2001
From: KRITHI D SHETTY <quic_kdshetty@quicinc.com>
Date: Thu, 7 Sep 2023 10:47:59 +0530
Subject: [PATCH] net: prefetch skb while dequeuing from backlog list.
Change-Id: I01f1fdadd643a8f2850587200b0133c4c5984f26
Signed-off-by: KRITHI D SHETTY <quic_kdshetty@quicinc.com>
---
net/core/dev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index ba9313456c85..d25d9f064fc1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6108,10 +6108,16 @@ static int process_backlog(struct napi_struct *napi, int quota)
napi->weight = READ_ONCE(dev_rx_weight);
while (again) {
- struct sk_buff *skb;
+ struct sk_buff *skb, *next_skb;
while ((skb = __skb_dequeue(&sd->process_queue))) {
rcu_read_lock();
+
+ next_skb = skb_peek(&sd->process_queue);
+ if (likely(next_skb)) {
+ prefetch(next_skb->data);
+ }
+
__netif_receive_skb(skb);
rcu_read_unlock();
input_queue_head_incr(sd);
--
2.34.1