From patchwork Tue Aug 20 09:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Furong Xu <0x1207@gmail.com> X-Patchwork-Id: 13769758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90AA7C3DA4A for ; Tue, 20 Aug 2024 09:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0WVdsLsmxYwgymE6I6XPZ0VOeJxb8k0ES72cD/kLQY8=; b=B/52hfbqMNKCHQ59QRAfqLynT6 q9ZcEM39gEKPeRErs4ihohwtoGGsMXhP5GZ/PS7X6ui5A4gillHiJjaI4rVdEDFVQyPB8+Uwv07gp c+WeCvmfmlahCEy5SpLUbiIFik2Xf7KoE3JLwr7yIoG0ulEJ2kkkjSKFRN8L+q99ijVnxV7kqHCJr xEGgbSxDLqoD6fhZ+LSoCCelUYTZ2VVcH1uZWQoCy42FjptJIMY3yYAKQpzruXHrEUWXnAvIYv4Rs 2iJwmeNJVpy3YF63usc82qQ1SEXG2CUftitEptnxD2ITbzJSfnenujHLkq/OPT7DY28YLxiIx1Yi0 G5cMwyyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgLKx-00000004cLi-0IcF; Tue, 20 Aug 2024 09:39:35 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgLKF-00000004c9M-0EbP for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 09:38:52 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-201fae21398so30736885ad.1 for ; Tue, 20 Aug 2024 02:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724146730; x=1724751530; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0WVdsLsmxYwgymE6I6XPZ0VOeJxb8k0ES72cD/kLQY8=; b=icoL1U9tOADOOVVNfnWFcrzsC/WpirsLSd5mOHN/CsgLQLMnnYeCIUOOwqXmv1FBqD cs2voumi1OwxOq5I1NG+iSQTShAfeBsN1pA1A01Uu25UgIr31XIUdfAqR/nCzGDV97hY fmA1EPZUfYGLWua0WvcjnrlLmXX3eSUM+VBZc3wFnvhzcTl/XsOFjrERjumUSHFYafMR C7rgxxrKoFxXmEjK4kkZg+eZu+dEnUD7PzaDnwrwYyB8vnv0U9eu4WhZNrfTmaBKvYI7 2y2zMfHu47xt+gpx6xxxElbOdAhsDz2FfmepTOZ42XH5YbNEftz0sAlltMQ7btxUfSR6 vmnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724146730; x=1724751530; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0WVdsLsmxYwgymE6I6XPZ0VOeJxb8k0ES72cD/kLQY8=; b=KkBTqm3bBEoKoxUbkvzTyzeGbiI2EPtJyPK4nJI1M1Oqt5p71wB6u7JTmj4oGsdRbN xpJrANrcGs850vR9nsMpZmF1SQUfg5s56/t8ppZLx9DWk7dYTQAtvrOIIk4Q0t8A5p6o R+Fp+PJlVjM8o3Igo5QftfYhNgbDgehoEiQZkzfr3ehmtK3HDiEa/jaori0LJMlcf8aT gKW70mGaxjucXidoYWB73kzjBfdcDSwQNVCxgfqm1AFZuR1+uT5BV+LchMoBgc12p8k5 uLaXHpb1D+OL9xdc08jvPuunu8DFXxHr8iloep0TZnnIRxXFvq4BT22u1D8c6a7y+/Rs ZW1g== X-Forwarded-Encrypted: i=1; AJvYcCWIrfxu2/zyO2u+k9q1Ubj6YFjkSkGF5Lhl2vREDFVg/ZuZ+32byE7BcQKwC6bwEXymALVaLcLODBQUsK7cIHHkqEF5FKJt+2xYwweJffxv+UKWwkM= X-Gm-Message-State: AOJu0Yzx3nF/9a3zsbHM4EzMWNlf+gnO5tetbPEix0Qfe0ziQXCToAVw Y7KIDO+1U7hJz6wiO7koBM5uoKtpzcHQl+0jyiwe9CbIZVUIOC/f X-Google-Smtp-Source: AGHT+IHF9I9s+Fxk8vbHg0K2cB/yaA+g12OqwqsSEsnVkiEks2c7wO1DOmBk/9tSNMmJicERd3O47A== X-Received: by 2002:a17:90a:ff91:b0:2d3:d728:6ebb with SMTP id 98e67ed59e1d1-2d3dfc36bffmr12330038a91.5.1724146729285; Tue, 20 Aug 2024 02:38:49 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2d45246061dsm3230608a91.8.2024.08.20.02.38.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 02:38:48 -0700 (PDT) From: Furong Xu <0x1207@gmail.com> To: Serge Semin , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, Furong Xu <0x1207@gmail.com> Subject: [PATCH net-next v4 0/7] net: stmmac: FPE via ethtool + tc Date: Tue, 20 Aug 2024 17:38:28 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_023851_117990_804F052F X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move the Frame Preemption(FPE) over to the new standard API which uses ethtool-mm/tc-mqprio/tc-taprio. Changes in v4: 1. reorder FPE-related declarations and definitions into clean groups 2. move mm_lock to stmmac_fpe_cfg.lock 3. protect user configurations across NIC up/down 4. block stmmac_set_mm() when fpe_task is in progress to finish 5. convert to ethtool_dev_mm_supported() to check FPE capability in tc-mqprio/tc-taprio 6. silence FPE workqueue start/stop logs Changes in v3: 1. avoid races among ISR, workqueue, link update and register configuration. 2. update FPE verification retry logic, so it retries and fails as expected. Changes in v2: 1. refactor FPE verification processe 2. suspend/resume and kselftest-ethtool_mm, all test cases passed 3. handle TC:TXQ remapping for DWMAC CORE4+ Furong Xu (7): net: stmmac: move stmmac_fpe_cfg to stmmac_priv data net: stmmac: drop stmmac_fpe_handshake net: stmmac: refactor FPE verification process net: stmmac: configure FPE via ethtool-mm net: stmmac: support fp parameter of tc-mqprio net: stmmac: support fp parameter of tc-taprio net: stmmac: silence FPE kernel logs .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 10 +- drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 96 +++++++- drivers/net/ethernet/stmicro/stmmac/dwmac5.h | 11 +- .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 4 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 20 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 27 ++- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 110 +++++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 214 +++++++++--------- .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 124 +++++++--- include/linux/stmmac.h | 28 --- 10 files changed, 463 insertions(+), 181 deletions(-)