lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 18 Jul 2021 19:43:23 -0700 From: Florian Fainelli <f.fainelli@...il.com> To: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net> Cc: Andrew Lunn <andrew@...n.ch>, Vivien Didelot <vivien.didelot@...il.com>, Jiri Pirko <jiri@...nulli.us>, Ido Schimmel <idosch@...sch.org>, Tobias Waldekranz <tobias@...dekranz.com>, Roopa Prabhu <roopa@...dia.com>, Nikolay Aleksandrov <nikolay@...dia.com>, Stephen Hemminger <stephen@...workplumber.org>, bridge@...ts.linux-foundation.org, Grygorii Strashko <grygorii.strashko@...com>, Marek Behun <kabel@...ckhole.sk>, DENG Qingfang <dqfext@...il.com> Subject: Re: [PATCH v4 net-next 11/15] net: bridge: switchdev: allow the TX data plane forwarding to be offloaded On 7/18/2021 2:44 PM, Vladimir Oltean wrote: > From: Tobias Waldekranz <tobias@...dekranz.com> > > Allow switchdevs to forward frames from the CPU in accordance with the > bridge configuration in the same way as is done between bridge > ports. This means that the bridge will only send a single skb towards > one of the ports under the switchdev's control, and expects the driver > to deliver the packet to all eligible ports in its domain. > > Primarily this improves the performance of multicast flows with > multiple subscribers, as it allows the hardware to perform the frame > replication. > > The basic flow between the driver and the bridge is as follows: > > - When joining a bridge port, the switchdev driver calls > switchdev_bridge_port_offload() with tx_fwd_offload = true. > > - The bridge sends offloadable skbs to one of the ports under the > switchdev's control using skb->offload_fwd_mark = true. > > - The switchdev driver checks the skb->offload_fwd_mark field and lets > its FDB lookup select the destination port mask for this packet. > > v1->v2: > - convert br_input_skb_cb::fwd_hwdoms to a plain unsigned long > - introduce a static key "br_switchdev_fwd_offload_used" to minimize the > impact of the newly introduced feature on all the setups which don't > have hardware that can make use of it > - introduce a check for nbp->flags & BR_FWD_OFFLOAD to optimize cache > line access > - reorder nbp_switchdev_frame_mark_accel() and br_handle_vlan() in > __br_forward() > - do not strip VLAN on egress if forwarding offload on VLAN-aware bridge > is being used > - propagate errors from .ndo_dfwd_add_station() if not EOPNOTSUPP > > v2->v3: > - replace the solution based on .ndo_dfwd_add_station with a solution > based on switchdev_bridge_port_offload > - rename BR_FWD_OFFLOAD to BR_TX_FWD_OFFLOAD > v3->v4: rebase > > Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com> > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com> Reviewed-by: Florian Fainelli <f.fainelli@...il.com> -- Florian
Powered by blists - more mailing lists