BPF List
 help / color / mirror / Atom feed
* [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP
@ 2025-04-01  9:02 Lorenzo Bianconi
  2025-04-03 11:56 ` Paolo Abeni
  2025-04-04 14:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2025-04-01  9:02 UTC (permalink / raw)
  To: Sunil Goutham, Geetha sowjanya, Subbaraya Sundeep, hariprasad,
	Bharat Bhushan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend
  Cc: Sunil Goutham, netdev, bpf, Lorenzo Bianconi

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: 06059a1a9a4a5 ("octeontx2-pf: Add XDP support to netdev PF")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
index af8cabe828d05c8832085d24d183312f24d00330..0a6bb346ba45be3a5d680a49cece5042cea68583 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
@@ -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);
-		trace_xdp_exception(pfvf->netdev, prog, act);
-		break;
+		if (act == XDP_ABORTED)
+			trace_xdp_exception(pfvf->netdev, prog, act);
+		fallthrough;
 	case XDP_DROP:
 		cq->pool_ptrs++;
 		if (xsk_buff) {

---
base-commit: f278b6d5bb465c7fd66f3d103812947e55b376ed
change-id: 20250401-octeontx2-xdp-abort-fix-fc6cbcd6c660

Best regards,
-- 
Lorenzo Bianconi <lorenzo@kernel.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP
  2025-04-01  9:02 [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP Lorenzo Bianconi
@ 2025-04-03 11:56 ` Paolo Abeni
  2025-04-04 14:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2025-04-03 11:56 UTC (permalink / raw)
  To: Lorenzo Bianconi, Sunil Goutham, Geetha sowjanya,
	Subbaraya Sundeep, hariprasad, Bharat Bhushan, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend
  Cc: Sunil Goutham, netdev, bpf

On 4/1/25 11:02 AM, Lorenzo Bianconi wrote:
> 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: 06059a1a9a4a5 ("octeontx2-pf: Add XDP support to netdev PF")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

The patch LGTM, but I would appreciate some feedback from someone that
could actually run the code on real H/W before sending it all the way to
stable.

Thanks!

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP
  2025-04-01  9:02 [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP Lorenzo Bianconi
  2025-04-03 11:56 ` Paolo Abeni
@ 2025-04-04 14:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-04 14:30 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: sgoutham, gakula, sbhatta, hkelam, bbhushan2, andrew+netdev,
	davem, edumazet, kuba, pabeni, ast, daniel, hawk, john.fastabend,
	sgoutham, netdev, bpf

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 01 Apr 2025 11:02:12 +0200 you wrote:
> 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: 06059a1a9a4a5 ("octeontx2-pf: Add XDP support to netdev PF")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP
    https://git.kernel.org/netdev/net/c/2a8377720a0a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-04 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01  9:02 [PATCH net] net: octeontx2: Handle XDP_ABORTED and XDP invalid as XDP_DROP Lorenzo Bianconi
2025-04-03 11:56 ` Paolo Abeni
2025-04-04 14:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox