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>,
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>,
Russell King <rmk+kernel@armlinux.org.uk>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Serge Semin <fancer.lancer@gmail.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>,
Choong Yong Liang <yong.liang.choong@linux.intel.com>,
Chwee-Lin Choong <chwee.lin.choong@intel.com>,
Faizal Rahim <faizal.abdul.rahim@linux.intel.com>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
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 v8 00/11] igc: Add support for Frame Preemption feature in IGC
Date: Wed, 5 Mar 2025 08:00:15 -0500 [thread overview]
Message-ID: <20250305130026.642219-1-faizal.abdul.rahim@linux.intel.com> (raw)
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:
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/
Faizal Rahim (10):
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: 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: 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/igc/igc.h | 15 +-
drivers/net/ethernet/intel/igc/igc_base.h | 1 +
drivers/net/ethernet/intel/igc/igc_defines.h | 15 +-
drivers/net/ethernet/intel/igc/igc_ethtool.c | 79 +++++
drivers/net/ethernet/intel/igc/igc_main.c | 66 +++-
drivers/net/ethernet/intel/igc/igc_regs.h | 16 +
drivers/net/ethernet/intel/igc/igc_tsn.c | 192 +++++++++++-
drivers/net/ethernet/intel/igc/igc_tsn.h | 54 ++++
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 | 281 +++++++++++++++++-
15 files changed, 819 insertions(+), 217 deletions(-)
--
2.34.1
next reply other threads:[~2025-03-05 13:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 13:00 Faizal Rahim [this message]
2025-03-05 13:00 ` [PATCH iwl-next v8 01/11] net: stmmac: move frag_size handling out of spin_lock Faizal Rahim
2025-03-05 22:30 ` Vladimir Oltean
2025-03-06 2:09 ` Furong Xu
2025-03-05 13:00 ` [PATCH iwl-next v8 02/11] net: ethtool: mm: extract stmmac verification logic into common library Faizal Rahim
2025-03-05 13:00 ` [PATCH iwl-next v8 03/11] net: ethtool: mm: reset verification status when link is down Faizal Rahim
2025-03-05 22:45 ` Vladimir Oltean
2025-03-05 13:00 ` [PATCH iwl-next v8 04/11] igc: rename xdp_get_tx_ring() for non-xdp usage Faizal Rahim
2025-03-05 13:00 ` [PATCH iwl-next v8 05/11] igc: optimize the TX packet buffer utilization Faizal Rahim
2025-03-05 22:46 ` Vladimir Oltean
2025-03-05 13:00 ` [PATCH iwl-next v8 06/11] igc: set the RX packet buffer size for TSN mode Faizal Rahim
2025-03-05 22:58 ` Vladimir Oltean
2025-03-05 13:00 ` [PATCH iwl-next v8 07/11] igc: add support for frame preemption verification Faizal Rahim
2025-03-06 0:28 ` Vladimir Oltean
2025-03-07 11:52 ` Abdul Rahim, Faizal
2025-03-05 13:00 ` [PATCH iwl-next v8 08/11] igc: add support to set tx-min-frag-size Faizal Rahim
2025-03-06 0:43 ` Vladimir Oltean
2025-03-07 11:26 ` Abdul Rahim, Faizal
2025-03-05 13:00 ` [PATCH iwl-next v8 09/11] igc: block setting preemptible traffic class in taprio Faizal Rahim
2025-03-05 13:00 ` [PATCH iwl-next v8 10/11] igc: add support to get MAC Merge data via ethtool Faizal Rahim
2025-03-05 13:00 ` [PATCH iwl-next v8 11/11] igc: add support to get frame preemption statistics " Faizal Rahim
2025-03-06 0:48 ` Vladimir Oltean
2025-03-07 3:20 ` Abdul Rahim, Faizal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250305130026.642219-1-faizal.abdul.rahim@linux.intel.com \
--to=faizal.abdul.rahim@linux.intel.com \
--cc=0x1207@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chwee.lin.choong@intel.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=gal@nvidia.com \
--cc=hawk@kernel.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesper.nilsson@axis.com \
--cc=john.fastabend@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=quic_jsuraj@quicinc.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaolei.wang@windriver.com \
--cc=yong.liang.choong@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).