net: rps: fix error when CONFIG_RFS_ACCEL is off
Subsystems (2)
PATCH 1/1 net: rps: fix error when CONFIG_RFS_ACCEL is off
From: Jason Xing <[email protected]>
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.
--- net/core/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/core/dev.c +2 -1
@@ -4516,12 +4516,13 @@ set_rps_cpu(struct net_device *dev, struct sk_buff *skb, struct rps_dev_flow *rflow, u16 next_cpu) {if (next_cpu < nr_cpu_ids) { +u32 head;#ifdef CONFIG_RFS_ACCEL struct netdev_rx_queue *rxqueue;struct rps_dev_flow_table *flow_table;struct rps_dev_flow *old_rflow; -u32 flow_id, head;u16 rxq_index; +u32 flow_id;int rc;/* Should we steer this flow to a different hardware queue? */
Signature · 1 line
2.37.3
Quoted 11 lines · Jason Xing
From: Jason Xing <[email protected]>
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 theCONFIG_RFS_ACCELscope.Fixes 84b6823cd96b ("net: rps: protect last_qtail with rps_input_queue_tail_save() helper")Reported-by John Sperbeck <[email protected]>Signed-off-by Jason Xing <[email protected]>
Thanks John and Jason !
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Thu, 30 May 2024 11:27:17 +0800 you wrote:
From: Jason Xing <[email protected]>
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 theCONFIG_RFS_ACCELscope.
Quoted 6 lines
Fixes 84b6823cd96b ("net: rps: protect last_qtail with rps_input_queue_tail_save() helper")Reported-by John Sperbeck <[email protected]>Signed-off-by Jason Xing <[email protected]>[...]
Here is the summary with links:
- [net] net: rps: fix error when CONFIG_RFS_ACCEL is off
https://git.kernel.org/netdev/net/c/8105378c0c02
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html