]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: do not return EMSGSIZE in copy mode for packets larger than MTU
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 11 Jul 2018 08:12:52 +0000 (10:12 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Jul 2018 13:34:31 +0000 (15:34 +0200)
commitee9cb4304366089f4d5b7cd9a39bada30e4b2cc4
treea6f5887720b2047a63fd37546b6bcc946d35a960
parent9fd50e6cea3dd80236a3c3e3557271a2b92d083e
xsk: do not return EMSGSIZE in copy mode for packets larger than MTU

This patch stops returning EMSGSIZE from sendmsg in copy mode when the
size of the packet is larger than the MTU. Just send it to the device
so that it will drop it as in zero-copy mode. This makes the error
reporting consistent between copy mode and zero-copy mode.

Fixes: b053263a3f77 ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/xdp/xsk.c