From patchwork Mon Feb 10 07:01:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Abdul Rahim, Faizal" X-Patchwork-Id: 13967375 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 7CE1EC02198 for ; Mon, 10 Feb 2025 07:04:51 +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: Content-Type:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xTO5rPPL4MAmynDb/5Gpj5uaEd4H56aiKrUatHDGtkY=; b=qE8QsarrC875N06x6nxwZTAR+i FbhmC+b3lkrqL0guz/+YGfWSj+DXBuXg7y0yyVpkGBKYxbpWWKRsrBrDcvAnKxuMqyiEHmThoqkuN AtPQvpuFt5Qh+fnCRJIvpXLFDL30ngw0fMy+e4Cuq+P2gsIz7V8VrNlfgZEC6J+1v31/MIpI+Q5ka 4YXrKiVM0HTZ4hB1n/tlfm5Zyqv2/GoFxcZ5ZBTH+ACEx9bPBPvEQgytFWRf7F+7TES5FC50nPyrZ 0Bqo9+gcIM5vdYEAiLclKX866hkn4UNlaYSYhC7PpKokXHEq/X0n08e3UxniwyOSx+C0LM27mvRg/ qVvtz6nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thNqS-0000000GSpE-1P1B; Mon, 10 Feb 2025 07:04:40 +0000 Received: from mgamail.intel.com ([192.198.163.19]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thNoE-0000000GSFk-3Ffi for linux-arm-kernel@lists.infradead.org; Mon, 10 Feb 2025 07:02:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739170943; x=1770706943; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=A6TYIK8aSCSb7ZF6jkLTpTG8icNieANxjH4vH8Z6hF4=; b=cn3jGVn98qIbTyQcgn7IR+TPfZTqodfK2GMc2jz18W9Jwjr9Pk/ycV6O Yz6LIrHpwDcaOs4po+Sjc5+BjqKGkL9yuF4+a5hS/wQFqe+YQQDxoKnp5 4ORAK7wJ+5G5aV3K1j+LclPE1EXtSIQM9OE+b3JQ8gJTnDGBuGat7Pzwe hpIfi1FiaooBTAHSOVMmuqLI445thsft1/OI47cSaAQoIq4WQx8jVUlGe eVdeoR9vZkFcJWkWrDSz30w7NH8yv/PF6UUip7YfO/R6uk1ynvYM5FEhh bhhz30ePgG18oH9piCurZsnncTyk22qFJR3LrTq32eyyWY8OON5A+wJh0 w==; X-CSE-ConnectionGUID: j6r4QPrlQ+K4nQZka0j0xA== X-CSE-MsgGUID: cIU+bFHgQ1eZY4XDYMScHg== X-IronPort-AV: E=McAfee;i="6700,10204,11340"; a="38937747" X-IronPort-AV: E=Sophos;i="6.13,273,1732608000"; d="scan'208";a="38937747" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2025 23:02:21 -0800 X-CSE-ConnectionGUID: n1Yl94JKQPCqLknRIXgRfw== X-CSE-MsgGUID: 0HQLcWpFQYmCJ2RkSR63Sg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,273,1732608000"; d="scan'208";a="112622438" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by fmviesa010.fm.intel.com with ESMTP; 09 Feb 2025 23:02:13 -0800 From: Faizal Rahim To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Simon Horman , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Russell King , Vladimir Oltean , Serge Semin , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , Andrew Halaney , Choong Yong Liang , Faizal Rahim , Kunihiko Hayashi , Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Subject: [PATCH iwl-next v4 0/9] igc: Add support for Frame Preemption feature in IGC Date: Mon, 10 Feb 2025 02:01:58 -0500 Message-Id: <20250210070207.2615418-1-faizal.abdul.rahim@linux.intel.com> 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-20250209_230222_825942_1B9AC522 X-CRM114-Status: GOOD ( 13.66 ) 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 Introduces support for the FPE feature in the IGC driver. The patches aligns with the upstream FPE API: https://patchwork.kernel.org/project/netdevbpf/cover/20230220122343.1156614-1-vladimir.oltean@nxp.com/ https://patchwork.kernel.org/project/netdevbpf/cover/20230119122705.73054-1-vladimir.oltean@nxp.com/ It builds upon earlier work: https://patchwork.kernel.org/project/netdevbpf/cover/20220520011538.1098888-1-vinicius.gomes@intel.com/ The patch series adds the following functionalities to the IGC driver: a) Configure FPE using `ethtool --set-mm`. b) Display FPE settings via `ethtool --show-mm`. c) View FPE statistics using `ethtool --include-statistics --show-mm'. e) Enable preemptible/express queue with `fp`: tc qdisc add ... root taprio \ fp E E P P Change Log: v3 -> v4: - Fix compilation warnings introduced by this patch series v2 -> v3: - Implement configure_tx() mmsv callback (Vladimir) - Use static_branch_inc() and static_branch_dec() (Vladimir) - Add adapter->fpe.mmsv.pmac_enabled as extra check (Vladimir) - Remove unnecessary error check in igc_fpe_init_tx_descriptor() (Vladimir) - Additional places to use FIELD_PREP() instead of manual bit manipulation (Vladimir) - IGC_TXD_POPTS_SMD_V and IGC_TXD_POPTS_SMD_R type change to enum (Vladimir) - Remove unnecessary netif_running() check in igc_fpe_xmit_frame (Vladimir) - Rate limit print in igc_fpe_send_mpacket (Vladimir) v1 -> v2: - Extract the stmmac verification logic into a common library (Vladimir) - igc to use common library for verification (Vladimir) - Fix syntax for kernel-doc to use "Return:" (Vladimir) - Use FIELD_GET instead of manual bit masking (Vladimir) - Don't assign 0 to statistics counter in igc_ethtool_get_mm_stats() (Vladimir) - Use pmac-enabled as a condition to allow MAC address value 0 (Vladimir) - Define macro register value in increasing value order (Vladimir) - Fix tx-min-frag-size handling for igc (Vladimir) - Handle link state changes with verification in igc (Vladimir) - Add static key for fast path code (Vladimir) - rx_min_frag_size get from constant (Vladimir) v1: https://patchwork.kernel.org/project/netdevbpf/cover/20241216064720.931522-1-faizal.abdul.rahim@linux.intel.com/ v2: https://patchwork.kernel.org/project/netdevbpf/cover/20250205100524.1138523-1-faizal.abdul.rahim@linux.intel.com/ v3: https://patchwork.kernel.org/project/netdevbpf/cover/20250207165649.2245320-1-faizal.abdul.rahim@linux.intel.com/ Faizal Rahim (8): igc: Rename xdp_get_tx_ring() for non-xdp usage igc: Optimize the TX packet buffer utilization igc: Set the RX packet buffer size for TSN mode igc: Add support for frame preemption verification igc: Add support to set tx-min-frag-size igc: Add support for preemptible traffic class in taprio igc: Add support to get MAC Merge data via ethtool igc: Add support to get frame preemption statistics via ethtool Vladimir Oltean (1): net: ethtool: mm: extract stmmac verification logic into common library drivers/net/ethernet/intel/igc/igc.h | 18 +- drivers/net/ethernet/intel/igc/igc_base.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 16 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 76 ++++++ drivers/net/ethernet/intel/igc/igc_main.c | 101 +++++++- drivers/net/ethernet/intel/igc/igc_regs.h | 16 ++ drivers/net/ethernet/intel/igc/igc_tsn.c | 219 ++++++++++++++++- drivers/net/ethernet/intel/igc/igc_tsn.h | 34 +++ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 16 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 41 +--- .../net/ethernet/stmicro/stmmac/stmmac_fpe.c | 174 +++----------- .../net/ethernet/stmicro/stmmac/stmmac_fpe.h | 5 - .../net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +- include/linux/ethtool.h | 61 +++++ net/ethtool/mm.c | 224 +++++++++++++++++- 15 files changed, 793 insertions(+), 217 deletions(-) --- 2.34.1