Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1974ybf; Wed, 26 Feb 2020 07:46:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzhjPL8nBa5lp98moKJEf/9L0DogtCntMaidMOBxEH4FmWbRbKG/uWOrcQ+XxVA8mcbRx9f X-Received: by 2002:a9d:600e:: with SMTP id h14mr3471607otj.113.1582732004502; Wed, 26 Feb 2020 07:46:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582732004; cv=none; d=google.com; s=arc-20160816; b=DtqXrpzdHr/ewyTKaCIZ0SEvIyqOVHOYqSJKDqTvvsZ9f35sWXc6rM5t4kEabAdPwh +++bpyTyuBh4Z5x0g22EUYjhxlIVAJobIrNtX29XkO3eYRP25hq2j5mOiF72m3TYqDOi viZWsKyPl9rA9wWN+9W+VgmOv2rNm5QugcFJ0duZk/hD9ipfNkCvA4LE0E9dOyCP0KEQ q/J0JyJXKhMgH5aA0Hji+l7ZLJw0IU5bXx1+/dwe6wHKwQDxQqxL0SOY3AcySDnJS6k7 uhAYPhPkMxMUHWtFqMXThjZpqouoGMh+yOymk9JGD/VDVjEEQaLBLCkM48i0GCHr9Ud5 YT0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=WkuuApb4ooD9Lvo0SBfgUdLJhUHw9W2INI90sT56+1g=; b=PaBH5jQ8h0Xw2UPI07PbOoUKjuBcaCcdTFJxOhWNemoxwLfBcJMyj0GLRtmTklP64u NzAcLADFrAhZn+m0UXOEEwI5bn4EblUKtCxhE2kAieq0dwnFnxUrvu2xywVskXr5SGTP jGtTtUPGI6uVa5si6jlgF8n2iU06dvll00MYMs4ejEHbp1eqRKkGvMf6RcJOYjxOdCf6 LS2e1CwGilhhYikxy0ZlcZB+ySCRjsSTE9eYqOisXbGhALaIZWZRl3u2LpxqXfu6hoTC 27Fvmvf59fx75pu2UQyJtzPcpdKCOqJ2ddAbIsK1vKennqYlvmKdEKSpmXrmkFlcrx7N nE+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=AWOuQPCv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si1532786otk.305.2020.02.26.07.46.31; Wed, 26 Feb 2020 07:46:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=AWOuQPCv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728436AbgBZPok (ORCPT + 99 others); Wed, 26 Feb 2020 10:44:40 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39662 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbgBZPoj (ORCPT ); Wed, 26 Feb 2020 10:44:39 -0500 Received: by mail-wm1-f67.google.com with SMTP id c84so3683035wme.4 for ; Wed, 26 Feb 2020 07:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WkuuApb4ooD9Lvo0SBfgUdLJhUHw9W2INI90sT56+1g=; b=AWOuQPCvIB4G8KyK5XFtllQXPmyHdiWK/acB2eEW6E/bSxZljeFMjk0M5p800sUHCv 8tFkEpBnT4687LZYC8B/ZmMXspDff9tlHEuwiTpkgctHi1arXvL4ROtICv74KbU4fTmr TFI70LIyos94jE+W6JgIqNi9Vpe/zQUlMz7JXiLizL4YIa7w5jNvoXtA6mmxriTytzdy zq8S22FRbxP5wKaSWheGO/cmTcQ/5ruZ5axJWevvnpr9i1gvm5sTVYMovoEay4vgf3nN PT5IwjzsZQ6v2R9u9q6S8EZopcOf2GoVjgeddC2xDkDygnOSZb3y6Q6AaofK/Glt8A1N 1ebQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WkuuApb4ooD9Lvo0SBfgUdLJhUHw9W2INI90sT56+1g=; b=pb3G1ikrCVe/KjGh81XFGpEo1FU9JTDdYF/Ht/12dji68XdyztPjXVsL7FGUtLkZvX k72bBUY/mxqWBmazxQhy9chQMPbU1wuRTxYktSAdTWOIXwocNsVUA11JsHnMWvRuYbbj eJ/udRxHRSC91b8WymjRZaLj2wj4COCBAkSJMsZ7D4+qpJdaLSr8mljhujAEes6MtQPk lgiNk2WJ/aNfZnaxt8nG0DRpmlaSjbcdZiTpb/Dy+Bz2cOMSEG6KjH172oVAT+Eioofu FuzoLgLO9vtxZCH7VxuxXgiKvTpcDDVyjr5Yo06ZaZFItMTQt/qL/Zo8pcMBWtWQ0Jmd eP9g== X-Gm-Message-State: APjAAAVkzSuYuYvLoN7lyV6cqZF+x6L+oTVZxh/HYltK9a51hw6k7aE2 OszVWk6xyrc6Y+EDvHS+yZjl7JIHW8Y= X-Received: by 2002:a1c:720a:: with SMTP id n10mr6176346wmc.103.1582731877236; Wed, 26 Feb 2020 07:44:37 -0800 (PST) Received: from localhost (ip-89-177-130-96.net.upcbroadband.cz. [89.177.130.96]) by smtp.gmail.com with ESMTPSA id w1sm3399610wmc.11.2020.02.26.07.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 07:44:36 -0800 (PST) Date: Wed, 26 Feb 2020 16:44:35 +0100 From: Jiri Pirko To: Vadym Kochan Cc: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "David S . Miller" , Oleksandr Mazur , Taras Chornyi , Serhiy Boiko , Andrii Savka , Volodymyr Mytnyk Subject: Re: [RFC net-next 0/3] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x) Message-ID: <20200226154435.GB26061@nanopsycho> References: <20200225163025.9430-1-vadym.kochan@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200225163025.9430-1-vadym.kochan@plvision.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Feb 25, 2020 at 05:30:52PM CET, vadym.kochan@plvision.eu wrote: >Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 >ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely >wireless SMB deployment. > >Prestera Switchdev is a firmware based driver which operates via PCI >bus. The driver is split into 2 modules: > > - prestera_sw.ko - main generic Switchdev Prestera ASIC related logic. > > - prestera_pci.ko - bus specific code which also implements firmware It is unusual to see ".ko" in patchset cover letter... > loading and low-level messaging protocol between > firmware and the switchdev driver. > >This driver implementation includes only L1 & basic L2 support. > >The core Prestera switching logic is implemented in prestera.c, there is >an intermediate hw layer between core logic and firmware. It is >implemented in prestera_hw.c, the purpose of it is to encapsulate hw >related logic, in future there is a plan to support more devices with >different HW related configurations. > >The firmware has to be loaded each time device is reset. The driver is >loading it from: > > /lib/firmware/marvell/prestera_fw_img.bin > >The firmware image version is located within internal header and consists >of 3 numbers - MAJOR.MINOR.PATCH. Additionally, driver has hard-coded >minimum supported firmware version which it can work with: > > MAJOR - reflects the support on ABI level between driver and loaded > firmware, this number should be the same for driver and > loaded firmware. > > MINOR - this is the minimal supported version between driver and the > firmware. > > PATCH - indicates only fixes, firmware ABI is not changed. > It is usual that the file name contains a version. I think it is good to make sure you are loading the version your driver is compatible with. There could be multiple versions for multiple kernels. >The firmware image will be submitted to the linux-firmware after the >driver is accepted. Hmm, not sure how this works, shouldn't it be submitted there first? > >The following Switchdev features are supported: You don't need to mention "Switchdev". It is just a offloading layer for bridge. Does not mean anything else now... > > - VLAN-aware bridge offloading > - VLAN-unaware bridge offloading > - FDB offloading (learning, ageing) > - Switchport configuration > >CPU RX/TX support will be provided in the next contribution. > >Vadym Kochan (3): > net: marvell: prestera: Add Switchdev driver for Prestera family ASIC > device 98DX325x (AC3x) > net: marvell: prestera: Add PCI interface support > dt-bindings: marvell,prestera: Add address mapping for Prestera > Switchdev PCIe driver > > .../bindings/net/marvell,prestera.txt | 13 + > drivers/net/ethernet/marvell/Kconfig | 1 + > drivers/net/ethernet/marvell/Makefile | 1 + > drivers/net/ethernet/marvell/prestera/Kconfig | 24 + > .../net/ethernet/marvell/prestera/Makefile | 5 + > .../net/ethernet/marvell/prestera/prestera.c | 1502 +++++++++++++++++ > .../net/ethernet/marvell/prestera/prestera.h | 244 +++ > .../marvell/prestera/prestera_drv_ver.h | 23 + > .../ethernet/marvell/prestera/prestera_hw.c | 1094 ++++++++++++ > .../ethernet/marvell/prestera/prestera_hw.h | 159 ++ > .../ethernet/marvell/prestera/prestera_pci.c | 840 +++++++++ > .../marvell/prestera/prestera_switchdev.c | 1217 +++++++++++++ > 12 files changed, 5123 insertions(+) > create mode 100644 drivers/net/ethernet/marvell/prestera/Kconfig > create mode 100644 drivers/net/ethernet/marvell/prestera/Makefile > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera.c > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera.h > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_drv_ver.h > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_hw.c > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_hw.h > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_pci.c > create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c > >-- >2.17.1 >