Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp184899pxb; Wed, 3 Nov 2021 02:21:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5CvVrq/S8I3JznTwBLu+mA29yxXCs8lABO/X+lj0ICx/SHvxJsqrrIzzL6agOBkqsmtcr X-Received: by 2002:a5d:9753:: with SMTP id c19mr16288367ioo.136.1635931303413; Wed, 03 Nov 2021 02:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635931303; cv=none; d=google.com; s=arc-20160816; b=zk1QaUO2f2evkrKUtUwKUeb+92W3ESV4YuYiO3+V3lF117z59nvaoVBHzDLtVTwBXV 04t+7+o5LgtYjnPEnNnZXLkyISKIB4AB0QyeBrqBdXrb64pP05uDLxX1+JIqLFbDfYQF s2zieMG7nshSapLWx8Ax6ENTqY1K/13kqaOz2MeH9lQg/UfqmnpvqZkWbSCCQBhItmSo tswO3fRiXwUCywgwNl+GreIavgv/sLMa9XivkAKwUETcy9Eubo+IuT3uAy7XEdKeRC5B 3p9visPBTx5L3FRkN8zvsv4/fmeQZul7eB8pQZj98g8IllcQPZbrD/Ncstn7Xwt7OM2G xvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=z8+rehFA5T2ouzt63o8s+2ZIj6QVcxrSCkdGV4X0C2s=; b=Zir2ijY1Cb313V0boAATUrNrDdIyEyzwFieivTqXIwEnjWf4FOlBj3+JqdBw6gDsOr tlD9lC7grbLiZvNUgoBx+4gfFO0m6JVAHTMy/beGuz8/u+1z5vtmth5QchqUrQtNZDDI tOWqkgzw7wZ8bxAe1Any31f31gnCJMtYiaMzPLuF7pJA4Koxo0bWUdSJRJ4NcT2YmGb0 7goPQRJEv5+7jIfJBC1/FPiRhb4PlOcqjP0LbGSZt7zX3011x7kHkK2xSEPUDnbUHrRd CZ8QPifclocEyb2lRhMwm9RQtFeR84Izcp+4VRZjr8/YH3Kfo1CKp9wRTF8ezEBnyYIP 4UuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si2275532ilt.68.2021.11.03.02.21.32; Wed, 03 Nov 2021 02:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbhKCJXE (ORCPT + 99 others); Wed, 3 Nov 2021 05:23:04 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:42891 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhKCJXD (ORCPT ); Wed, 3 Nov 2021 05:23:03 -0400 Received: (Authenticated sender: clement.leger@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 2E443100008; Wed, 3 Nov 2021 09:20:23 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: "David S. Miller" , Jakub Kicinski , Rob Herring , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni Subject: [PATCH v2 0/6] Add FDMA support on ocelot switch driver Date: Wed, 3 Nov 2021 10:19:37 +0100 Message-Id: <20211103091943.3878621-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for the Frame DMA present on the VSC7514 switch. The FDMA is able to extract and inject packets on the various ethernet interfaces present on the switch. While adding FDMA support, bindings were switched from .txt to .yaml and MAC address reading from device-tree was added for testing purposes. Jumbo frame support was also added since it gives a large performance improvement with FDMA. ------------------ Changes in V2: - Read MAC for each port and not as switch base MAC address - Add missing static for some functions in ocelot_fdma.c - Split change_mtu from fdma commit - Add jumbo support for register based xmit - Move precomputed header into ocelot_port struct - Remove use of QUIRK_ENDIAN_LITTLE due to misconfiguration for tests - Remove fragmented packet sending which has not been tested Clément Léger (6): net: ocelot: add support to get port mac from device-tree dt-bindings: net: convert mscc,vsc7514-switch bindings to yaml net: ocelot: pre-compute injection frame header content net: ocelot: add support for ndo_change_mtu net: ocelot: add FDMA support net: ocelot: add jumbo frame support for FDMA .../bindings/net/mscc,vsc7514-switch.yaml | 184 +++++ .../devicetree/bindings/net/mscc-ocelot.txt | 83 -- drivers/net/ethernet/mscc/Makefile | 1 + drivers/net/ethernet/mscc/ocelot.c | 23 +- drivers/net/ethernet/mscc/ocelot.h | 3 + drivers/net/ethernet/mscc/ocelot_fdma.c | 754 ++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_fdma.h | 60 ++ drivers/net/ethernet/mscc/ocelot_net.c | 37 +- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 15 + include/soc/mscc/ocelot.h | 7 + 10 files changed, 1075 insertions(+), 92 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml delete mode 100644 Documentation/devicetree/bindings/net/mscc-ocelot.txt create mode 100644 drivers/net/ethernet/mscc/ocelot_fdma.c create mode 100644 drivers/net/ethernet/mscc/ocelot_fdma.h -- 2.33.0