[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR11MB5013313C99C83E29B1E1B2E5963CA@PH0PR11MB5013.namprd11.prod.outlook.com>
Date: Sat, 22 Jul 2023 06:48:14 +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 07/12] ice: Switchdev FDB
events support
> -----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 07/12] ice: Switchdev FDB
> events support
>
> Listen for SWITCHDEV_FDB_{ADD|DEL}_TO_DEVICE events while in
> switchdev mode. Accept these events on both uplink and VF PR ports. Add
> HW rules in newly created workqueue. FDB entries are stored in rhashtable
> for lookup when removing the entry and in the list for cleanup purpose.
> Direction of the HW rule depends on the type of the ports on which the FDB
> event was received:
>
> ICE_ESWITCH_BR_UPLINK_PORT:
> TX rule that forwards the packet to the LAN (egress).
>
> ICE_ESWITCH_BR_VF_REPR_PORT:
> RX rule that forwards the packet to the VF associated with the port
> representor.
>
> In both cases the rule matches on the dst mac address.
> All the FDB entries are stored in the bridge structure.
> When the port is removed all the FDB entries associated with this port are
> removed as well. This is achieved thanks to the reference to the port that
> FDB entry holds.
>
> In the fwd rule we use only one lookup type (MAC address) but lkups_cnt
> variable is already introduced because we will have more lookups in the
> subsequent patches.
>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@...el.com>
> ---
> v2: declare-time initialization, code style nitpicks,
> use typeof instead of full type name in the container_of
> macro, use PTR_ERR_OR_ZERO in ice_eswitch_br_flow_create
> v5: move dst mac lookup assignment from
> ice_eswitch_br_{egress|ingress}_rule_setup to
> ice_eswitch_br_fwd_rule_create since this was duplicate
> v6: remove vsi->vf->repr check in ice_eswitch_br_port_deinit,
> it was moved to the previous patch. Do not pass br_port
> pointer to the ice_esw_br_fdb_work, retrieve br_port pointer
> from the netdev in ice_eswitch_br_fdb_event_work instead.
> ---
> .../net/ethernet/intel/ice/ice_eswitch_br.c | 433 ++++++++++++++++++
> .../net/ethernet/intel/ice/ice_eswitch_br.h | 45 ++
> 2 files changed, 478 insertions(+)
>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Powered by blists - more mailing lists