Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3511336pxb; Mon, 4 Apr 2022 19:21:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKJDGxcgktSqS8Ixj73zjfuaWXBpkclLzVA8KSZBUZe1FBFIGA4+XYQmNjfKA1MX6k7ExP X-Received: by 2002:a17:90b:3c04:b0:1ca:7772:1abe with SMTP id pb4-20020a17090b3c0400b001ca77721abemr1401050pjb.162.1649125290060; Mon, 04 Apr 2022 19:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649125290; cv=none; d=google.com; s=arc-20160816; b=hpCUhPwRg2fPVx4iPZ4CO7PhrIbr1XqWIHMd34Sep5kwcPof0j2esLUoSC1Xw9Znp9 P3aZUXnYi1qOMb3xOumNAt0be+O0ZXjncs5EgqjsKNy4lXLhpK8DwjGsboVK+IsK9L5c 7W5BT8+wf3RIgu1xAlGOGFxJgNGq85s/PzjSr95TphWhinsBX/179bPXzAk3SwD+Qmcc KY/ScYn7dfx4x236GSfHQVgLBTjfMp/GZRi1W0yXalVk8cf6zc2NXuW7rKEt/6sbDUhB Z4X/rlgHW451iGG6CpzsrxnxYbuzhsSt7llpKWlDk6ps/Y7vrhr+QC6Zu1H0TZsbRF6m /59g== 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:dkim-signature; bh=sH1GIBUTW7d1j5AXOubc257jkz/Y6Up0TjOT7o6fi2g=; b=VPZi0dJibPHrIAapAtWP7OTZ37PCqVBSdI4i4DcNhTLrDvOenK1JUY4k2GW2dV5Dqc 8A39bqYfoeL/E5IIcUdGQO+Hkz1dJSYp5Jc7kNW9kaFJKbjp342U2mFXrENYxSFXOZU0 Lbbr1rBZKo1JqDNrkVkbWpYhdUwevx1fJ+G5miPPT/fzoEP+eauLWMM36BdETjcfoehi KfFa8xflXnUwkPoJ6Gc9sp8OdjUWRtCUhLTaae7d/H5tZz/236bNQgKTHj7ZjoafFNak gTGApEpBHvVJqOVliqRldMuKsjLdJtanQOXJnkN9vAk+JpGWPcCxqmXq5CKfwXLIpixF JfRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=qznQAuP+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mz1-20020a17090b378100b001c7c83e5730si672031pjb.51.2022.04.04.19.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:21:30 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=qznQAuP+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 352D59BB85; Mon, 4 Apr 2022 17:43:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348564AbiDDNF6 (ORCPT + 99 others); Mon, 4 Apr 2022 09:05:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348531AbiDDNF4 (ORCPT ); Mon, 4 Apr 2022 09:05:56 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100C13E0DC; Mon, 4 Apr 2022 06:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1649077439; x=1680613439; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hrpKSkodB356RKyALCaZlNpvnQeQ0qk1xOGGXXvqqzY=; b=qznQAuP+wdE1+1zXl37nEfFsweLBIqhSQS9zAW5UpbMMG3dnQCSDY54e Fgp9Wu5t6xhlwXHO62dYNe5Y9feueEJ8SLtWu9jolh00e8ZisqWGzG/TP RftKl+GwrjtuVuMuGAZeC54Pe16WCXW96x3liftYpxpBMHmunZMF8wSVt N1A4ABnzcoLQYh/SDUHOlVBoVoZvr6Otx9arVxX8Obwl4jnxeQB6ikfAl 7/3E5hIgM1gv3xIL3Yfe+BoG3rNIstRc8gNQePilXM1DOZVYgMHPa7oay sDNtI40BSYZjgxzQlfDWX/vxnVnil1SUfS0HTSEak8VYkhkkCzc6sXN3t Q==; X-IronPort-AV: E=Sophos;i="5.90,234,1643698800"; d="scan'208";a="154281256" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Apr 2022 06:03:57 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 4 Apr 2022 06:03:57 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 4 Apr 2022 06:03:55 -0700 From: Horatiu Vultur To: , CC: , , , , , Horatiu Vultur Subject: [PATCH net-next v3 0/4] net: lan966x: Add support for FDMA Date: Mon, 4 Apr 2022 15:06:51 +0200 Message-ID: <20220404130655.4004204-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently when injecting or extracting a frame from CPU, the frame is given to the HW each word at a time. There is another way to inject/extract frames from CPU using FDMA(Frame Direct Memory Access). In this way the entire frame is given to the HW. This improves both RX and TX bitrate. v2->v3: - move skb_tx_timestamp before the IFH is inserted, because in case of PHY timestamping, the PHY should not see the IFH. - use lower/upper_32_bits() - reimplement the RX path in case of memory pressure. - use devm_request_irq instead of devm_request_threaded_irq - add various checks for return values. v1->v2: - fix typo in commit message in last patch - remove first patch as the changes are already there - make sure that there is space in skb to put the FCS - move skb_tx_timestamp closer to the handover of the frame to the HW Horatiu Vultur (4): net: lan966x: Add registers that are used for FDMA. net: lan966x: Expose functions that are needed by FDMA net: lan966x: Add FDMA functionality net: lan966x: Update FDMA to change MTU. .../net/ethernet/microchip/lan966x/Makefile | 2 +- .../ethernet/microchip/lan966x/lan966x_fdma.c | 783 ++++++++++++++++++ .../ethernet/microchip/lan966x/lan966x_main.c | 49 +- .../ethernet/microchip/lan966x/lan966x_main.h | 121 +++ .../ethernet/microchip/lan966x/lan966x_port.c | 3 + .../ethernet/microchip/lan966x/lan966x_regs.h | 106 +++ 6 files changed, 1052 insertions(+), 12 deletions(-) create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c -- 2.33.0