* [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes
@ 2022-04-21 13:21 Maciej Fijalkowski
2022-04-21 13:21 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' Maciej Fijalkowski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-04-21 13:21 UTC (permalink / raw)
To: bpf, ast, daniel, sfr, andrii
Cc: netdev, magnus.karlsson, linux-next, Maciej Fijalkowski
This is a follow-up to recently applied set [0] to fix the build
warnings:
error: attribute 'fallthrough' not preceding a case label or default
label [-Werror]
that Stephen has stumbled upon when merging bpf-next to linux-next.
Apologies for these leftovers.
Thanks,
Maciej
[0]: https://lore.kernel.org/bpf/20220413153015.453864-1-maciej.fijalkowski@intel.com/
Maciej Fijalkowski (2):
ixgbe: xsk: get rid of redundant 'fallthrough'
i40e: xsk: get rid of redundant 'fallthrough'
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 -
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 -
2 files changed, 2 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough'
2022-04-21 13:21 [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes Maciej Fijalkowski
@ 2022-04-21 13:21 ` Maciej Fijalkowski
2022-04-21 22:23 ` Stephen Rothwell
2022-04-21 13:21 ` [PATCH bpf-next 2/2] i40e: " Maciej Fijalkowski
2022-04-21 14:40 ` [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-04-21 13:21 UTC (permalink / raw)
To: bpf, ast, daniel, sfr, andrii
Cc: netdev, magnus.karlsson, linux-next, Maciej Fijalkowski
Intel drivers translate actions returned from XDP programs to their own
return codes that have the following mapping:
XDP_REDIRECT -> IXGBE_XDP_{REDIR,CONSUMED}
XDP_TX -> IXGBE_XDP_{TX,CONSUMED}
XDP_DROP -> IXGBE_XDP_CONSUMED
XDP_ABORTED -> IXGBE_XDP_CONSUMED
XDP_PASS -> IXGBE_XDP_PASS
Commit c7dd09fd4628 ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx
queue gets full") introduced new translation
XDP_REDIRECT -> IXGBE_XDP_EXIT
which is set when XSK RQ gets full and to indicate that driver should
stop further Rx processing. This happens for unsuccessful
xdp_do_redirect() so it is valuable to call trace_xdp_exception() for
this case. In order to avoid IXGBE_XDP_EXIT -> IXGBE_XDP_CONSUMED
overwrite, XDP_DROP case was moved above which in turn made the
'fallthrough' that is in XDP_ABORTED useless as it became the last label
in the switch statement.
Simply drop this leftover.
Fixes: c7dd09fd4628 ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
index 68532cffd453..1703c640a434 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
@@ -144,7 +144,6 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter,
result = IXGBE_XDP_CONSUMED;
out_failure:
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
- fallthrough; /* handle aborts by dropping packet */
}
return result;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH bpf-next 2/2] i40e: xsk: get rid of redundant 'fallthrough'
2022-04-21 13:21 [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes Maciej Fijalkowski
2022-04-21 13:21 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' Maciej Fijalkowski
@ 2022-04-21 13:21 ` Maciej Fijalkowski
2022-04-21 14:40 ` [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-04-21 13:21 UTC (permalink / raw)
To: bpf, ast, daniel, sfr, andrii
Cc: netdev, magnus.karlsson, linux-next, Maciej Fijalkowski
Intel drivers translate actions returned from XDP programs to their own
return codes that have the following mapping:
XDP_REDIRECT -> I40E_XDP_{REDIR,CONSUMED}
XDP_TX -> I40E_XDP_{TX,CONSUMED}
XDP_DROP -> I40E_XDP_CONSUMED
XDP_ABORTED -> I40E_XDP_CONSUMED
XDP_PASS -> I40E_XDP_PASS
Commit b8aef650e549 ("i40e, xsk: Terminate Rx side of NAPI when XSK Rx
queue gets full") introduced new translation
XDP_REDIRECT -> I40E_XDP_EXIT
which is set when XSK RQ gets full and to indicate that driver should
stop further Rx processing. This happens for unsuccessful
xdp_do_redirect() so it is valuable to call trace_xdp_exception() for
this case. In order to avoid I40E_XDP_EXIT -> IXGBE_XDP_CONSUMED
overwrite, XDP_DROP case was moved above which in turn made the
'fallthrough' that is in XDP_ABORTED useless as it became the last label
in the switch statement.
Simply drop this leftover.
Fixes: b8aef650e549 ("i40e, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index 050280fd10c1..af3e7e6afc85 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -189,7 +189,6 @@ static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
result = I40E_XDP_CONSUMED;
out_failure:
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
- fallthrough; /* handle aborts by dropping packet */
}
return result;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes
2022-04-21 13:21 [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes Maciej Fijalkowski
2022-04-21 13:21 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' Maciej Fijalkowski
2022-04-21 13:21 ` [PATCH bpf-next 2/2] i40e: " Maciej Fijalkowski
@ 2022-04-21 14:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-21 14:40 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, ast, daniel, sfr, andrii, netdev, magnus.karlsson, linux-next
Hello:
This series was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Thu, 21 Apr 2022 15:21:24 +0200 you wrote:
> This is a follow-up to recently applied set [0] to fix the build
> warnings:
>
> error: attribute 'fallthrough' not preceding a case label or default
> label [-Werror]
>
> that Stephen has stumbled upon when merging bpf-next to linux-next.
> Apologies for these leftovers.
>
> [...]
Here is the summary with links:
- [bpf-next,1/2] ixgbe: xsk: get rid of redundant 'fallthrough'
https://git.kernel.org/bpf/bpf-next/c/e130e8d5434b
- [bpf-next,2/2] i40e: xsk: get rid of redundant 'fallthrough'
https://git.kernel.org/bpf/bpf-next/c/9d87e41a6d64
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] 5+ messages in thread
* Re: [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough'
2022-04-21 13:21 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' Maciej Fijalkowski
@ 2022-04-21 22:23 ` Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2022-04-21 22:23 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, ast, daniel, andrii, netdev, magnus.karlsson, linux-next
[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]
Hi Maciej,
On Thu, 21 Apr 2022 15:21:25 +0200 Maciej Fijalkowski <maciej.fijalkowski@intel.com> wrote:
>
> Intel drivers translate actions returned from XDP programs to their own
> return codes that have the following mapping:
>
> XDP_REDIRECT -> IXGBE_XDP_{REDIR,CONSUMED}
> XDP_TX -> IXGBE_XDP_{TX,CONSUMED}
> XDP_DROP -> IXGBE_XDP_CONSUMED
> XDP_ABORTED -> IXGBE_XDP_CONSUMED
> XDP_PASS -> IXGBE_XDP_PASS
>
> Commit c7dd09fd4628 ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx
> queue gets full") introduced new translation
>
> XDP_REDIRECT -> IXGBE_XDP_EXIT
>
> which is set when XSK RQ gets full and to indicate that driver should
> stop further Rx processing. This happens for unsuccessful
> xdp_do_redirect() so it is valuable to call trace_xdp_exception() for
> this case. In order to avoid IXGBE_XDP_EXIT -> IXGBE_XDP_CONSUMED
> overwrite, XDP_DROP case was moved above which in turn made the
> 'fallthrough' that is in XDP_ABORTED useless as it became the last label
> in the switch statement.
>
> Simply drop this leftover.
>
> Fixes: c7dd09fd4628 ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reported-by ?
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-21 22:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 13:21 [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes Maciej Fijalkowski
2022-04-21 13:21 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' Maciej Fijalkowski
2022-04-21 22:23 ` Stephen Rothwell
2022-04-21 13:21 ` [PATCH bpf-next 2/2] i40e: " Maciej Fijalkowski
2022-04-21 14:40 ` [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes 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).