Thread (4 messages) flat view 4 messages, 4 authors, 2020-06-11

Re: [PATCH] xdp: fix xsk_generic_xmit errno

From: Björn Töpel <hidden>
Date: 2020-06-11 08:18:26
Also in: bpf

On Thu, 11 Jun 2020 at 07:11, Li RongQing [off-list ref] wrote:
propagate sock_alloc_send_skb error code, not set it
to EAGAIN unconditionally, when fail to allocate skb,
which maybe causes that user space unnecessary loops

Fixes: 35fcde7f8deb "(xsk: support for Tx)"
Signed-off-by: Li RongQing <redacted>

Thanks!
Acked-by: Björn Töpel <redacted>

Alexei/Daniel: This should go into "bpf".


Björn
quoted hunk ↗ jump to hunk
---
 net/xdp/xsk.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index b6c0f08bd80d..1ba3ea262c15 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -353,7 +353,6 @@ static int xsk_generic_xmit(struct sock *sk)
                len = desc.len;
                skb = sock_alloc_send_skb(sk, len, 1, &err);
                if (unlikely(!skb)) {
-                       err = -EAGAIN;
                        goto out;
                }

--
2.16.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help