Re: Re: Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-24 Thread Slava Imameev
This reply was resent as the previous email had a missing In-Reply-To in the header. > > > On Mon, 2025-02-10 at 16:06 -0800, Andrii Nakryiko wrote: > > > > Tracking associated maps for a program is not necessary. As long as > > > > the last BPF program using the BPF map is unloaded, the kernel wi

Re: Re: Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-24 Thread Slava Imameev
> > > On Mon, 2025-02-10 at 16:06 -0800, Andrii Nakryiko wrote: > > > > Tracking associated maps for a program is not necessary. As long as > > > > the last BPF program using the BPF map is unloaded, the kernel will > > > > automatically free not-anymore-referenced BPF map. Note that > > > > bpf_ob

Re: Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-21 Thread Andrii Nakryiko
On Wed, Feb 12, 2025 at 2:31 PM Martin Kelly wrote: > > On Mon, 2025-02-10 at 16:06 -0800, Andrii Nakryiko wrote: > > > Tracking associated maps for a program is not necessary. As long as > > > the last BPF program using the BPF map is unloaded, the kernel will > > > automatically free not-anymore

Re: Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-12 Thread Martin Kelly
On Mon, 2025-02-10 at 16:06 -0800, Andrii Nakryiko wrote: > > Tracking associated maps for a program is not necessary. As long as > > the last BPF program using the BPF map is unloaded, the kernel will > > automatically free not-anymore-referenced BPF map. Note that > > bpf_object itself will keep

Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-10 Thread Andrii Nakryiko
On Fri, Feb 7, 2025 at 5:13 PM Martin Kelly wrote: > > On Wed, 2025-02-05 at 14:33 -0800, Andrii Nakryiko wrote: > > > > > > > > > > I see two ways forward for you. Either you can break apart your > > > > > BPF > > > > > object of ~100 BPF programs into more independent BPF objects > > > > > > > (

Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-07 Thread Martin Kelly
On Wed, 2025-02-05 at 14:33 -0800, Andrii Nakryiko wrote: > > > > > > > > I see two ways forward for you. Either you can break apart your > > > > BPF > > > > object of ~100 BPF programs into more independent BPF objects > > > > > > (seeing > > > > that programs can be independently loaded/unloaded