From: Vlad Buslov <vladbu@nvidia.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <netdev@vger.kernel.org>,
<wojciech.drewek@intel.com>, <jiri@resnulli.us>,
<ivecera@redhat.com>, <simon.horman@corigine.com>
Subject: Re: [PATCH net-next v2 00/12][pull request] ice: switchdev bridge offload
Date: Tue, 25 Jul 2023 22:32:18 +0300 [thread overview]
Message-ID: <87pm4fss31.fsf@nvidia.com> (raw)
In-Reply-To: <20230724161152.2177196-1-anthony.l.nguyen@intel.com>
On Mon 24 Jul 2023 at 09:11, Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
> Wojciech Drewek says:
>
> Linux bridge provides ability to learn MAC addresses and vlans
> detected on bridge's ports. As a result of this, FDB (forward data base)
> entries are created and they can be offloaded to the HW. By adding
> VF's port representors to the bridge together with the uplink netdev,
> we can learn VF's and link partner's MAC addresses. This is achieved
> by slow/exception-path, where packets that do not match any filters
> (FDB entries in this case) are send to the bridge ports.
>
> Driver keeps track of the netdevs added to the bridge
> by listening for NETDEV_CHANGEUPPER event. We distinguish two types
> of bridge ports: uplink port and VF's representor port. Linux
> bridge always learns src MAC of the packet on rx path. With the
> current slow-path implementation, it means that we will learn
> VF's MAC on port repr (when the VF transmits the packet) and
> link partner's MAC on uplink (when we receive it on uplink from LAN).
>
> The driver is notified about learning of the MAC/VLAN by
> SWITCHDEV_FDB_{ADD|DEL}_TO_DEVICE events. This is followed by creation
> of the HW filter. The direction of the filter is based on port
> type (uplink or VF repr). In case of the uplink, rule forwards
> the packets to the LAN (matching on link partner's MAC). When the
> notification is received on VF repr then the rule forwards the
> packets to the associated VF (matching on VF's MAC).
>
> This approach would not work on its own however. This is because if
> one of the directions is offloaded, then the bridge would not be able
> to learn the other one. If the egress rule is added (learned on uplink)
> then the response from the VF will be sent directly to the LAN.
> The packet will not got through slow-path, it would not be seen on
> VF's port repr. Because of that, the bridge would not learn VF's MAC.
>
> This is solved by introducing guard rule. It prevents forward rule from
> working until the opposite direction is offloaded.
>
> Aging is not fully supported yet, aging time is static for now. The
> follow up submissions will introduce counters that will allow us to
> keep track if the rule is actually being used or not.
>
> A few fixes/changes are needed for this feature to work with ice driver.
> These are introduced in first 5 patches.
>
> Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
In my previous reply I meant reviewed-by for the whole series, not for
the cover letter specifically. Sorry for not being more clear!
next prev parent reply other threads:[~2023-07-25 19:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 16:11 [PATCH net-next v2 00/12][pull request] ice: switchdev bridge offload Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 01/12] ice: Skip adv rules removal upon switchdev release Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 02/12] ice: Prohibit rx mode change in switchdev mode Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 03/12] ice: Don't tx before switchdev is fully configured Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 04/12] ice: Disable vlan pruning for uplink VSI Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 05/12] ice: Unset src prune on " Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 06/12] ice: Implement basic eswitch bridge setup Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 07/12] ice: Switchdev FDB events support Tony Nguyen
2023-07-25 7:40 ` Simon Horman
2023-07-24 16:11 ` [PATCH net-next v2 08/12] ice: Add guard rule when creating FDB in switchdev Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 09/12] ice: Add VLAN FDB support in switchdev mode Tony Nguyen
2023-07-25 7:38 ` Simon Horman
2023-07-24 16:11 ` [PATCH net-next v2 10/12] ice: implement bridge port vlan Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 11/12] ice: implement static version of ageing Tony Nguyen
2023-07-24 16:11 ` [PATCH net-next v2 12/12] ice: add tracepoints for the switchdev bridge Tony Nguyen
2023-07-25 7:40 ` Simon Horman
2023-07-25 19:32 ` Vlad Buslov [this message]
2023-07-26 4:22 ` [PATCH net-next v2 00/12][pull request] ice: switchdev bridge offload Jakub Kicinski
2023-07-26 21:01 ` Jacob Keller
2023-07-26 4:20 ` 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=87pm4fss31.fsf@nvidia.com \
--to=vladbu@nvidia.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=wojciech.drewek@intel.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.