From: Maciej Fijalkowski <maciej.fijalkowski@intel•com>
To: bpf@vger•kernel.org, ast@kernel•org, daniel@iogearbox•net,
sfr@canb•auug.org.au, andrii@kernel•org
Cc: netdev@vger•kernel.org, magnus.karlsson@intel•com,
linux-next@vger•kernel.org,
Maciej Fijalkowski <maciej.fijalkowski@intel•com>
Subject: [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough'
Date: Thu, 21 Apr 2022 15:21:25 +0200 [thread overview]
Message-ID: <20220421132126.471515-2-maciej.fijalkowski@intel.com> (raw)
In-Reply-To: <20220421132126.471515-1-maciej.fijalkowski@intel.com>
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
next prev parent reply other threads:[~2022-04-21 13:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 13:21 [PATCH bpf-next 0/2] xsk: remove reduntant 'falltrough' attributes Maciej Fijalkowski
2022-04-21 13:21 ` Maciej Fijalkowski [this message]
2022-04-21 22:23 ` [PATCH bpf-next 1/2] ixgbe: xsk: get rid of redundant 'fallthrough' 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220421132126.471515-2-maciej.fijalkowski@intel.com \
--to=maciej.fijalkowski@intel$(echo .)com \
--cc=andrii@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=magnus.karlsson@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox