| Message ID | 20250318030742.2567080-1-faizal.abdul.rahim@linux.intel.com |
|---|---|
| Headers | show
Return-Path: <intel-wired-lan-bounces@osuosl.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=veEPpjrD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZGxcd2L7xz1yG9 for <incoming@patchwork.ozlabs.org>; Tue, 18 Mar 2025 14:08:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6304D40D7E; Tue, 18 Mar 2025 03:08:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CMtF8EKd1BVz; Tue, 18 Mar 2025 03:08:29 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN> DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AE64040D7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1742267309; bh=tRcLCTL++L/4eGNhxg41aw5EKvHLycIKDu3NxnXrZYE=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=veEPpjrDInvshIG472U7x01vk6+gigxNoKwSTb8znRGYNijvE52aGHMg4RHF83hyQ 3snGkqkNUoc+wpGdrE1b1SXwHHuRyherirnbXl/pMPyvfRIniG0rTITPLHUY1gkeUQ dkTAv9b9W1YzWeDRwSo6jCdnfpJgE8l3EeA9mS/rk6xcqc9Dw8hCHOwoXnIKNOSFgN e8rVOcD5gSlaC+Wdc9Ob72ESiQ7gE8KhtpgtVIoMOy0t3qq2h1MN1Hyab3iaNqlsFl zIPKCaZDdwcQfJZd9MTFxRteb/cXJbm2ruB6kfbYhPtIck6bIanvsPKiD9O5A41ndq 1zlXbIaqJ+5AA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id AE64040D7B; Tue, 18 Mar 2025 03:08:29 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id D55A716E for <intel-wired-lan@lists.osuosl.org>; Tue, 18 Mar 2025 03:08:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B789B40642 for <intel-wired-lan@lists.osuosl.org>; Tue, 18 Mar 2025 03:08:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 0DeoaEFilvpz for <intel-wired-lan@lists.osuosl.org>; Tue, 18 Mar 2025 03:08:26 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=198.175.65.13; helo=mgamail.intel.com; envelope-from=faizal.abdul.rahim@linux.intel.com; receiver=<UNKNOWN> DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org E9E624059D DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E9E624059D Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by smtp2.osuosl.org (Postfix) with ESMTPS id E9E624059D for <intel-wired-lan@lists.osuosl.org>; Tue, 18 Mar 2025 03:08:25 +0000 (UTC) X-CSE-ConnectionGUID: gn9xHSOwSQmRLRidUnkJtQ== X-CSE-MsgGUID: aD4+Xwp9RAuza81S9OAaDg== X-IronPort-AV: E=McAfee;i="6700,10204,11376"; a="54382865" X-IronPort-AV: E=Sophos;i="6.14,255,1736841600"; d="scan'208";a="54382865" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2025 20:08:24 -0700 X-CSE-ConnectionGUID: cFxf1nJsQJmsFDpdqZETfw== X-CSE-MsgGUID: YwY2hTclSOCfwiFps5SVcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,255,1736841600"; d="scan'208";a="126313685" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by fmviesa003.fm.intel.com with ESMTP; 17 Mar 2025 20:08:16 -0700 From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> To: Tony Nguyen <anthony.l.nguyen@intel.com>, Przemek Kitszel <przemyslaw.kitszel@intel.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Simon Horman <horms@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com>, Russell King <linux@armlinux.org.uk>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Furong Xu <0x1207@gmail.com>, Choong Yong Liang <yong.liang.choong@linux.intel.com>, Russell King <rmk+kernel@armlinux.org.uk>, Hariprasad Kelam <hkelam@marvell.com>, Xiaolei Wang <xiaolei.wang@windriver.com>, Suraj Jaiswal <quic_jsuraj@quicinc.com>, Kory Maincent <kory.maincent@bootlin.com>, Gal Pressman <gal@nvidia.com>, Jesper Nilsson <jesper.nilsson@axis.com>, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-stm32@st-md-mailman.stormreply.com, Chwee-Lin Choong <chwee.lin.choong@intel.com>, Vinicius Costa Gomes <vinicius.gomes@intel.com>, Faizal Rahim <faizal.abdul.rahim@linux.intel.com>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Serge Semin <fancer.lancer@gmail.com> Date: Mon, 17 Mar 2025 23:07:28 -0400 Message-Id: <20250318030742.2567080-1-faizal.abdul.rahim@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742267306; x=1773803306; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=mZb4gGibpU2oh1wiiTc5PYRcKxE1KxFqGSNffOEkWPA=; b=gjuIwoIox1dCWBb43eeo6lffPWKQJWs3Pb3e9nc6jhaPVa1v6DErYEaX XVnY/RT17zkVHlAGhZ+D36ZeA+mGQbDgG3SIFCsD2b+bf+3Zl2M9Gxxml U/mnXQMiEsh5As0t3Pm4enUi2M+0muIFSeGTqQKmVbqGuaEu/PWdUK/Bs +bV6uGvTObD/VUBkelfYMNnb00CphHr3ByueXSVnMjArbwrpdv6F3PELw ijejZ0T+g5CGKPj4lehEKiEu807TBZJ+lqeQWuePObcgfWUtxcRGfOxhr G4II+StnYIymMJF095paFF4cHaRvI2RlLdZ1HHY9fZIN3Y2s4HzX5WDQE w==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gjuIwoIo Subject: [Intel-wired-lan] [PATCH iwl-next v10 00/14] igc: Add support for Frame Preemption feature in IGC X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development <intel-wired-lan.osuosl.org> List-Unsubscribe: <https://lists.osuosl.org/mailman/options/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe> List-Archive: <http://lists.osuosl.org/pipermail/intel-wired-lan/> List-Post: <mailto:intel-wired-lan@osuosl.org> List-Help: <mailto:intel-wired-lan-request@osuosl.org?subject=help> List-Subscribe: <https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe> Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" <intel-wired-lan-bounces@osuosl.org> |
| Series |
igc: Add support for Frame Preemption feature in IGC
|
expand
|
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) Block setting preemptible tc in taprio since it is not supported yet. Existing code already blocks it in mqprio. Tested: Enabled CONFIG_PROVE_LOCKING, CONFIG_DEBUG_ATOMIC_SLEEP, CONFIG_DMA_API_DEBUG, and CONFIG_KASAN 1) selftests 2) netdev down/up cycles 3) suspend/resume cycles 4) fpe verification No bugs or unusual dmesg logs were observed. Ran 1), 2) and 3) with and without the patch series, compared dmesg and selftest logs — no differences found. Change Log: v10: - Add Vladimir Reviewed-by for patch 2, 3, 6, 8, 10-14 - Add Fu Rong Reviewed-by for patch 3 - Fix compilation error in intel lkp-test, snippet of error: "aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function `igc_clean_tx_irq': drivers/net/ethernet/intel/igc/igc_main.c:3157:(.text+0xec44): undefined reference to `ethtool_mmsv_event_handle" which randomize .config options (CONFIG_IGC=y, disable CONFIG_ETHTOOL_NETLINK). config -> https://download.01.org/0day-ci/archive/20250314/202503141646.6yybVfAe-lkp@intel.com/config Fix at patch 2 and 10 by adding "depends on ETHTOOL_NETLINK" in stmmac and igc Kconfig. v8 -> v9: - Add Vladimir and Fu Rong Reviewed-by, patch 1 - Remove Faizal Co-developed-by for patch 2 - Remove code that reset verification state when link is down, patch 2 (Vladimir) - Refactor TX buffer and RX buffer magic constants with macro for each field. patch 5-9 (Vladimir) - s/Rest adapter/Adapter reset/ in commit description, patch 10 (Vladimir) - Replace igc_fpe_is_verify_or_response() and igc_fpe_lp_event_status() with igc_fpe_handle_mpacket(), patch 10 (Vladimir) - Comments on separate lines from code in igc_fpe_get_supported_frag_size(), patch 11 (Vladimir) - Remove mistakenly added igc_fpe_get_supported_frag_size(), patch 10 (Vladimir) - Remove max limit 256 of tx-min-size changes, patch 11 (Vladimir) v7 -> v8: - Reject SMD-V and SMD-R if the payload contains non-zero values (Vladimir, Chwee Lin) - Move resetting verification state when link is down to a new patch 3/11 (Vladimir) - Move frag_size related handling outside of spin_lock_irq_save(), patch 1/11 (Vladimir) - Renamed IGC_PRMEXPRCNT to IGC_PRMEXCPRCNT, to align with i226 SW User Manual, patch 11/11 (Chwee Lin) - Use IGC_PRMEXPRCNT_OOO_SMDC for frame smd errors instead of frame assembly errors, 11/11 (Chwee Lin) v6 -> v7: - Squash the cpu param to the prev line (Przemek Kitszel) - Use igc_ prefix for fpe_t (Przemek Kitszel) - Move new ops to different line in igc_ethtool_ops (Przemek Kitszel) - Documentation for igc_enable_empty_addr_recv (): rx -> Rx (Przemek Kitszel) - Documentation for igc_enable_empty_addr_recv (): s/IGC/the driver/ (Przemek Kitszel) - Change preferred style of init, from { }, to {} (Przemek Kitszel) - Remove inclusion of umbrella header <linux/kernel.h> in igc_tsn.c (Przemek Kitszel) - End enum with "," in igc_txd_popts_type (Przemek Kitszel) - Remove unnecessary braces in igc_fpe_is_verify_or_response() (Przemek Kitszel) v5 -> v6: - Added Tested-by: Furong Xu for patch 1/9 (Vladimir, Furong Xu) - Updated logic in ethtool_mmsv_link_state_handle() (Vladimir, Furong Xu) - Swap sequence of function call in stmmac_set_mm() (Furong Xu) - Log an error if igc_enable_empty_addr_recv() fails (Vladimir) - Move the patch ".. Block setting preemptible traffic .." before ".. Add support to get MAC Merge data .." (Vladimir) - Move mmsv function kernel-doc from .h to .c file (Vladimir) v4 -> v5: - Remove "igc: Add support for preemptible traffic class in taprio" patch (Vladimir) - Add a new patch "igc: Block setting preemptible traffic classes in taprio" (Vladimir) - Add kernel-doc for mmsv api (Vladimir) - olininfo_status to use host byte order (Simon) - status_error should host byte type (Simon) - Some code was misplaced in the wrong patch (Vladimir) - Mix of tabs and spaces in patch description (Vladimir) - Created igc_is_pmac_enabled() to reduce code repetition (Vladimir) 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/ v4: https://patchwork.kernel.org/project/netdevbpf/cover/20250210070207.2615418-1-faizal.abdul.rahim@linux.intel.com/ v5: https://patchwork.kernel.org/project/netdevbpf/cover/20250220025349.3007793-1-faizal.abdul.rahim@linux.intel.com/ v6: https://patchwork.kernel.org/project/netdevbpf/cover/20250227140158.2129988-1-faizal.abdul.rahim@linux.intel.com/ v7: https://patchwork.kernel.org/project/netdevbpf/cover/20250303102658.3580232-1-faizal.abdul.rahim@linux.intel.com/ v8: https://patchwork.kernel.org/project/netdevbpf/cover/20250305130026.642219-1-faizal.abdul.rahim@linux.intel.com/ v9: https://patchwork.kernel.org/project/netdevbpf/cover/20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com/ Faizal Rahim (13): net: stmmac: move frag_size handling out of spin_lock net: ethtool: mm: reset verification status when link is down igc: rename xdp_get_tx_ring() for non-xdp usage igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT igc: use FIELD_PREP and GENMASK for existing TX packet buffer size igc: optimize TX packet buffer utilization for TSN mode igc: use FIELD_PREP and GENMASK for existing RX packet buffer size 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: block setting 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/Kconfig | 1 + drivers/net/ethernet/intel/igc/igc.h | 15 +- drivers/net/ethernet/intel/igc/igc_base.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 55 +++- drivers/net/ethernet/intel/igc/igc_ethtool.c | 80 +++++ drivers/net/ethernet/intel/igc/igc_main.c | 69 ++++- drivers/net/ethernet/intel/igc/igc_regs.h | 16 + drivers/net/ethernet/intel/igc/igc_tsn.c | 207 ++++++++++++- drivers/net/ethernet/intel/igc/igc_tsn.h | 52 ++++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + 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 | 73 +++++ net/ethtool/mm.c | 279 +++++++++++++++++- 17 files changed, 872 insertions(+), 221 deletions(-) -- 2.34.1