Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: rps: fix error when CONFIG_RFS_ACCEL is off

John Sperbeck reported that if we turn off CONFIG_RFS_ACCEL, the 'head'
is not defined, which will trigger compile error. So I move the 'head'
out of the CONFIG_RFS_ACCEL scope.

Fixes: 84b6823cd96b ("net: rps: protect last_qtail with rps_input_queue_tail_save() helper")
Reported-by: John Sperbeck <jsperbeck@google.com>
Closes: https://lore.kernel.org/all/20240529203421.2432481-1-jsperbeck@google.com/
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240530032717.57787-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jason Xing and committed by
Jakub Kicinski
8105378c 166fcf86

+2 -1
+2 -1
net/core/dev.c
··· 4516 4516 struct rps_dev_flow *rflow, u16 next_cpu) 4517 4517 { 4518 4518 if (next_cpu < nr_cpu_ids) { 4519 + u32 head; 4519 4520 #ifdef CONFIG_RFS_ACCEL 4520 4521 struct netdev_rx_queue *rxqueue; 4521 4522 struct rps_dev_flow_table *flow_table; 4522 4523 struct rps_dev_flow *old_rflow; 4523 - u32 flow_id, head; 4524 4524 u16 rxq_index; 4525 + u32 flow_id; 4525 4526 int rc; 4526 4527 4527 4528 /* Should we steer this flow to a different hardware queue? */