]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: prefech skb->priority in __dev_xmit_skb()
authorEric Dumazet <edumazet@google.com>
Fri, 21 Nov 2025 08:32:52 +0000 (08:32 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Nov 2025 15:10:32 +0000 (16:10 +0100)
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 <edumazet@google.com>
Link: https://patch.msgid.link/20251121083256.674562-11-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/dev.c

index e19eb4e9d77c27535ab2a0ce14299281e3ef9397..53e2496dc4292284072946fd9131d3f9a0c0af44 100644 (file)
@@ -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++;