On Mon, Sep 21, 2020 at 11:11 AM Andrii Nakryiko
wrote:
>
> On Thu, Sep 17, 2020 at 12:14 PM Hao Luo wrote:
> >
> > I need to cast the pointer to "const void __percpu *" before passing
> > into per_cpu_ptr. I will update and resend.
>
> You can try just declaring it as __percpu in BPF_CALL_2 macr
Hi, Andrii,
Thanks for taking a look. Sorry for the late reply. Spent some time on
rebasing and fixing a build issue in my development environment that
started happening in v5.9.
On Mon, Sep 21, 2020 at 11:09 AM Andrii Nakryiko
wrote:
>
> On Wed, Sep 16, 2020 at 3:39 PM Hao Luo wrote:
> >
> > A
On Thu, Sep 17, 2020 at 12:14 PM Hao Luo wrote:
>
> I need to cast the pointer to "const void __percpu *" before passing
> into per_cpu_ptr. I will update and resend.
You can try just declaring it as __percpu in BPF_CALL_2 macro. That
might work, or not, depending on how exactly BPF_CALL macros a
On Wed, Sep 16, 2020 at 3:39 PM Hao Luo wrote:
>
> Add bpf_per_cpu_ptr() to help bpf programs access percpu vars.
> bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel
> except that it may return NULL. This happens when the cpu parameter is
> out of range. So the caller must che
I need to cast the pointer to "const void __percpu *" before passing
into per_cpu_ptr. I will update and resend.
On Wed, Sep 16, 2020 at 6:14 PM kernel test robot wrote:
>
> Hi Hao,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on bpf-next/master]
>
> url
Hi Hao,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url:
https://github.com/0day-ci/linux/commits/Hao-Luo/bpf-BTF-support-for-ksyms/20200917-064052
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config:
Add bpf_per_cpu_ptr() to help bpf programs access percpu vars.
bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel
except that it may return NULL. This happens when the cpu parameter is
out of range. So the caller must check the returned value.
Acked-by: Andrii Nakryiko
Signed-
7 matches
Mail list logo