diff mbox series

[v2,net-next,06/11] net: ena: Don't check if XDP program is loaded in ena_xdp_execute()

Message ID 20240101190855.18739-7-darinzon@amazon.com (mailing list archive)
State Accepted
Commit 436c793585951464e2b679c440083daa19f6fb02
Delegated to: Netdev Maintainers
Headers show
Series ENA driver XDP changes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1113 this patch: 1113
netdev/cc_maintainers warning 7 maintainers not CCed: hawk@kernel.org edumazet@google.com pabeni@redhat.com ast@kernel.org bpf@vger.kernel.org daniel@iogearbox.net john.fastabend@gmail.com
netdev/build_clang success Errors and warnings before: 1140 this patch: 1140
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1140 this patch: 1140
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arinzon, David Jan. 1, 2024, 7:08 p.m. UTC
From: David Arinzon <darinzon@amazon.com>

This check is already done in ena_clean_rx_irq() which indirectly
calls it.
This function is called in napi context and the driver doesn't
allow to change the XDP program without performing destruction and
reinitialization of napi context (part of ena_down/ena_up sequence).

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
---
 drivers/net/ethernet/amazon/ena/ena_xdp.h | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amazon/ena/ena_xdp.h b/drivers/net/ethernet/amazon/ena/ena_xdp.h
index 3fa8e80..25204fb 100644
--- a/drivers/net/ethernet/amazon/ena/ena_xdp.h
+++ b/drivers/net/ethernet/amazon/ena/ena_xdp.h
@@ -87,9 +87,6 @@  static inline int ena_xdp_execute(struct ena_ring *rx_ring, struct xdp_buff *xdp
 
 	xdp_prog = READ_ONCE(rx_ring->xdp_bpf_prog);
 
-	if (!xdp_prog)
-		return verdict;
-
 	verdict = bpf_prog_run_xdp(xdp_prog, xdp);
 
 	switch (verdict) {