bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Introduce bpf_link in libbpf's xsk
@ 2021-02-15 15:46 Maciej Fijalkowski
  2021-02-15 15:46 ` [PATCH bpf-next 1/3] libbpf: xsk: use bpf_link Maciej Fijalkowski
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Maciej Fijalkowski @ 2021-02-15 15:46 UTC (permalink / raw)
  To: daniel, ast, bpf, netdev
  Cc: andrii, toke, bjorn.topel, magnus.karlsson, ciara.loftus,
	Maciej Fijalkowski

Hi,

This set is another approach towards addressing the below issue:

// load xdp prog and xskmap and add entry to xskmap at idx 10
$ sudo ./xdpsock -i ens801f0 -t -q 10

// add entry to xskmap at idx 11
$ sudo ./xdpsock -i ens801f0 -t -q 11

terminate one of the processes and another one is unable to work due to
the fact that the XDP prog was unloaded from interface.

Previous attempt was, to put it mildly, a bit broken, as there was no
synchronization between updates to additional map, as Bjorn pointed out.
See https://lore.kernel.org/netdev/20190603131907.13395-5-maciej.fijalkowski@intel.com/

In the meantime bpf_link was introduced and it seems that it can address
the issue of refcounting the XDP prog on interface. More info on commit
messages.

Thanks.

Maciej Fijalkowski (3):
  libbpf: xsk: use bpf_link
  libbpf: clear map_info before each bpf_obj_get_info_by_fd
  samples: bpf: do not unload prog within xdpsock

 samples/bpf/xdpsock_user.c |  55 ++++----------
 tools/lib/bpf/xsk.c        | 147 +++++++++++++++++++++++++++++++------
 2 files changed, 139 insertions(+), 63 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2021-02-23  1:16 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 15:46 [PATCH bpf-next 0/3] Introduce bpf_link in libbpf's xsk Maciej Fijalkowski
2021-02-15 15:46 ` [PATCH bpf-next 1/3] libbpf: xsk: use bpf_link Maciej Fijalkowski
2021-02-15 17:07   ` Toke Høiland-Jørgensen
2021-02-15 17:38     ` Björn Töpel
2021-02-15 19:35       ` Toke Høiland-Jørgensen
2021-02-16  2:01         ` Maciej Fijalkowski
2021-02-16  9:15           ` Björn Töpel
2021-02-16 10:27           ` Toke Høiland-Jørgensen
2021-02-16 20:15             ` Maciej Fijalkowski
2021-02-15 20:22       ` John Fastabend
2021-02-15 21:38         ` Toke Høiland-Jørgensen
2021-02-16  0:18           ` John Fastabend
2021-02-16  2:23             ` Maciej Fijalkowski
2021-02-16  9:23               ` Björn Töpel
2021-02-16 10:36             ` Toke Høiland-Jørgensen
2021-02-23  1:15               ` Andrii Nakryiko
2021-02-17  2:23           ` Dan Siemon
2021-02-17  7:16             ` Magnus Karlsson
2021-02-17  7:36               ` Magnus Karlsson
2021-02-16  2:10         ` Maciej Fijalkowski
2021-02-15 20:49   ` John Fastabend
2021-02-16  2:38     ` Maciej Fijalkowski
2021-02-16 18:19       ` John Fastabend
2021-02-16 20:10         ` Maciej Fijalkowski
2021-02-16  9:20     ` Björn Töpel
2021-02-16 10:39       ` Toke Høiland-Jørgensen
2021-02-16 19:15         ` John Fastabend
2021-02-16 20:50           ` Maciej Fijalkowski
2021-02-16 21:17             ` John Fastabend
2021-02-15 15:46 ` [PATCH bpf-next 2/3] libbpf: clear map_info before each bpf_obj_get_info_by_fd Maciej Fijalkowski
2021-02-15 20:33   ` John Fastabend
2021-02-16  2:42     ` Maciej Fijalkowski
2021-02-15 15:46 ` [PATCH bpf-next 3/3] samples: bpf: do not unload prog within xdpsock Maciej Fijalkowski
2021-02-15 20:24   ` John Fastabend
2021-02-16  9:22     ` Björn Töpel
2021-02-16 14:15       ` Maciej Fijalkowski
2021-02-15 16:07 ` [PATCH bpf-next 0/3] Introduce bpf_link in libbpf's xsk Björn Töpel

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).