* [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off
@ 2024-05-30 3:27 Jason Xing
2024-05-30 4:44 ` Eric Dumazet
2024-06-01 23:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jason Xing @ 2024-05-30 3:27 UTC (permalink / raw)
To: edumazet, kuba, pabeni, davem
Cc: netdev, kerneljasonxing, Jason Xing, John Sperbeck
From: Jason Xing <kernelxing@tencent.com>
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>
---
net/core/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 85fe8138f3e4..e62698c7a0e6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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? */
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off
2024-05-30 3:27 [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off Jason Xing
@ 2024-05-30 4:44 ` Eric Dumazet
2024-06-01 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-05-30 4:44 UTC (permalink / raw)
To: Jason Xing; +Cc: kuba, pabeni, davem, netdev, Jason Xing, John Sperbeck
On Thu, May 30, 2024 at 5:28 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> From: Jason Xing <kernelxing@tencent.com>
>
> 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>
Thanks John and Jason !
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off
2024-05-30 3:27 [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off Jason Xing
2024-05-30 4:44 ` Eric Dumazet
@ 2024-06-01 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-01 23:40 UTC (permalink / raw)
To: Jason Xing; +Cc: edumazet, kuba, pabeni, davem, netdev, kernelxing, jsperbeck
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 30 May 2024 11:27:17 +0800 you wrote:
> From: Jason Xing <kernelxing@tencent.com>
>
> 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>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-01 23:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 3:27 [PATCH net] net: rps: fix error when CONFIG_RFS_ACCEL is off Jason Xing
2024-05-30 4:44 ` Eric Dumazet
2024-06-01 23:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).