From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, kuba@kernel.org, davem@davemloft.net,
bridge@lists.linux-foundation.org,
Ido Schimmel <idosch@idosch.org>
Subject: Re: [PATCH net-next 0/6] net: bridge: add flush filtering support
Date: Sun, 10 Apr 2022 23:43:20 +0300 [thread overview]
Message-ID: <b38a740f-fadb-bd2e-38d2-3683ddce69eb@blackwall.org> (raw)
In-Reply-To: <20220409105857.803667-1-razor@blackwall.org>
On 09/04/2022 13:58, Nikolay Aleksandrov wrote:
> Hi,
> This patch-set adds support to specify filtering conditions for a flush
> operation. Initially only FDB flush filtering is added, later MDB
> support will be added as well. Some user-space applications need a way
> to delete only a specific set of entries, e.g. mlag implementations need
> a way to flush only dynamic entries excluding externally learned ones
> or only externally learned ones without static entries etc. Also apps
> usually want to target only a specific vlan or port/vlan combination.
> The current 2 flush operations (per port and bridge-wide) are not
> extensible and cannot provide such filtering, so a new bridge af
> attribute is added (IFLA_BRIDGE_FLUSH) which contains the filtering
> information for each object type which has to be flushed.
> An example structure for fdbs:
> [ IFLA_BRIDGE_FLUSH ]
> `[ BRIDGE_FDB_FLUSH ]
> `[ FDB_FLUSH_NDM_STATE ]
> `[ FDB_FLUSH_NDM_FLAGS ]
>
[snip]
> Note that all flags have their negated version (static vs nostatic etc)
> and there are some tricky cases to handle like "static" which in flag
> terms means fdbs that have NUD_NOARP but *not* NUD_PERMANENT, so the
> mask matches on both but we need only NUD_NOARP to be set. That's
> because permanent entries have both set so we can't just match on
> NUD_NOARP. Also note that this flush operation doesn't treat permanent
> entries in a special way (fdb_delete vs fdb_delete_local), it will
> delete them regardless if any port is using them. We can extend the api
> with a flag to do that if needed in the future.
>
> Patches in this set:
> 1. adds the new IFLA_BRIDGE_FLUSH bridge af attribute
> 2. adds a basic structure to describe an fdb flush filter
> 3. adds fdb netlink flush call via BRIDGE_FDB_FLUSH attribute
> 4 - 6. add support for specifying various fdb fields to filter
>
> Patch-sets (in order):
> - Initial flush infra and fdb flush filtering (this set)
> - iproute2 support
> - selftests
>
> Future work:
> - mdb flush support
>
> Thanks,
> Nik
>
> Nikolay Aleksandrov (6):
> net: bridge: add a generic flush operation
> net: bridge: fdb: add support for fine-grained flushing
> net: bridge: fdb: add new nl attribute-based flush call
> net: bridge: fdb: add support for flush filtering based on ndm flags
> and state
> net: bridge: fdb: add support for flush filtering based on ifindex
> net: bridge: fdb: add support for flush filtering based on vlan id
>
> include/uapi/linux/if_bridge.h | 22 ++++++
> net/bridge/br_fdb.c | 128 +++++++++++++++++++++++++++++++--
> net/bridge/br_netlink.c | 59 ++++++++++++++-
> net/bridge/br_private.h | 12 +++-
> net/bridge/br_sysfs_br.c | 6 +-
> 5 files changed, 215 insertions(+), 12 deletions(-)
>
Just FYI I plan to send v2 tomorrow with a few cleanups suggested by Ido.
Please don't apply this one, I'll wait for more feedback and will resubmit.
Thanks,
Nik
next prev parent reply other threads:[~2022-04-10 20:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-09 10:58 [PATCH net-next 0/6] net: bridge: add flush filtering support Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 1/6] net: bridge: add a generic flush operation Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 2/6] net: bridge: fdb: add support for fine-grained flushing Nikolay Aleksandrov
2022-04-11 8:20 ` Ido Schimmel
2022-04-11 8:54 ` Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 3/6] net: bridge: fdb: add new nl attribute-based flush call Nikolay Aleksandrov
2022-04-11 8:33 ` Ido Schimmel
2022-04-11 9:01 ` Nikolay Aleksandrov
2022-04-11 8:41 ` Ido Schimmel
2022-04-11 9:05 ` Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 4/6] net: bridge: fdb: add support for flush filtering based on ndm flags and state Nikolay Aleksandrov
2022-04-11 8:47 ` Ido Schimmel
2022-04-11 9:07 ` Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 5/6] net: bridge: fdb: add support for flush filtering based on ifindex Nikolay Aleksandrov
2022-04-11 8:57 ` Ido Schimmel
2022-04-11 9:03 ` Nikolay Aleksandrov
2022-04-09 10:58 ` [PATCH net-next 6/6] net: bridge: fdb: add support for flush filtering based on vlan id Nikolay Aleksandrov
2022-04-09 12:36 ` [PATCH net-next 0/6] net: bridge: add flush filtering support Nikolay Aleksandrov
2022-04-10 20:43 ` Nikolay Aleksandrov [this message]
2022-04-11 7:47 ` Ido Schimmel
2022-04-11 8:53 ` Nikolay Aleksandrov
2022-04-11 8:54 ` Ido Schimmel
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=b38a740f-fadb-bd2e-38d2-3683ddce69eb@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=roopa@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).