Thread (10 messages) 10 messages, 5 authors, 2024-07-02

Re: [PATCH net-next 3/3] net: Move flush list retrieval to where it is used.

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2024-06-28 16:39:55
Also in: bpf

On 28/06/2024 12.18, Sebastian Andrzej Siewior wrote:
The bpf_net_ctx_get_.*_flush_list() are used at the top of the function.
This means the variable is always assigned even if unused. By moving the
function to where it is used, it is possible to delay the initialisation
until it is unavoidable.
Not sure how much this gains in reality but by looking at bq_enqueue()
(in devmap.c) gcc pushes one register less to the stack. \o/.

  Move flush list retrieval to where it is used.

Signed-off-by: Sebastian Andrzej Siewior<bigeasy@linutronix.de>
---
  kernel/bpf/cpumap.c | 6 ++++--
  kernel/bpf/devmap.c | 3 ++-
  net/xdp/xsk.c       | 6 ++++--
  3 files changed, 10 insertions(+), 5 deletions(-)
Nice small optimization :-)

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help