[Intel-wired-lan] [PATCH iwl-next v9 14/14] igc: add support to get frame preemption statistics via ethtool

2025-03-09 Thread Faizal Rahim
Implemented "ethtool --include-statistics --show-mm" callback for IGC. Tested preemption scenario to check preemption statistics: 1) Trigger verification handshake on both boards: $ sudo ethtool --set-mm enp1s0 pmac-enabled on $ sudo ethtool --set-mm enp1s0 tx-enabled on $ sudo ethtool

[Intel-wired-lan] [PATCH iwl-next v9 06/14] igc: use FIELD_PREP and GENMASK for existing TX packet buffer size

2025-03-09 Thread Faizal Rahim
In preparation for an upcoming patch that will modify the TX buffer size in TSN mode, replace IGC_TXPBSIZE_TSN and IGC_TXPBSIZE_DEFAULT implementation with new macros that utilizes FIELD_PREP and GENMASK for clarity. The newly introduced macros follow the naming from the i226 SW User Manual for e

[Intel-wired-lan] [PATCH iwl-next v9 03/14] net: ethtool: mm: reset verification status when link is down

2025-03-09 Thread Faizal Rahim
When the link partner goes down, "ethtool --show-mm" still displays "Verification status: SUCCEEDED," reflecting a previous state that is no longer valid. Reset the verification status to ensure it reflects the current state. Signed-off-by: Faizal Rahim --- net/ethtool/mm.c | 4 1 file cha

[Intel-wired-lan] [PATCH iwl-next v9 12/14] igc: block setting preemptible traffic class in taprio

2025-03-09 Thread Faizal Rahim
Since preemptible tc implementation is not ready yet, block it from being set in taprio. The existing code already blocks it in mqprio. Signed-off-by: Faizal Rahim --- drivers/net/ethernet/intel/igc/igc_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/igc

[Intel-wired-lan] [PATCH iwl-next v9 05/14] igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT

2025-03-09 Thread Faizal Rahim
Rename RX and TX packet buffer size macros in preparation for an upcoming patch that will refactor buffer size handling using FIELD_PREP and GENMASK. Changes: - Rename I225_RXPBSIZE_DEFAULT to IGC_RXPBSIZE_EXP_BMC_DEFAULT. The EXP_BMC suffix explicitly indicates Express and BMC buffer default

[Intel-wired-lan] [PATCH iwl-next v9 02/14] net: ethtool: mm: extract stmmac verification logic into common library

2025-03-09 Thread Faizal Rahim
From: Vladimir Oltean It appears that stmmac is not the only hardware which requires a software-driven verification state machine for the MAC Merge layer. While on the one hand it's good to encourage hardware implementations, on the other hand it's quite difficult to tolerate multiple drivers im

[Intel-wired-lan] [PATCH iwl-next v9 10/14] igc: add support for frame preemption verification

2025-03-09 Thread Faizal Rahim
This patch implements the "ethtool --set-mm" callback to trigger the frame preemption verification handshake. Uses the MAC Merge Software Verification (mmsv) mechanism in ethtool to perform the verification handshake for igc. The structure fpe.mmsv is set by mmsv in ethtool and should remain read-

[Intel-wired-lan] [PATCH iwl-next v9 00/14] igc: Add support for Frame Preemption feature in IGC

2025-03-09 Thread Faizal Rahim
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.olt...@nxp.com/ https://patchwork.kernel.org/project/netdevbpf/cover/20230119122705.73054-1-vladimir.olt...

[Intel-wired-lan] [PATCH iwl-next v9 01/14] net: stmmac: move frag_size handling out of spin_lock

2025-03-09 Thread Faizal Rahim
The upcoming patch will extract verification logic into a new module, MMSV (MAC Merge Software Verification). MMSV will handle most FPE fields, except frag_size. It introduces its own lock (mmsv->lock), replacing fpe_cfg->lock. Since frag_size handling remains in the driver, the existing rtnl_lock

[Intel-wired-lan] [PATCH iwl-next v9 11/14] igc: add support to set tx-min-frag-size

