From: Eric Dumazet Date: Fri, 21 Nov 2025 08:32:52 +0000 (+0000) Subject: net: prefech skb->priority in __dev_xmit_skb() X-Git-Tag: v6.19-rc1~170^2~83^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2e9821cff6c3c9ac107fce5327070f4462bf8a7;p=thirdparty%2Fkernel%2Flinux.git net: prefech skb->priority in __dev_xmit_skb() Most qdiscs need to read skb->priority at enqueue time(). In commit 100dfa74cad9 ("net: dev_queue_xmit() llist adoption") I added a prefetch(next), lets add another one for the second half of skb. Note that skb->priority and skb->hash share a common cache line, so this patch helps qdiscs needing both fields. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20251121083256.674562-11-edumazet@google.com Signed-off-by: Paolo Abeni --- diff --git a/net/core/dev.c b/net/core/dev.c index e19eb4e9d77c2..53e2496dc4292 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4246,6 +4246,7 @@ no_lock_out: llist_for_each_entry_safe(skb, next, ll_list, ll_node) { prefetch(next); + prefetch(&next->priority); skb_mark_not_on_list(skb); rc = dev_qdisc_enqueue(skb, q, &to_free, txq); count++;