From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8B98C07E9B for ; Tue, 20 Jul 2021 11:24:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCFF161164 for ; Tue, 20 Jul 2021 11:24:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237597AbhGTKoC (ORCPT ); Tue, 20 Jul 2021 06:44:02 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:36259 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbhGTKn6 (ORCPT ); Tue, 20 Jul 2021 06:43:58 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id F394C58177F; Tue, 20 Jul 2021 07:24:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 20 Jul 2021 07:24:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Y7C6JE GT0y2KLvuEwR+z81yYhgYip/+jR2ruzBG6+28=; b=g7o+wqGRbCUg1AX7xvQyNz sI+51AF00UcGODm7HpXn5pa14Zl9BwgG9IaCAI6labY44Jmil0jR5XZgFh8g6Afw M48ikwQV78Cuh3Aj+uB0YG82TuWwYZHOPacajczhXi19KDyAZyukuiF7iLcG/uuE csYrNG/IkbXehROVzZeAiJvjBRQmsl4C48MlzXPRk1jNme7+IAtgJ6S2pkUb4qDx Sy2HVhakAgomhJY/4ZZ1z2Yq2s6G+bVbyrR2GFTh6QHmCTw+kp6fO3xBByx9PVM/ JGjvb8+ntBtnnPhtKTwSe2lu1uvSUthu+1A9ectDi35WNpnc0ykCpXXbsKUnEGsQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedvgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcuufgt hhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrthhtvg hrnheptdffkeekfeduffevgeeujeffjefhtefgueeugfevtdeiheduueeukefhudehleet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguoh hstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jul 2021 07:24:33 -0400 (EDT) Date: Tue, 20 Jul 2021 14:24:29 +0300 From: Ido Schimmel To: Vladimir Oltean Cc: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Andrew Lunn , Florian Fainelli , Vivien Didelot , Jiri Pirko , Tobias Waldekranz , Roopa Prabhu , Nikolay Aleksandrov , Stephen Hemminger , bridge@lists.linux-foundation.org, Grygorii Strashko , Marek Behun , DENG Qingfang , Vadym Kochan , Taras Chornyi , Ioana Ciornei , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Claudiu Manoil , Alexandre Belloni Subject: Re: [PATCH v4 net-next 00/15] Allow forwarding for the software bridge data path to be offloaded to capable devices Message-ID: References: <20210718214434.3938850-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210718214434.3938850-1-vladimir.oltean@nxp.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jul 19, 2021 at 12:44:19AM +0300, Vladimir Oltean wrote: > drivers/net/dsa/mv88e6xxx/chip.c | 78 +++- > .../ethernet/freescale/dpaa2/dpaa2-switch.c | 69 +++- > .../ethernet/marvell/prestera/prestera_main.c | 99 +++-- > .../marvell/prestera/prestera_switchdev.c | 42 ++- > .../marvell/prestera/prestera_switchdev.h | 7 +- > .../net/ethernet/mellanox/mlxsw/spectrum.c | 347 ++++++++++++------ > .../net/ethernet/mellanox/mlxsw/spectrum.h | 4 + > .../mellanox/mlxsw/spectrum_switchdev.c | 28 +- > .../microchip/sparx5/sparx5_switchdev.c | 48 ++- > drivers/net/ethernet/mscc/ocelot_net.c | 115 ++++-- > drivers/net/ethernet/rocker/rocker.h | 9 +- > drivers/net/ethernet/rocker/rocker_main.c | 34 +- > drivers/net/ethernet/rocker/rocker_ofdpa.c | 42 ++- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 34 +- > drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 14 +- > drivers/net/ethernet/ti/am65-cpsw-switchdev.h | 3 + > drivers/net/ethernet/ti/cpsw_new.c | 32 +- > drivers/net/ethernet/ti/cpsw_switchdev.c | 4 +- > drivers/net/ethernet/ti/cpsw_switchdev.h | 3 + > include/linux/if_bridge.h | 63 ++-- > include/net/dsa.h | 21 ++ > net/bridge/br_fdb.c | 1 - > net/bridge/br_forward.c | 9 + > net/bridge/br_if.c | 11 +- > net/bridge/br_mdb.c | 1 - > net/bridge/br_private.h | 84 ++++- > net/bridge/br_switchdev.c | 287 +++++++++++++-- > net/bridge/br_vlan.c | 11 +- > net/dsa/dsa2.c | 4 + > net/dsa/dsa_priv.h | 6 + > net/dsa/port.c | 192 +++++++--- > net/dsa/tag_dsa.c | 52 ++- > 32 files changed, 1406 insertions(+), 348 deletions(-) Too many things are squashed into this one patchset. It needs to be split. According to the title, the patchset is focused on improving performance, but there are no performance numbers that I could see and most of the patches deal with the replay stuff instead. The TX forwarding offload in mv88e6xxx is not related to the replay stuff and should be added in a separate patchset. This can be done by first adding the switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() APIs that only take care of setting / unsetting the hardware domain for the bridge port. Then, in a different patchset, these APIs can be augmented with a parameter for the replay stuff. It should be easier to review that way and require less unnecessary surgeries in drivers that do not require the added functionality. Thanks From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Y7C6JE GT0y2KLvuEwR+z81yYhgYip/+jR2ruzBG6+28=; b=g7o+wqGRbCUg1AX7xvQyNz sI+51AF00UcGODm7HpXn5pa14Zl9BwgG9IaCAI6labY44Jmil0jR5XZgFh8g6Afw M48ikwQV78Cuh3Aj+uB0YG82TuWwYZHOPacajczhXi19KDyAZyukuiF7iLcG/uuE csYrNG/IkbXehROVzZeAiJvjBRQmsl4C48MlzXPRk1jNme7+IAtgJ6S2pkUb4qDx Sy2HVhakAgomhJY/4ZZ1z2Yq2s6G+bVbyrR2GFTh6QHmCTw+kp6fO3xBByx9PVM/ JGjvb8+ntBtnnPhtKTwSe2lu1uvSUthu+1A9ectDi35WNpnc0ykCpXXbsKUnEGsQ == Date: Tue, 20 Jul 2021 14:24:29 +0300 From: Ido Schimmel Message-ID: References: <20210718214434.3938850-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210718214434.3938850-1-vladimir.oltean@nxp.com> Subject: Re: [Bridge] [PATCH v4 net-next 00/15] Allow forwarding for the software bridge data path to be offloaded to capable devices List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Oltean Cc: Andrew Lunn , Alexandre Belloni , Ioana Ciornei , Marek Behun , Florian Fainelli , "David S. Miller" , Steen Hegelund , bridge@lists.linux-foundation.org, Nikolay Aleksandrov , Roopa Prabhu , Jakub Kicinski , Vivien Didelot , Grygorii Strashko , Jiri Pirko , Vadym Kochan , DENG Qingfang , Claudiu Manoil , Lars Povlsen , netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Taras Chornyi , Tobias Waldekranz On Mon, Jul 19, 2021 at 12:44:19AM +0300, Vladimir Oltean wrote: > drivers/net/dsa/mv88e6xxx/chip.c | 78 +++- > .../ethernet/freescale/dpaa2/dpaa2-switch.c | 69 +++- > .../ethernet/marvell/prestera/prestera_main.c | 99 +++-- > .../marvell/prestera/prestera_switchdev.c | 42 ++- > .../marvell/prestera/prestera_switchdev.h | 7 +- > .../net/ethernet/mellanox/mlxsw/spectrum.c | 347 ++++++++++++------ > .../net/ethernet/mellanox/mlxsw/spectrum.h | 4 + > .../mellanox/mlxsw/spectrum_switchdev.c | 28 +- > .../microchip/sparx5/sparx5_switchdev.c | 48 ++- > drivers/net/ethernet/mscc/ocelot_net.c | 115 ++++-- > drivers/net/ethernet/rocker/rocker.h | 9 +- > drivers/net/ethernet/rocker/rocker_main.c | 34 +- > drivers/net/ethernet/rocker/rocker_ofdpa.c | 42 ++- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 34 +- > drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 14 +- > drivers/net/ethernet/ti/am65-cpsw-switchdev.h | 3 + > drivers/net/ethernet/ti/cpsw_new.c | 32 +- > drivers/net/ethernet/ti/cpsw_switchdev.c | 4 +- > drivers/net/ethernet/ti/cpsw_switchdev.h | 3 + > include/linux/if_bridge.h | 63 ++-- > include/net/dsa.h | 21 ++ > net/bridge/br_fdb.c | 1 - > net/bridge/br_forward.c | 9 + > net/bridge/br_if.c | 11 +- > net/bridge/br_mdb.c | 1 - > net/bridge/br_private.h | 84 ++++- > net/bridge/br_switchdev.c | 287 +++++++++++++-- > net/bridge/br_vlan.c | 11 +- > net/dsa/dsa2.c | 4 + > net/dsa/dsa_priv.h | 6 + > net/dsa/port.c | 192 +++++++--- > net/dsa/tag_dsa.c | 52 ++- > 32 files changed, 1406 insertions(+), 348 deletions(-) Too many things are squashed into this one patchset. It needs to be split. According to the title, the patchset is focused on improving performance, but there are no performance numbers that I could see and most of the patches deal with the replay stuff instead. The TX forwarding offload in mv88e6xxx is not related to the replay stuff and should be added in a separate patchset. This can be done by first adding the switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() APIs that only take care of setting / unsetting the hardware domain for the bridge port. Then, in a different patchset, these APIs can be augmented with a parameter for the replay stuff. It should be easier to review that way and require less unnecessary surgeries in drivers that do not require the added functionality. Thanks