Skip to content

Commit 2a83777

Browse files
LorenzoBianconikuba-moo
authored andcommitted
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: 06059a1 ("octeontx2-pf: Add XDP support to netdev PF") Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8bc251e commit 2a83777

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,12 +1559,11 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf,
15591559
break;
15601560
default:
15611561
bpf_warn_invalid_xdp_action(pfvf->netdev, prog, act);
1562-
break;
1562+
fallthrough;
15631563
case XDP_ABORTED:
1564-
if (xsk_buff)
1565-
xsk_buff_free(xsk_buff);
1566-
trace_xdp_exception(pfvf->netdev, prog, act);
1567-
break;
1564+
if (act == XDP_ABORTED)
1565+
trace_xdp_exception(pfvf->netdev, prog, act);
1566+
fallthrough;
15681567
case XDP_DROP:
15691568
cq->pool_ptrs++;
15701569
if (xsk_buff) {

0 commit comments

Comments
 (0)