netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Björn Töpel" <bjorn.topel@gmail.com>,
	ast@kernel.org, netdev@vger.kernel.org
Cc: magnus.karlsson@intel.com, jonathan.lemon@gmail.com,
	bjorn.topel@intel.com, bruce.richardson@intel.com,
	songliubraving@fb.com, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 0/2] net: xdp: XSKMAP improvements
Date: Sat, 17 Aug 2019 23:28:05 +0200	[thread overview]
Message-ID: <c9f62b8e-34e1-3331-8a23-95d064aa4f87@iogearbox.net> (raw)
In-Reply-To: <20190815093014.31174-1-bjorn.topel@gmail.com>

On 8/15/19 11:30 AM, Björn Töpel wrote:
> This series (v5 and counting) add two improvements for the XSKMAP,
> used by AF_XDP sockets.
> 
> 1. Automatic cleanup when an AF_XDP socket goes out of scope/is
>     released. Instead of require that the user manually clears the
>     "released" state socket from the map, this is done
>     automatically. Each socket tracks which maps it resides in, and
>     remove itself from those maps at relase. A notable implementation
>     change, is that the sockets references the map, instead of the map
>     referencing the sockets. Which implies that when the XSKMAP is
>     freed, it is by definition cleared of sockets.
> 
> 2. The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flag on insert,
>     which this patch addresses.
> 
> 
> Thanks,
> Björn
> 
> v1->v2: Fixed deadlock and broken cleanup. (Daniel)
> v2->v3: Rebased onto bpf-next
> v3->v4: {READ, WRITE}_ONCE consistency. (Daniel)
>          Socket release/map update race. (Daniel)
> v4->v5: Avoid use-after-free on XSKMAP self-assignment [1]. (Daniel)
>          Removed redundant assignment in xsk_map_update_elem().
>          Variable name consistency; Use map_entry everywhere.
> 
> [1] https://lore.kernel.org/bpf/20190802081154.30962-1-bjorn.topel@gmail.com/T/#mc68439e97bc07fa301dad9fc4850ed5aa392f385
> 
> 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 |  18 ++++++
>   kernel/bpf/xskmap.c    | 133 ++++++++++++++++++++++++++++++++++-------
>   net/xdp/xsk.c          |  50 ++++++++++++++++
>   3 files changed, 179 insertions(+), 22 deletions(-)
> 

Looks better, applied thanks!

      parent reply	other threads:[~2019-08-17 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  9:30 [PATCH bpf-next v5 0/2] net: xdp: XSKMAP improvements Björn Töpel
2019-08-15  9:30 ` [PATCH bpf-next v5 1/2] xsk: remove AF_XDP socket from map when the socket is released Björn Töpel
2019-08-15  9:30 ` [PATCH bpf-next v5 2/2] xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP Björn Töpel
2019-08-17 21:28 ` Daniel Borkmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9f62b8e-34e1-3331-8a23-95d064aa4f87@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=bruce.richardson@intel.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).