On Wed, Sep 9, 2020 at 11:25 AM Stanislav Fomichev <s...@google.com> wrote:
>
> From: YiFei Zhu <zhuyi...@google.com>
>
> To support modifying the used_maps array, we use a mutex to protect
> the use of the counter and the array. The mutex is initialized right
> after the prog aux is allocated, and destroyed right before prog
> aux is freed. This way we guarantee it's initialized for both cBPF
> and eBPF.
>
> Cc: YiFei Zhu <zhuyifei1...@gmail.com>
> Signed-off-by: YiFei Zhu <zhuyi...@google.com>
> Signed-off-by: Stanislav Fomichev <s...@google.com>
> ---
>  .../net/ethernet/netronome/nfp/bpf/offload.c   | 18 ++++++++++++------
>  include/linux/bpf.h                            |  1 +
>  kernel/bpf/core.c                              | 15 +++++++++++----
>  kernel/bpf/syscall.c                           | 16 ++++++++++++----
>  net/core/dev.c                                 | 11 ++++++++---
>  5 files changed, 44 insertions(+), 17 deletions(-)
>

LGTM.

Acked-by: Andrii Nakryiko <andr...@fb.com>

Reply via email to