All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin KaFai Lau <martin.lau@linux.dev>
To: Amery Hung <ameryhung@gmail.com>
Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com,
	andrii@kernel.org, daniel@iogearbox.net, tj@kernel.org,
	martin.lau@kernel.org, kernel-team@meta.com, bpf@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next 2/4] bpf: Support associating BPF program with struct_ops
Date: Thu, 16 Oct 2025 17:19:37 -0700	[thread overview]
Message-ID: <285ba391-1d23-41be-8cc4-e2874fbcb1af@linux.dev> (raw)
In-Reply-To: <20251016204503.3203690-3-ameryhung@gmail.com>



On 10/16/25 1:45 PM, Amery Hung wrote:
> Each associated programs except struct_ops programs of the map will take
> a refcount on the map to pin it so that prog->aux->st_ops_assoc, if set,
> is always valid. However, it is not guaranteed whether the map members
> are fully updated nor is it attached or not. For example, a BPF program
> can be associated with a struct_ops map before map_update. The

Forgot to ask this, should it at least ensure the map is fully updated 
or it does not help in the use case?

> struct_ops implementer will be responsible for maintaining and checking
> the state of the associated struct_ops map before accessing it.


  parent reply	other threads:[~2025-10-17  0:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 20:44 [PATCH v2 bpf-next 0/4] Support associating BPF programs with struct_ops Amery Hung
2025-10-16 20:45 ` [PATCH v2 bpf-next 1/4] bpf: Allow verifier to fixup kernel module kfuncs Amery Hung
2025-10-16 20:45 ` [PATCH v2 bpf-next 2/4] bpf: Support associating BPF program with struct_ops Amery Hung
2025-10-16 23:51   ` Martin KaFai Lau
2025-10-16 23:58     ` Amery Hung
2025-10-17  0:19   ` Martin KaFai Lau [this message]
2025-10-17 16:38     ` Amery Hung
2025-10-17 16:49       ` Amery Hung
2025-10-17 14:18   ` kernel test robot
2025-10-17 16:03   ` kernel test robot
2025-10-17 17:05   ` kernel test robot
2025-10-16 20:45 ` [PATCH v2 bpf-next 3/4] libbpf: Add bpf_prog_assoc_struct_ops() API Amery Hung
2025-10-16 20:45 ` [PATCH v2 bpf-next 4/4] selftests/bpf: Test BPF_PROG_ASSOC_STRUCT_OPS command Amery Hung

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=285ba391-1d23-41be-8cc4-e2874fbcb1af@linux.dev \
    --to=martin.lau@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 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.