* [PATCH net V1 0/1] Fix XDP bug in ENA driver
@ 2021-02-05 19:51 Shay Agroskin
2021-02-05 19:51 ` [PATCH net V1 1/1] net: ena: Update XDP verdict upon failure Shay Agroskin
2021-02-06 23:20 ` [PATCH net V1 0/1] Fix XDP bug in ENA driver patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Shay Agroskin @ 2021-02-05 19:51 UTC (permalink / raw)
To: David Miller, Jakub Kicinski, netdev
Cc: Shay Agroskin, dwmw, zorik, matua, saeedb, msw, aliguori, nafea,
gtzalik, netanel, alisaidi, benh, akiyano, sameehj, ndagan
Hi all,
This single patch fixes a bug spotted in previous XDP Redirect implementation in
ENA.
Shay Agroskin (1):
net: ena: Update XDP verdict upon failure
drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net V1 1/1] net: ena: Update XDP verdict upon failure
2021-02-05 19:51 [PATCH net V1 0/1] Fix XDP bug in ENA driver Shay Agroskin
@ 2021-02-05 19:51 ` Shay Agroskin
2021-02-06 23:20 ` [PATCH net V1 0/1] Fix XDP bug in ENA driver patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Shay Agroskin @ 2021-02-05 19:51 UTC (permalink / raw)
To: David Miller, Jakub Kicinski, netdev
Cc: Shay Agroskin, dwmw, zorik, matua, saeedb, msw, aliguori, nafea,
gtzalik, netanel, alisaidi, benh, akiyano, sameehj, ndagan
The verdict returned from ena_xdp_execute() is used to determine the
fate of the RX buffer's page. In case of XDP Redirect/TX error the
verdict should be set to XDP_ABORTED, otherwise the page won't be freed.
Fixes: a318c70ad152 ("net: ena: introduce XDP redirect implementation")
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 06596fa1f..a0596c073 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -404,6 +404,7 @@ static int ena_xdp_execute(struct ena_ring *rx_ring, struct xdp_buff *xdp)
if (unlikely(!xdpf)) {
trace_xdp_exception(rx_ring->netdev, xdp_prog, verdict);
xdp_stat = &rx_ring->rx_stats.xdp_aborted;
+ verdict = XDP_ABORTED;
break;
}
@@ -424,7 +425,10 @@ static int ena_xdp_execute(struct ena_ring *rx_ring, struct xdp_buff *xdp)
xdp_stat = &rx_ring->rx_stats.xdp_redirect;
break;
}
- fallthrough;
+ trace_xdp_exception(rx_ring->netdev, xdp_prog, verdict);
+ xdp_stat = &rx_ring->rx_stats.xdp_aborted;
+ verdict = XDP_ABORTED;
+ break;
case XDP_ABORTED:
trace_xdp_exception(rx_ring->netdev, xdp_prog, verdict);
xdp_stat = &rx_ring->rx_stats.xdp_aborted;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net V1 0/1] Fix XDP bug in ENA driver
2021-02-05 19:51 [PATCH net V1 0/1] Fix XDP bug in ENA driver Shay Agroskin
2021-02-05 19:51 ` [PATCH net V1 1/1] net: ena: Update XDP verdict upon failure Shay Agroskin
@ 2021-02-06 23:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-06 23:20 UTC (permalink / raw)
To: Shay Agroskin
Cc: davem, kuba, netdev, dwmw, zorik, matua, saeedb, msw, aliguori,
nafea, gtzalik, netanel, alisaidi, benh, akiyano, sameehj,
ndagan
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 5 Feb 2021 21:51:13 +0200 you wrote:
> Hi all,
> This single patch fixes a bug spotted in previous XDP Redirect implementation in
> ENA.
>
> Shay Agroskin (1):
> net: ena: Update XDP verdict upon failure
>
> [...]
Here is the summary with links:
- [net,V1,1/1] net: ena: Update XDP verdict upon failure
https://git.kernel.org/netdev/net/c/225353c070fd
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:[~2021-02-06 23:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 19:51 [PATCH net V1 0/1] Fix XDP bug in ENA driver Shay Agroskin
2021-02-05 19:51 ` [PATCH net V1 1/1] net: ena: Update XDP verdict upon failure Shay Agroskin
2021-02-06 23:20 ` [PATCH net V1 0/1] Fix XDP bug in ENA driver patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.