Commit 2a837772 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jakub Kicinski
Browse files

net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP



In the current implementation octeontx2 manages XDP_ABORTED and XDP
invalid as XDP_PASS forwarding the skb to the networking stack.
Align the behaviour to other XDP drivers handling XDP_ABORTED and XDP
invalid as XDP_DROP.
Please note this patch has just compile tested.

Fixes: 06059a1a ("octeontx2-pf: Add XDP support to netdev PF")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250401-octeontx2-xdp-abort-fix-v1-1-f0587c35a0b9@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8bc251e5
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1559,12 +1559,11 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf,
		break;
	default:
		bpf_warn_invalid_xdp_action(pfvf->netdev, prog, act);
		break;
		fallthrough;
	case XDP_ABORTED:
		if (xsk_buff)
			xsk_buff_free(xsk_buff);
		if (act == XDP_ABORTED)
			trace_xdp_exception(pfvf->netdev, prog, act);
		break;
		fallthrough;
	case XDP_DROP:
		cq->pool_ptrs++;
		if (xsk_buff) {