Revert "xsk: simplify AF_XDP socket teardown"
authorBjörn Töpel <bjorn.topel@intel.com>
Thu, 21 Feb 2019 12:07:38 +0000 (13:07 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Feb 2019 15:32:25 +0000 (16:32 +0100)
commit11fe9262ed226c127f67ca4bd85977b22589b68a
treebe203990ab00621f32769d7f43db841d2adc520e
parentdf1a2cb7c74b3d3abc8d8c2d690f82c8ebc3490a
Revert "xsk: simplify AF_XDP socket teardown"

This reverts commit e2ce3674883ecba2605370404208c9d4a07ae1c3.

It turns out that the sock destructor xsk_destruct was needed after
all. The cleanup simplification broke the skb transmit cleanup path,
due to that the umem was prematurely destroyed.

The umem cannot be destroyed until all outstanding skbs are freed,
which means that we cannot remove the umem until the sk_destruct has
been called.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/xdp/xsk.c