[Intel-wired-lan] [PATCH iwl-next v4 06/13] ice: Implement basic eswitch bridge setup

Simon Horman simon.horman at corigine.com
Sun Jun 4 13:59:28 UTC 2023


On Wed, May 24, 2023 at 02:21:14PM +0200, Wojciech Drewek wrote:
> With this patch, ice driver is able to track if the port
> representors or uplink port were added to the linux bridge in
> switchdev mode. Listen for NETDEV_CHANGEUPPER events in order to
> detect this. ice_esw_br data structure reflects the linux bridge
> and stores all the ports of the bridge (ice_esw_br_port) in
> xarray, it's created when the first port is added to the bridge and
> freed once the last port is removed. Note that only one bridge is
> supported per eswitch.
> 
> Bridge port (ice_esw_br_port) can be either a VF port representor
> port or uplink port (ice_esw_br_port_type). In both cases bridge port
> holds a reference to the VSI, VF's VSI in case of the PR and uplink
> VSI in case of the uplink. VSI's index is used as an index to the
> xarray in which ports are stored.
> 
> Add a check which prevents configuring switchdev mode if uplink is
> already added to any bridge. This is needed because we need to listen
> for NETDEV_CHANGEUPPER events to record if the uplink was added to
> the bridge. Netdevice notifier is registered after eswitch mode
> is changed top switchdev.

Hi Wojciech,

Does the uplink here model both a physical port and the PF link between the
host and the NIC?  If so, then I think this is ok.

I mention this because I am more familiar with a model where these are
separated, in which case I think it would probably be an uplink representor
that is added to the bridge. And I want to make sure make sure that I
understand the model used here correctly.


More information about the Intel-wired-lan mailing list