Re: [External] Re: [PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread 梦龙董
On Tue, Mar 12, 2024 at 9:49 AM Alexei Starovoitov wrote: > > On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong > wrote: > > > > Refactor the struct modules_array to more general struct ptr_array, which > > is used to store the pointers. > > > > Meanwhiles, introduce the bpf_try_add_ptr(), which

Re: [PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread Alexei Starovoitov
On Mon, Mar 11, 2024 at 2:34 AM Menglong Dong wrote: > > Refactor the struct modules_array to more general struct ptr_array, which > is used to store the pointers. > > Meanwhiles, introduce the bpf_try_add_ptr(), which checks the existing of > the ptr before adding it to the array. > > Seems it

[PATCH bpf-next v2 2/9] bpf: refactor the modules_array to ptr_array

2024-03-11 Thread Menglong Dong
Refactor the struct modules_array to more general struct ptr_array, which is used to store the pointers. Meanwhiles, introduce the bpf_try_add_ptr(), which checks the existing of the ptr before adding it to the array. Seems it should be moved to another files in "lib", and I'm not sure where to