net: rps: change input_queue_tail_incr_save()
authorEric Dumazet <edumazet@google.com>
Fri, 29 Mar 2024 15:42:23 +0000 (15:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Apr 2024 10:28:32 +0000 (11:28 +0100)
commit36b83ffcf209a2e6099dae1070df6a2001dfab27
tree5a99feee312c8da948ac413e797827ceb321397d
parentf7efd01fe21431a98677e5505e5de46649121ca7
net: rps: change input_queue_tail_incr_save()

input_queue_tail_incr_save() is incrementing the sd queue_tail
and save it in the flow last_qtail.

Two issues here :

- no lock protects the write on last_qtail, we should use appropriate
  annotations.

- We can perform this write after releasing the per-cpu backlog lock,
  to decrease this lock hold duration (move away the cache line miss)

Also move input_queue_head_incr() and rps helpers to include/net/rps.h,
while adding rps_ prefix to better reflect their role.

v2: Fixed a build issue (Jakub and kernel build bots)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/net/rps.h
net/core/dev.c