]> 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)
commit3f4a0efbeb1e671f18641dabc07f694878420ebe
treea6f5887720b2047a63fd37546b6bcc946d35a960
parentad05622ab397a2ad5c20d28e635784226a9ffc78
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: ed6ca125478b ("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