OSDN Git Service

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)
commit09210c4bcc065d9d91ef3c051902ad18252cd3c0
treea6f5887720b2047a63fd37546b6bcc946d35a960
parent6efb4436f7fcc50cc3fb9a113d0f16e3968172b1
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: 35fcde7f8deb ("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