]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: xsk: don't return frames via the allocator on error
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 28 Jul 2018 03:20:08 +0000 (20:20 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 31 Jul 2018 00:03:19 +0000 (02:03 +0200)
commit2d55d614fcf58187e2937dba11643b9471cd64d7
tree13e619294a4c02605b7f4f8782bfa9fea4058f5a
parent573b3aa6940661dc50c383213d428c27df78be7c
net: xsk: don't return frames via the allocator on error

xdp_return_buff() is used when frame has been successfully
handled (transmitted) or if an error occurred during delayed
processing and there is no way to report it back to
xdp_do_redirect().

In case of __xsk_rcv_zc() error is propagated all the way
back to the driver, so there is no need to call
xdp_return_buff().  Driver will recycle the frame anyway
after seeing that error happened.

Fixes: 173d3adb6f43 ("xsk: add zero-copy support for Rx")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/xdp/xsk.c