From: Florent Fourcot <florent.fourcot@wifirst.fr>
To: David Ahern <dsahern@kernel.org>,
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:58:45 +0200 [thread overview]
Message-ID: <d0f91700-0a0c-b464-4a25-2f0cc24987e6@wifirst.fr> (raw)
In-Reply-To: <d8a28a59-79ca-e1fc-7768-a91f8033ce0e@kernel.org>
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.
Best regards,
--
Florent Fourcot
--
*Ce message et toutes les pièces jointes (ci-après le "message") sont
établis à l’intention exclusive des destinataires désignés. Il contient des
informations confidentielles et pouvant être protégé par le secret
professionnel. Si vous recevez ce message par erreur, merci d'en avertir
immédiatement l'expéditeur et de détruire le message. Toute utilisation de
ce message non conforme à sa destination, toute diffusion ou toute
publication, totale ou partielle, est interdite, sauf autorisation expresse
de l'émetteur*
next prev parent reply other threads:[~2022-06-09 7:58 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 [this message]
2022-06-09 15:38 ` David Ahern
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=d0f91700-0a0c-b464-4a25-2f0cc24987e6@wifirst.fr \
--to=florent.fourcot@wifirst.fr \
--cc=daniel@iogearbox.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--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.