From: Vladimir Oltean <olteanv@gmail.com>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Ivan Vecera <ivecera@redhat.com>,
netdev@vger.kernel.org, Nikolay Aleksandrov <razor@blackwall.org>,
Roopa Prabhu <roopa@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
bridge@lists.linux-foundation.org,
Ido Schimmel <idosch@nvidia.com>,
"Hans J . Schultz" <netdev@kapio-technology.com>,
mlxsw@nvidia.com
Subject: Re: [PATCH net-next 11/15] mlxsw: spectrum_switchdev: Add locked bridge port support
Date: Tue, 8 Nov 2022 16:59:29 +0200 [thread overview]
Message-ID: <20221108145929.qmu2gvd5vvgvasyy@skbuf> (raw)
In-Reply-To: <f433543efdb610ef5a6aba9ac52b4783ff137a13.1667902754.git.petrm@nvidia.com>
On Tue, Nov 08, 2022 at 11:47:17AM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Add locked bridge port support by reacting to changes in the
> 'BR_PORT_LOCKED' flag. When set, enable security checks on the local
> port via the previously added SPFSR register.
>
> When security checks are enabled, an incoming packet will trigger an FDB
> lookup with the packet's source MAC and the FID it was classified to. If
> an FDB entry was not found or was found to be pointing to a different
> port, the packet will be dropped. Such packets increment the
> "discard_ingress_general" ethtool counter. For added visibility, user
> space can trap such packets to the CPU by enabling the "locked_port"
> trap. Example:
>
> # devlink trap set pci/0000:06:00.0 trap locked_port action trap
Got the answer I was looking for.
>
> Unlike other configurations done via bridge port flags (e.g., learning,
> flooding), security checks are enabled in the device on a per-port basis
> and not on a per-{port, VLAN} basis. As such, scenarios where user space
> can configure different locking settings for different VLANs configured
> on a port need to be vetoed. To that end, veto the following scenarios:
>
> 1. Locking is set on a bridge port that is a VLAN upper
>
> 2. Locking is set on a bridge port that has VLAN uppers
>
> 3. VLAN upper is configured on a locked bridge port
>
> Examples:
>
> # bridge link set dev swp1.10 locked on
> Error: mlxsw_spectrum: Locked flag cannot be set on a VLAN upper.
>
> # ip link add link swp1 name swp1.10 type vlan id 10
> # bridge link set dev swp1 locked on
> Error: mlxsw_spectrum: Locked flag cannot be set on a bridge port that has VLAN uppers.
>
> # bridge link set dev swp1 locked on
> # ip link add link swp1 name swp1.10 type vlan id 10
> Error: mlxsw_spectrum: VLAN uppers are not supported on a locked port.
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
> ---
Can't really figure out from the patch, sorry. Port security works with
LAG offload?
next prev parent reply other threads:[~2022-11-08 14:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 10:47 [PATCH net-next 00/15] mlxsw: Add 802.1X and MAB offload support Petr Machata
2022-11-08 10:47 ` [PATCH net-next 01/15] bridge: switchdev: Let device drivers determine FDB offload indication Petr Machata
2022-11-08 14:16 ` Vladimir Oltean
2022-11-08 18:01 ` Nikolay Aleksandrov
2022-11-08 10:47 ` [PATCH net-next 02/15] bridge: switchdev: Allow device drivers to install locked FDB entries Petr Machata
2022-11-08 14:21 ` Vladimir Oltean
2022-11-08 18:01 ` Nikolay Aleksandrov
2022-11-08 10:47 ` [PATCH net-next 03/15] bridge: switchdev: Reflect MAB bridge port flag to device drivers Petr Machata
2022-11-08 14:22 ` Vladimir Oltean
2022-11-08 18:02 ` Nikolay Aleksandrov
2022-11-08 10:47 ` [PATCH net-next 04/15] devlink: Add packet traps for 802.1X operation Petr Machata
2022-11-08 14:38 ` Vladimir Oltean
2022-11-08 10:47 ` [PATCH net-next 05/15] mlxsw: spectrum_trap: Register 802.1X packet traps with devlink Petr Machata
2022-11-08 10:47 ` [PATCH net-next 06/15] mlxsw: reg: Add Switch Port FDB Security Register Petr Machata
2022-11-08 10:47 ` [PATCH net-next 07/15] mlxsw: spectrum: Add an API to configure security checks Petr Machata
2022-11-08 10:47 ` [PATCH net-next 08/15] mlxsw: spectrum_switchdev: Prepare for locked FDB notifications Petr Machata
2022-11-08 10:47 ` [PATCH net-next 09/15] mlxsw: spectrum_switchdev: Add support " Petr Machata
2022-11-08 10:47 ` [PATCH net-next 10/15] mlxsw: spectrum_switchdev: Use extack in bridge port flag validation Petr Machata
2022-11-08 10:47 ` [PATCH net-next 11/15] mlxsw: spectrum_switchdev: Add locked bridge port support Petr Machata
2022-11-08 14:59 ` Vladimir Oltean [this message]
2022-11-09 8:26 ` Ido Schimmel
2022-11-09 9:21 ` Vladimir Oltean
2022-11-08 10:47 ` [PATCH net-next 12/15] selftests: devlink_lib: Split out helper Petr Machata
2022-11-08 10:47 ` [PATCH net-next 13/15] selftests: mlxsw: Add a test for EAPOL trap Petr Machata
2022-11-08 15:11 ` Vladimir Oltean
2022-11-08 10:47 ` [PATCH net-next 14/15] selftests: mlxsw: Add a test for locked port trap Petr Machata
2022-11-08 15:30 ` Vladimir Oltean
2022-11-08 10:47 ` [PATCH net-next 15/15] selftests: mlxsw: Add a test for invalid locked bridge port configurations Petr Machata
2022-11-08 14:42 ` Vladimir Oltean
2022-11-08 10:59 ` [PATCH net-next 00/15] mlxsw: Add 802.1X and MAB offload support Ido Schimmel
2022-11-08 15:31 ` Vladimir Oltean
2022-11-10 3:30 ` patchwork-bot+netdevbpf
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=20221108145929.qmu2gvd5vvgvasyy@skbuf \
--to=olteanv@gmail.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=ivecera@redhat.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@kapio-technology.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.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