[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR11MB50132C6633A69AFFCD5B80C7963CA@PH0PR11MB5013.namprd11.prod.outlook.com>
Date: Sat, 22 Jul 2023 06:47:20 +0000
From: "Buvaneswaran, Sujai" <sujai.buvaneswaran@...el.com>
To: "Drewek, Wojciech" <wojciech.drewek@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "vladbu@...dia.com" <vladbu@...dia.com>,
"kuba@...nel.org" <kuba@...nel.org>, "simon.horman@...igine.com"
<simon.horman@...igine.com>, "dan.carpenter@...aro.org"
<dan.carpenter@...aro.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v6 06/12] ice: Implement basic
eswitch bridge setup
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Wojciech Drewek
> Sent: Wednesday, July 12, 2023 4:34 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: pmenzel@...gen.mpg.de; netdev@...r.kernel.org; vladbu@...dia.com;
> kuba@...nel.org; simon.horman@...igine.com; dan.carpenter@...aro.org
> Subject: [Intel-wired-lan] [PATCH iwl-next v6 06/12] ice: Implement basic
> eswitch bridge setup
>
> 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 to
> switchdev.
>
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@...el.com>
> ---
> v2: fix structure holes, wrapping improvements
> v4: fix potential Null pointer dereference in
> ice_eswitch_br_port_unlink
> v5: update ice_esw_br_port::vsi on VF reset
> ---
> drivers/net/ethernet/intel/ice/Makefile | 2 +-
> drivers/net/ethernet/intel/ice/ice.h | 4 +-
> drivers/net/ethernet/intel/ice/ice_eswitch.c | 26 +-
> .../net/ethernet/intel/ice/ice_eswitch_br.c | 384 ++++++++++++++++++
> .../net/ethernet/intel/ice/ice_eswitch_br.h | 42 ++
> drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
> drivers/net/ethernet/intel/ice/ice_repr.c | 2 +-
> drivers/net/ethernet/intel/ice/ice_repr.h | 3 +-
> 8 files changed, 456 insertions(+), 9 deletions(-) create mode 100644
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Powered by blists - more mailing lists