2025-03-09 Thread Faizal Rahim
Add support for setting tx-min-frag-size via the set_mm callback in igc. If the requested value is unsupported, round it up to the smallest supported i226 size (64, 128, 192, 256) and send a netlink message to inform the user. Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Go

[Intel-wired-lan] [PATCH iwl-next v9 08/14] igc: use FIELD_PREP and GENMASK for existing RX packet buffer size

2025-03-09 Thread Faizal Rahim
Prepare for an upcoming patch that modifies the RX buffer size in TSN mode. Refactor IGC_RXPBSIZE_EXP_BMC_DEFAULT and IGC_RXPBS_CFG_TS_EN using FIELD_PREP and GENMASK to improve clarity and maintainability. Refactor both macros for consistency, even though the upcoming patch only use IGC_RXPBSIZE_E

[Intel-wired-lan] [PATCH iwl-next v9 04/14] igc: rename xdp_get_tx_ring() for non-xdp usage

2025-03-09 Thread Faizal Rahim
Renamed xdp_get_tx_ring() function to a more generic name for use in upcoming frame preemption patches. Signed-off-by: Faizal Rahim --- drivers/net/ethernet/intel/igc/igc.h | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 9 - 2 files changed, 5 insertions(+), 6 deletions(-) dif

[Intel-wired-lan] [PATCH iwl-next v9 13/14] igc: add support to get MAC Merge data via ethtool

2025-03-09 Thread Faizal Rahim
Implement "ethtool --show-mm" callback for IGC. Tested with command: $ ethtool --show-mm enp1s0. MAC Merge layer state for enp1s0: pMAC enabled: on TX enabled: on TX active: on TX minimum fragment size: 64 RX minimum fragment size: 60 Verify enabled: on Verify time: 128 Max verif

[Intel-wired-lan] [PATCH iwl-next v9 07/14] igc: optimize TX packet buffer utilization for TSN mode

2025-03-09 Thread Faizal Rahim
In preparation for upcoming frame preemption patches, optimize the TX packet buffer size. The total packet buffer size (RX + TX) is 64KB, with a maximum of 34KB for either RX or TX. Split the buffer evenly, allocating 32KB to each. For TX, assign 7KB to each of the four TX packet buffers (total 28

[Intel-wired-lan] [PATCH iwl-next v9 09/14] igc: set the RX packet buffer size for TSN mode

2025-03-09 Thread Faizal Rahim
In preparation for supporting frame preemption, when entering TSN mode, set the receive packet buffer to 15KB for the Express MAC, 15KB for the Preemptible MAC and 2KB for the BMC. References: I225/I226 SW User Manual, Section 4.7.9, Section 7.1.3.2, Section 8.3.1 The newly introduced macros foll

Re: [Intel-wired-lan] [PATCH iwl-next v9 03/14] net: ethtool: mm: reset verification status when link is down

2025-03-09 Thread Furong Xu
On Sun, 9 Mar 2025 06:46:37 -0400 Faizal Rahim wrote: > When the link partner goes down, "ethtool --show-mm" still displays > "Verification status: SUCCEEDED," reflecting a previous state that is > no longer valid. > > Reset the verification status to ensure it reflects the current state. > >

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: fix adapter NULL pointer dereference on reboot

2025-03-09 Thread Simon Horman
On Thu, Mar 06, 2025 at 04:39:56PM -0800, Emil Tantilov wrote: > Driver calls idpf_remove() from idpf_shutdown(), which can end up > calling idpf_remove() again when disabling SRIOV. > > echo 1 > /sys/class/net//device/sriov_numvfs > reboot > > BUG: kernel NULL pointer dereference, address: 0

Re: [Intel-wired-lan] [PATCH iwl-next v1] ice: refactor the Tx scheduler feature

2025-03-09 Thread Simon Horman
On Wed, Mar 05, 2025 at 02:30:30PM +0100, Szapar-Mudlaw, Martyna wrote: > > > On 3/4/2025 2:43 PM, Szapar-Mudlaw, Martyna wrote: > > > > > > On 3/3/2025 10:54 AM, Simon Horman wrote: > > > On Wed, Feb 26, 2025 at 12:33:56PM +0100, Mateusz Polchlopek wrote: > > > > Embed ice_get_tx_topo_user_sel