[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d8cd8c4f-6056-e696-d27b-2311e59f95e2@kernel.org>
Date: Thu, 9 Jun 2022 09:38:34 -0600
From: David Ahern <dsahern@...nel.org>
To: Florent Fourcot <florent.fourcot@...irst.fr>,
netdev@...r.kernel.org
Cc: Eric Dumazet <edumazet@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH v2 net-next] net: neigh: add netlink filtering based on
LLADDR for dump
On 6/9/22 1:58 AM, Florent Fourcot wrote:
> Hello David,
>
>>
>> Kernel side filtering has always been kept to simple, coarse grained
>> checks - like a device index or upper device index. It's a fine line
>> managing kernel cycles holding the rtnl vs cycles shipping the data to
>> userspace. e.g., a memcmp has a higher cost than a dev->index
>> comparison. I see the point about GET only - potential for many matches
>> and a lookup of the ll address is basically a filtered dump. Mixed
>> thoughts on whether this should be merged.
>
> Thanks for your feedback. As you know, this option will not slow down
> standard dump.
>
> I understand your concern, but the choice is between:
> * putting all entries on socket to send data to userspace. It means
> several memcpy (at least one for L3 address, one for L2 address) for
> each entries
> * Use proposed filter, with a single memcmp. memcpy is not called for
> filtered out entries.
>
> My solution looks faster, but I can send a v3 with some numbers if you
> think that it's important to get this patch merged.
>
sure post a v3.
Powered by blists - more mailing lists