All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Florent Fourcot <florent.fourcot@wifirst.fr>, netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH v2 net-next] net: neigh: add netlink filtering based on LLADDR for dump
Date: Thu, 9 Jun 2022 09:38:34 -0600	[thread overview]
Message-ID: <d8cd8c4f-6056-e696-d27b-2311e59f95e2@kernel.org> (raw)
In-Reply-To: <d0f91700-0a0c-b464-4a25-2f0cc24987e6@wifirst.fr>

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.

      reply	other threads:[~2022-06-09 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 20:56 [PATCH v2 net-next] net: neigh: add netlink filtering based on LLADDR for dump Florent Fourcot
2022-05-10  1:38 ` David Ahern
2022-05-10  6:54   ` Florent Fourcot
2022-05-24 20:49     ` Florent Fourcot
2022-05-25 15:19       ` David Ahern
2022-06-09  7:58         ` Florent Fourcot
2022-06-09 15:38           ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8cd8c4f-6056-e696-d27b-2311e59f95e2@kernel.org \
    --to=dsahern@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=florent.fourcot@wifirst.fr \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.