From patchwork Tue Aug 20 11:20:34 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: 13769980 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 8C9EDC531DF for ; Tue, 20 Aug 2024 11:22:19 +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=zbDMo5MbDihkl8ZyjdgPltbmTW4XyoUcFA+9KEyX+yo=; b=A7lVo67BaGSFmnaZwUdcuAi5zb Z5cRakWpvHTs6VS5ZjgKcVj0ju8k/HwSo4D0yRvual8yNLPvtDTUSUJHyC7CDuX0u2seHhw0kcJ9r FaHaO+rgJMd9i6vaOqRnnIypK2LwvKBU6sUf+TjXTTKM36+hwwjtkG1SIBB7qHAfEdPL2XC2mWR82 ycUesDMt5vAmI22y6nhMaGF+x8qmHDg8vISyhlxBluMSGkK8ScVPK75I00tNihbA2garijCFYhx1w Tes5lEMx7PbAtotMFH31/Xq3szvdOLrLwst/mg72HV0aprWY9l9a8dOf/2nlwVnUaMfRdwLPYcFQv A0gWkGqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgMwA-00000004zhA-2cmC; Tue, 20 Aug 2024 11:22:06 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgMvR-00000004zTD-45jU for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 11:21:23 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-20223b5c1c0so19068775ad.2 for ; Tue, 20 Aug 2024 04:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724152881; x=1724757681; 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=zbDMo5MbDihkl8ZyjdgPltbmTW4XyoUcFA+9KEyX+yo=; b=Fszi/n7jUR1yg10GSuUSrcc3w/YLcXWYyWBq+AYtnTp4MRjueWSKogLU+6+lbbu/4C iGxNCRQWxFmBweSYifWno578yX0A9VDFvvyMXbq0H91xs8scrqQvj5dq3y0/YpFqod/g RTwlclBPI8Z2qa7qfxvU2IOvJKWywwIXKS2OOlXzUOktlKnvBJEUD+uWxfUjGyD9zUvW A+chDl1DkM8ZIAZBoukpgH6aEkqc57mcm9XJPu0mF75SDSlVaGl0RbSimmNFqVv+1Y2Q WPEE19owh2mezVbN6o8FQUe/JG4V7Ps4lItw7+hcjEQ4zRtuE26Mon6uDQM+t0FqtzTj REdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724152881; x=1724757681; 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=zbDMo5MbDihkl8ZyjdgPltbmTW4XyoUcFA+9KEyX+yo=; b=cLR9OOt/MllF+yCrUcESaH0D+waQ4HDuTI+KerYR6DivOvhFbPZ44RsY9eq+HVC9Rt vVZRt37qyDihJ6nzoTnIf3+6YPfMd6wgMT5EUpwuZwSxEOnUBYIVlllNqpVHDnBdmGKR 6KZGnnlYUDIQKeinFrVNpE4nwe0rd5lQnAG47UgHGhq9e99vIVKLpvJ18zzqRjMG8HGO zKDZA2/TI+zndGZYLaGoIlqCG+dWlxqcOIWBftgukinvuYoyjIqdp3TnPEEJAYOwAc3J kwCLzolLwqEaeVTA+FDKoLC6gUVT1mslpfkBJ4PRmxnaKUZdsJDr88OlhWHNBZM52YYh XQuw== X-Forwarded-Encrypted: i=1; AJvYcCXbNwnWLglOmMAee/SECbuFZkN4zNNAQektgfZAy45uxVsxT32xx7KA+CPRyNV1pbQAqYiqM4QmzlHdxfViz5RS@lists.infradead.org X-Gm-Message-State: AOJu0YybcdQtmGB0snMLlxgyYc74bGGEYiv96VHdkAxZMYZTDBREoOnS Q5kTOa+0WfxzwMOR2yCh9JuN7yHcFsfOoefGkRj4le992uG+hqyU X-Google-Smtp-Source: AGHT+IGJyPKgTlfpaaVO2Q89NFOvgDCYB02I5tKaJmY5LED7+9l9qf1xzzx6B/7gPkW4vruDFFPBYg== X-Received: by 2002:a17:903:2303:b0:1fd:93d2:fba4 with SMTP id d9443c01a7336-20203f321efmr127662545ad.48.1724152880582; Tue, 20 Aug 2024 04:21:20 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-201f03756f6sm76465355ad.172.2024.08.20.04.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 04:21:19 -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 v5 0/7] net: stmmac: FPE via ethtool + tc Date: Tue, 20 Aug 2024 19:20:34 +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_042122_037828_B44A00CE X-CRM114-Status: GOOD ( 10.19 ) 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 v5: 1. fix typo in commit message 2. drop FPE capability check in 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 process 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 | 120 ++++++---- include/linux/stmmac.h | 28 --- 10 files changed, 455 insertions(+), 185 deletions(-)