Re: [PATCH bpf-next] bpf: Fix seq_show for BPF_MAP_TYPE_STRUCT_OPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 13, 2020 at 11:26 PM Martin KaFai Lau <kafai@xxxxxx> wrote:
>
> Instead of using bpf_struct_ops_map_lookup_elem() which is
> not implemented, bpf_struct_ops_map_seq_show_elem() should
> also use bpf_struct_ops_map_sys_lookup_elem() which does
> an inplace update to the value.  The change allocates
> a value to pass to bpf_struct_ops_map_sys_lookup_elem().
>
> [root@arch-fb-vm1 bpf]# cat /sys/fs/bpf/dctcp
> {{{1}},BPF_STRUCT_OPS_STATE_INUSE,{{00000000df93eebc,00000000df93eebc},0,2, ...
>
> Fixes: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS")
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Martin KaFai Lau <kafai@xxxxxx>

Applied. Thanks



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux