From: Ido Schimmel <idosch@nvidia.com>
To: Johannes Nixdorf <jnixdorf-oss@avm.de>
Cc: Andrew Lunn <andrew@lunn.ch>, David Ahern <dsahern@gmail.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
bridge@lists.linux-foundation.org,
Roopa Prabhu <roopa@nvidia.com>,
Oleksij Rempel <linux@rempel-privat.de>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Bridge] [PATCH net-next v2 1/3] bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry
Date: Mon, 19 Jun 2023 17:50:47 +0300 [thread overview]
Message-ID: <ZJBrR/ZqZ4AX5Kat@shredder> (raw)
In-Reply-To: <20230619071444.14625-2-jnixdorf-oss@avm.de>
On Mon, Jun 19, 2023 at 09:14:41AM +0200, Johannes Nixdorf wrote:
> This allows the called fdb_create to detect that the entry was added by
> the user early in the process. This is in preparation to adding limits
> in fdb_create that should not apply to user created fdb entries.
Use imperative mood:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
>
> Signed-off-by: Johannes Nixdorf <jnixdorf-oss@avm.de>
>
Remove the blank line
> ---
>
> Changes since v1:
> - Added this change to ensure user added entries are not limited.
>
> net/bridge/br_fdb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index e69a872bfc1d..ac1dc8723b9c 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -1056,7 +1056,7 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> if (!(flags & NLM_F_CREATE))
> return -ENOENT;
>
> - fdb = fdb_create(br, source, addr, vid, 0);
> + fdb = fdb_create(br, source, addr, vid, BR_FDB_ADDED_BY_USER);
BIT(BR_FDB_ADDED_BY_USER)
> if (!fdb)
> return -ENOMEM;
>
> @@ -1069,6 +1069,8 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> WRITE_ONCE(fdb->dst, source);
> modified = true;
> }
> +
> + set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags);
> }
>
> if (fdb_to_nud(br, fdb) != state) {
> @@ -1100,8 +1102,6 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> if (fdb_handle_notify(fdb, notify))
> modified = true;
>
> - set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags);
> -
> fdb->used = jiffies;
> if (modified) {
> if (refresh)
> --
> 2.40.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Ido Schimmel <idosch@nvidia.com>
To: Johannes Nixdorf <jnixdorf-oss@avm.de>
Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org,
David Ahern <dsahern@gmail.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Oleksij Rempel <linux@rempel-privat.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Roopa Prabhu <roopa@nvidia.com>
Subject: Re: [PATCH net-next v2 1/3] bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry
Date: Mon, 19 Jun 2023 17:50:47 +0300 [thread overview]
Message-ID: <ZJBrR/ZqZ4AX5Kat@shredder> (raw)
In-Reply-To: <20230619071444.14625-2-jnixdorf-oss@avm.de>
On Mon, Jun 19, 2023 at 09:14:41AM +0200, Johannes Nixdorf wrote:
> This allows the called fdb_create to detect that the entry was added by
> the user early in the process. This is in preparation to adding limits
> in fdb_create that should not apply to user created fdb entries.
Use imperative mood:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
>
> Signed-off-by: Johannes Nixdorf <jnixdorf-oss@avm.de>
>
Remove the blank line
> ---
>
> Changes since v1:
> - Added this change to ensure user added entries are not limited.
>
> net/bridge/br_fdb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index e69a872bfc1d..ac1dc8723b9c 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -1056,7 +1056,7 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> if (!(flags & NLM_F_CREATE))
> return -ENOENT;
>
> - fdb = fdb_create(br, source, addr, vid, 0);
> + fdb = fdb_create(br, source, addr, vid, BR_FDB_ADDED_BY_USER);
BIT(BR_FDB_ADDED_BY_USER)
> if (!fdb)
> return -ENOMEM;
>
> @@ -1069,6 +1069,8 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> WRITE_ONCE(fdb->dst, source);
> modified = true;
> }
> +
> + set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags);
> }
>
> if (fdb_to_nud(br, fdb) != state) {
> @@ -1100,8 +1102,6 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
> if (fdb_handle_notify(fdb, notify))
> modified = true;
>
> - set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags);
> -
> fdb->used = jiffies;
> if (modified) {
> if (refresh)
> --
> 2.40.1
>
next prev parent reply other threads:[~2023-06-19 14:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 7:14 [Bridge] [PATCH net-next v2 0/3, iproute2-next 0/1] bridge: Add a limit on learned FDB entries Johannes Nixdorf
2023-06-19 7:14 ` Johannes Nixdorf
2023-06-19 7:14 ` [Bridge] [PATCH net-next v2 1/3] bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry Johannes Nixdorf
2023-06-19 7:14 ` Johannes Nixdorf
2023-06-19 14:50 ` Ido Schimmel [this message]
2023-06-19 14:50 ` Ido Schimmel
2023-06-19 7:14 ` [Bridge] [PATCH net-next v2 2/3] bridge: Add a limit on learned FDB entries Johannes Nixdorf
2023-06-19 7:14 ` Johannes Nixdorf
2023-06-19 15:34 ` [Bridge] " Ido Schimmel
2023-06-19 15:34 ` Ido Schimmel
2023-06-20 6:55 ` [Bridge] " Nikolay Aleksandrov
2023-06-20 6:55 ` Nikolay Aleksandrov
2023-06-20 13:35 ` [Bridge] " Johannes Nixdorf
2023-06-20 13:35 ` Johannes Nixdorf
2023-06-22 12:27 ` [Bridge] " Nikolay Aleksandrov
2023-06-22 12:27 ` Nikolay Aleksandrov
2023-06-22 12:39 ` [Bridge] " Nikolay Aleksandrov
2023-06-22 12:39 ` Nikolay Aleksandrov
2023-06-19 7:14 ` [Bridge] [PATCH net-next v2 3/3] net: bridge: Add a configurable default FDB learning limit Johannes Nixdorf
2023-06-19 7:14 ` Johannes Nixdorf
2023-06-20 6:56 ` [Bridge] " Nikolay Aleksandrov
2023-06-20 6:56 ` Nikolay Aleksandrov
2023-06-19 7:14 ` [Bridge] [PATCH iproute2-next 1/1] iplink: bridge: Add support for bridge FDB learning limits Johannes Nixdorf
2023-06-19 7:14 ` Johannes Nixdorf
2023-06-19 14:37 ` [Bridge] " Ido Schimmel
2023-06-19 14:37 ` 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=ZJBrR/ZqZ4AX5Kat@shredder \
--to=idosch@nvidia.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jnixdorf-oss@avm.de \
--cc=kuba@kernel.org \
--cc=linux@rempel-privat.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=vladimir.oltean@nxp.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 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.