All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] Add BPF_SYNCHRONIZE_MAPS bpf(2) command
@ 2018-07-29 15:51 Alexei Starovoitov
  2018-07-29 20:46 ` Daniel Colascione
  2018-07-31  2:01 ` [PATCH v2] Add BPF_SYNCHRONIZE_MAPS " Joel Fernandes
  0 siblings, 2 replies; 31+ messages in thread
From: Alexei Starovoitov @ 2018-07-29 15:51 UTC (permalink / raw)
  To: Daniel Colascione
  Cc: Joel Fernandes, LKML, Tim Murray, Network Development,
	Lorenzo Colitti, Chenbo Feng, Mathieu Desnoyers,
	Alexei Starovoitov, Daniel Borkmann

On Thu, Jul 26, 2018 at 7:51 PM, Daniel Colascione <dancol@google.com> wrote:
> BPF_SYNCHRONIZE_MAPS waits for the release of any references to a BPF
> map made by a BPF program that is running at the time the
> BPF_SYNCHRONIZE_MAPS command is issued. The purpose of this command is
> to provide a means for userspace to replace a BPF map with another,
> newer version, then ensure that no component is still using the "old"
> map before manipulating the "old" map in some way.
>
> Signed-off-by: Daniel Colascione <dancol@google.com>
> ---
>  include/uapi/linux/bpf.h |  9 +++++++++
>  kernel/bpf/syscall.c     | 13 +++++++++++++
>  2 files changed, 22 insertions(+)
>
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index b7db3261c62d..5b27e9117d3e 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -75,6 +75,14 @@ struct bpf_lpm_trie_key {
>         __u8    data[0];        /* Arbitrary size */
>  };
>
> +/* BPF_SYNCHRONIZE_MAPS waits for the release of any references to a
> + * BPF map made by a BPF program that is running at the time the
> + * BPF_SYNCHRONIZE_MAPS command is issued. The purpose of this command

that doesn't sound right to me.
such command won't wait for the release of the references.
in case of map-in-map the program does not hold
the references to inner map (only to outer map).

> + * is to provide a means for userspace to replace a BPF map with
> + * another, newer version, then ensure that no component is still
> + * using the "old" map before manipulating the "old" map in some way.
> + */

that's correct, but the whole paragraph still reads too
'generic' which will lead to confusion,
whereas the use case is map-in-map only.
I think bpf_sync_inner_map or
bpf_sync_map_in_map would be better
choices for the name.

btw i don't have reliable internet access at the moment,
so pls excuse the delays.

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

end of thread, other threads:[~2018-11-10 18:58 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 15:51 [PATCH v2] Add BPF_SYNCHRONIZE_MAPS bpf(2) command Alexei Starovoitov
2018-07-29 20:46 ` Daniel Colascione
2018-07-29 20:58   ` [PATCH v3] Add BPF_SYNCHRONIZE_MAP_TO_MAP_REFERENCES " Daniel Colascione
2018-07-30 10:04     ` Daniel Borkmann
2018-07-30 10:04       ` Daniel Borkmann
2018-07-30 10:25       ` Daniel Colascione
2018-07-31  0:26         ` Jakub Kicinski
2018-07-31  0:33           ` Daniel Colascione
2018-07-31  0:45             ` Jakub Kicinski
2018-07-31  0:50               ` Daniel Colascione
2018-07-31  1:14                 ` Jakub Kicinski
2018-07-31  8:34             ` Daniel Borkmann
2018-07-31  9:36               ` Daniel Colascione
2018-08-10 22:52                 ` Alexei Starovoitov
2018-08-14 20:37                   ` Daniel Colascione
2018-08-16  4:01                     ` Alexei Starovoitov
2018-10-12 10:54                       ` [PATCH v4] Wait for running BPF programs when updating map-in-map Daniel Colascione
2018-10-12 20:54                         ` Joel Fernandes
2018-10-13  2:31                         ` Alexei Starovoitov
2018-10-16 17:39                           ` Joel Fernandes
2018-10-18 15:46                             ` Alexei Starovoitov
2018-10-18 23:36                               ` Joel Fernandes
2018-11-10  2:01                                 ` Chenbo Feng
2018-11-10 15:22                                   ` Greg KH
2018-11-10 18:58                                     ` Chenbo Feng
     [not found]     ` <CAKOZues6SE_c=ix7ap6QaJHqd1TmYpWWMJiu3=TtuqgKuqOUCA@mail.gmail.com>
2018-08-10 22:29       ` [PATCH v3] Add BPF_SYNCHRONIZE_MAP_TO_MAP_REFERENCES bpf(2) command Alexei Starovoitov
2018-07-31  2:01 ` [PATCH v2] Add BPF_SYNCHRONIZE_MAPS " Joel Fernandes
2018-07-31  2:06   ` Joel Fernandes
2018-07-31  4:03     ` Y Song
2018-07-31 21:56       ` Joel Fernandes
2018-07-31 22:30         ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.