From: wei.fang@oss.nxp.com
To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
xiaoning.wang@nxp.com, andrew@lunn.ch, olteanv@gmail.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk
Cc: wei.fang@nxp.com, imx@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v4 net-next 00/15] net: enetc: SR-IOV improvements and ENETC v4 VF support
Date: Wed, 9 Sep 2026 18:07:18 +0800 [thread overview]
Message-ID: <20260909100733.1139689-1-wei.fang@oss.nxp.com> (raw)
From: Wei Fang <wei.fang@nxp.com>
This series enhances SR-IOV support for ENETC v1 and adds VF support
for ENETC v4. For ENETC v1, the trusted VF management and per-VF
configuration query via ndo_get_vf_config() are added. For ENETC v4,
preliminary VF support is introduced for i.MX94 and i.MX95 platforms.
On the PF side, the series introduces trust level management and MAC
address assignment for VFs, and implements ndo_get_vf_config() so that
userspace tools such as 'ip link show' can query the current per-VF
configuration. The PSI-to-VSI messaging infrastructure is extended to
handle link status and link speed queries from VFs, enabling DPDK-owned
VFs to obtain accurate link information from the PF.
On the VF side, MAC address filtering is implemented via the VSI-to-PSI
mailbox, supporting both unicast/multicast hash filters and promiscuous
mode control. Since the ndo_set_rx_mode callback is invoked with BH
disabled and is incompatible with the mailbox polling path,
ndo_set_rx_mode_async is used instead. Link status notifications are also
supported: the VF registers with the PF and receives PSI-to-VSI messages
on every PF link transition, keeping the VF carrier state in sync without
polling.
VF Function Level Reset is handled explicitly to restore the PF-managed
MAC promiscuous policy after each reset, since the hardware default after
FLR enables promiscuous mode regardless of the policy set by the PF
driver.
Several preparatory refactors are included to share infrastructure
between the PF and VF drivers, such as moving msg_task and mac_filter
from struct enetc_pf into the common struct enetc_si.
---
v4:
1. Use the existing si->gen_lock instead of pf->msg_lock
2. Link status notification sending is now deferred to an ordered
workqueue, instead of sending inline under a mutex
3. enetc_pf_send_link_status_msg() with a retry loop (up to 200ms)
polling the MS bits, and a per-VF msg_fail_cnt that clears a VF's
link_status_ms_mask bit after 10 consecutive failures
4. Remove a stray blank line in enetc_sriov_configure
5. enetc_vf_set_mac_promisc() now takes separate promisc and flush_macs
booleans
6. Refactor enetc_vf_set_mac_hash_filter(), now it takes explicit uc/mc
presence, builds mac_filter_type/tbl_cnt incrementally, and no longer
reads ndev->flags directly
7. Restructure rx_mode logic into three helpers:
enetc_vf_enable_iff_promisc(), enetc_vf_disable_iff_promisc(),
enetc_vf_enable_iff_allmulti(), with detailed per-step error logging
8. Add a separate enetc4_ndev_ops for ENETC v4 VFs
9. Disable promisc and clears MAC filters on VF removal
10. enetc_phylink_connect() moved to after Tx/Rx resource allocation
11. Remove the ENETC_LINK_STATUS_NOTIFIER_REGISTERED flag
12. MR interrupt handler now explicitly writes VSIIDR_MR and reads
VSIMSGRR to ACK the PF
13. netif_carrier_off() and enetc_vf_enable_mr_int() are moved before
register_netdev()
14. Guard spoofchk reporting with is_enetc_rev1()
15. Refine commit messages
v3 link: https://lore.kernel.org/imx/20260831025441.635045-1-wei.fang@oss.nxp.com/
v2 link: https://lore.kernel.org/imx/20260610091844.3423693-1-wei.fang@oss.nxp.com/
v1 link: https://lore.kernel.org/imx/20260605065550.3038579-1-wei.fang@oss.nxp.com/
---
Claudiu Manoil (1):
net: enetc: add trusted VF support
Wei Fang (14):
net: enetc: move msg_task and msg_int_name to struct enetc_si
net: enetc: add link status message support to PF driver
net: enetc: add link speed message support to PF driver
net: enetc: use enetc_set_si_hw_addr() to set VF MAC address
net: enetc: relocate enetc_pf_set_vf_mac() for common PF support
net: enetc: add .ndo_set_vf_mac() to the enetc v4 driver
net: enetc: move mac_filter from struct enetc_pf to struct enetc_si
net: enetc: add MAC address filtering support for VFs of ENETC v4
net: enetc: simplify and rename PSIIER enable/disable helpers
net: enetc: restore VF MAC promiscuous mode after FLR for ENETC v4
net: enetc: add VF support for i.MX94 and i.MX95
net: enetc: implement ndo_set_rx_mode_async for ENETC v4 VF
net: enetc: add PSI-to-VSI link status notification support for VF
net: enetc: add ndo_get_vf_config() support
drivers/net/ethernet/freescale/enetc/Kconfig | 1 +
drivers/net/ethernet/freescale/enetc/enetc.c | 63 +-
drivers/net/ethernet/freescale/enetc/enetc.h | 11 +-
.../ethernet/freescale/enetc/enetc4_debugfs.c | 51 +-
.../net/ethernet/freescale/enetc/enetc4_hw.h | 1 +
.../net/ethernet/freescale/enetc/enetc4_pf.c | 85 ++-
.../ethernet/freescale/enetc/enetc_ethtool.c | 6 +
.../net/ethernet/freescale/enetc/enetc_hw.h | 26 +
.../ethernet/freescale/enetc/enetc_mailbox.h | 109 ++-
.../net/ethernet/freescale/enetc/enetc_msg.c | 643 ++++++++++++++++--
.../net/ethernet/freescale/enetc/enetc_pf.c | 64 +-
.../net/ethernet/freescale/enetc/enetc_pf.h | 21 +-
.../freescale/enetc/enetc_pf_common.c | 146 +++-
.../freescale/enetc/enetc_pf_common.h | 19 +
.../net/ethernet/freescale/enetc/enetc_vf.c | 449 +++++++++++-
15 files changed, 1568 insertions(+), 127 deletions(-)
--
2.34.1
next reply other threads:[~2026-09-09 10:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 10:07 wei.fang [this message]
2026-09-09 10:07 ` [PATCH v4 net-next 01/15] net: enetc: add trusted VF support wei.fang
2026-09-10 11:20 ` netdev-bot+sashiko
2026-09-11 2:29 ` Wei Fang
2026-09-09 10:07 ` [PATCH v4 net-next 02/15] net: enetc: move msg_task and msg_int_name to struct enetc_si wei.fang
2026-09-11 20:14 ` Claudiu Manoil
2026-09-09 10:07 ` [PATCH v4 net-next 03/15] net: enetc: add link status message support to PF driver wei.fang
2026-09-10 11:20 ` netdev-bot+sashiko
2026-09-11 5:55 ` Wei Fang
2026-09-11 20:15 ` Claudiu Manoil
2026-09-09 10:07 ` [PATCH v4 net-next 04/15] net: enetc: add link speed " wei.fang
2026-09-10 11:20 ` netdev-bot+sashiko
2026-09-11 2:56 ` Wei Fang
2026-09-11 20:16 ` Claudiu Manoil
2026-09-09 10:07 ` [PATCH v4 net-next 05/15] net: enetc: use enetc_set_si_hw_addr() to set VF MAC address wei.fang
2026-09-09 10:07 ` [PATCH v4 net-next 06/15] net: enetc: relocate enetc_pf_set_vf_mac() for common PF support wei.fang
2026-09-09 10:07 ` [PATCH v4 net-next 07/15] net: enetc: add .ndo_set_vf_mac() to the enetc v4 driver wei.fang
2026-09-10 10:37 ` sashiko-bot
2026-09-09 10:07 ` [PATCH v4 net-next 08/15] net: enetc: move mac_filter from struct enetc_pf to struct enetc_si wei.fang
2026-09-10 10:37 ` sashiko-bot
2026-09-09 10:07 ` [PATCH v4 net-next 09/15] net: enetc: add MAC address filtering support for VFs of ENETC v4 wei.fang
2026-09-10 11:21 ` netdev-bot+sashiko
2026-09-11 6:13 ` Wei Fang
2026-09-09 10:07 ` [PATCH v4 net-next 10/15] net: enetc: simplify and rename PSIIER enable/disable helpers wei.fang
2026-09-09 10:07 ` [PATCH v4 net-next 11/15] net: enetc: restore VF MAC promiscuous mode after FLR for ENETC v4 wei.fang
2026-09-10 11:21 ` netdev-bot+sashiko
2026-09-11 6:23 ` Wei Fang
2026-09-11 20:17 ` Claudiu Manoil
2026-09-09 10:07 ` [PATCH v4 net-next 12/15] net: enetc: add VF support for i.MX94 and i.MX95 wei.fang
2026-09-10 10:37 ` sashiko-bot
2026-09-11 7:31 ` Wei Fang (OSS)
2026-09-09 10:07 ` [PATCH v4 net-next 13/15] net: enetc: implement ndo_set_rx_mode_async for ENETC v4 VF wei.fang
2026-09-10 10:37 ` sashiko-bot
2026-09-11 8:02 ` Wei Fang (OSS)
2026-09-10 11:21 ` netdev-bot+sashiko
2026-09-11 7:17 ` Wei Fang
2026-09-09 10:07 ` [PATCH v4 net-next 14/15] net: enetc: add PSI-to-VSI link status notification support for VF wei.fang
2026-09-09 10:07 ` [PATCH v4 net-next 15/15] net: enetc: add ndo_get_vf_config() support wei.fang
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=20260909100733.1139689-1-wei.fang@oss.nxp.com \
--to=wei.fang@oss.nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.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