mbox series

[bpf-next,v3,0/2] net: xdp: XSKMAP improvements

Message ID 20190620100652.31283-1-bjorn.topel@gmail.com
Headers show
Series net: xdp: XSKMAP improvements | expand

Message

Björn Töpel June 20, 2019, 10:06 a.m. UTC
This series add two improvements for the XSKMAP, used by AF_XDP
sockets.

1. Automatic cleanup when an AF_XDP socket goes out of scope. Instead
   of manually cleaning out the "released" state socket from the map,
   this is done automatically. This mimics the SOCKMAP behavior; Each
   socket tracks which maps it resides in, and remove itself from
   those maps at relase.

2. The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flag on insert,
   which this patch addresses.

Song, this v3 of the series doesn't have any code changes, it's just a
rebase onto the latest bpf-next. You had some questions on the
map_entry pointer, but the thread died after that.


Thanks,
Björn

v1->v2: Fixed deadlock and broken cleanup. (Daniel)
v2->v3: Rebased onto bpf-next


Björn Töpel (2):
  xsk: remove AF_XDP socket from map when the socket is released
  xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP

 include/net/xdp_sock.h |   3 ++
 kernel/bpf/xskmap.c    | 117 +++++++++++++++++++++++++++++++++++------
 net/xdp/xsk.c          |  25 +++++++++
 3 files changed, 130 insertions(+), 15 deletions(-)