bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xdp: fix xsk_generic_xmit errno
@ 2020-06-11  5:11 Li RongQing
  2020-06-11  8:18 ` Björn Töpel
  2020-06-11 19:44 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Li RongQing @ 2020-06-11  5:11 UTC (permalink / raw)
  To: netdev, bpf

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 <lirongqing@baidu.com>
---
 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


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

end of thread, other threads:[~2020-06-11 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11  5:11 [PATCH] xdp: fix xsk_generic_xmit errno Li RongQing
2020-06-11  8:18 ` Björn Töpel
2020-06-11 14:24   ` Daniel Borkmann
2020-06-11 19:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).