Re: [bpf-next 0/2] bpf: Add flag for batch operation

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

 



On Mon, Nov 11, 2024 at 6:15 AM Hou Tao <houtao@xxxxxxxxxxxxxxx> wrote:
>
>
>
> On 11/10/2024 7:29 PM, Florian Lehner wrote:
> > Introduce a new flag for batch operations that allows the deletion process
> > to continue even if certain keys are missing. This simplifies map flushing
> > by eliminating the requirement to maintain a separate list of keys and
> > makes sure maps can be flushed with a single batch delete operation.
>
> Is it expensive to close and recreate a new map instead ? If it is
> expensive, does it make more sense to add a new command to delete all
> elements in the map ? Because reusing the deletion logic will make each
> deletion involve an unnecessary lookup operation.

+1 to above questions.

In addition:

What is the use case ?
Are you trying to erase all elements from the map ?

If so you bpf_for_each_map_elem() and delete elems while iterating.

This extra flag looks too specific.

pw-bot: cr





[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