diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2018-07-11 11:12:49 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-13 16:34:31 +0300 |
commit | 509d7648135f914a3dd64c17484b33df5dd0a19c (patch) | |
tree | d3fdf65b8238012c3bbdf987856d9236bff2a4d5 /net/xdp | |
parent | c7a897843224a92209f306c984975b704969b89d (diff) | |
download | linux-509d7648135f914a3dd64c17484b33df5dd0a19c.tar.xz |
xsk: do not return ENXIO from TX copy mode
This patch removes the ENXIO return code from TX copy-mode when
someone has forcefully changed the number of queues on the device so
that the queue bound to the socket is no longer available. Just
silently stop sending anything as in zero-copy mode so the error
reporting gets consistent between the two modes.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/xdp')
-rw-r--r-- | net/xdp/xsk.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 7d220cbd09b6..08d09115093e 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -244,10 +244,8 @@ static int xsk_generic_xmit(struct sock *sk, struct msghdr *m, goto out; } - if (xs->queue_id >= xs->dev->real_num_tx_queues) { - err = -ENXIO; + if (xs->queue_id >= xs->dev->real_num_tx_queues) goto out; - } skb = sock_alloc_send_skb(sk, len, 1, &err); if (unlikely(!skb)) { |