Re: bpf map collision

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

 



On Mon, Jun 17, 2024 at 3:22 AM Rao Shoaib <rao.shoaib@xxxxxxxxxx> wrote:
>
> Hi,
>
> Can someone please explain to me the magic that makes the map accessed
> in the program running in the kernel same as one created in the user
> program. What is the use of the map name? can there be collision if say
> two separate processes load the exact same program.

It's not magic. Map name is just a hint and there is no uniqueness
requirement (and also nothing in the kernel relies on map name).
Everything is working based on file descriptors (FDs). When a BPF map
is created, kernel returns FD to user space. User space uses that FD
to identify the BPF map.

>
> Thanks,
>
> Shoaib
>
>





[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