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

From: <[email-masked]>
Date: Mon, 1 Jan 2024 19:08:50 +0000

From: David Arinzon <[email-masked]>

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 <[email-masked]>
Signed-off-by: David Arinzon <[email-masked]>
---
 drivers/net/ethernet/amazon/ena/ena_xdp.h | 3 ---
 1 file changed, 3 deletions(-)

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) {
-- 
2.40.1