From: Claudiu Manoil <claudiu.manoil@nxp.com>
To: "Wei Fang (OSS)" <wei.fang@oss.nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"olteanv@gmail.com" <olteanv@gmail.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>
Cc: Wei Fang <wei.fang@nxp.com>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v4 net-next 03/15] net: enetc: add link status message support to PF driver
Date: Fri, 11 Sep 2026 20:15:06 +0000 [thread overview]
Message-ID: <GV2PR04MB117404BFD5F8818898AE307EC96BE2@GV2PR04MB11740.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20260909100733.1139689-4-wei.fang@oss.nxp.com>
NXP Confidential
> -----Original Message-----
> From: Wei Fang (OSS) <wei.fang@oss.nxp.com>
> Sent: Wednesday, September 9, 2026 1:07 PM
[...]
> Subject: [PATCH v4 net-next 03/15] net: enetc: add link status message support
> to PF driver
>
> From: Wei Fang <wei.fang@nxp.com>
>
> Add a mechanism for VFs to learn the PF link state, using message class
> 0x80 (ENETC_MSG_CLASS_ID_LINK_STATUS) with three VSI-to-PSI commands:
>
> 1. ENETC_MSG_GET_CURRENT_LINK_STATUS: the VF queries the current PF link
> status synchronously. This is intended for DPDK-owned VFs and is not
> used by the Linux VF driver.
> 2. ENETC_MSG_REGISTER_LINK_CHANGE_NOTIFIER: the VF registers for link
> change notification. The PF then reports the current link status and
> notifies the VF on every later link change.
> 3. ENETC_MSG_UNREGISTER_LINK_CHANGE_NOTIFIER: the VF unregisters.
>
> The PSI-to-VSI notification is 16 bits wide: the upper 8 bits carry the
> class ID and the lower 8 bits the class code. Bit 0 of the class code
> indicates the link state (1 = down, 0 = up) and bit 1 indicates whether
> TX PAUSE is enabled on the PF. The TX PAUSE state is included so a VF
> can decide whether to enable congestion mode on its RX BD rings, which
> only works when the PF can actually send PAUSE frames.
>
> Notifications are sent through the ENETC_PSIMSGSR register. Since sending
> a notification may take a long time, as it polls the per-VF message
> status bits, the actual transmission is deferred to an ordered workqueue
> rather than running in the phylink link_up/link_down callbacks. The
> link_status_ms_mask tracks the VFs registered for notification and is
> cleared when SR-IOV is disabled.
>
> Export enetc_pf_notify_vf_link_up() and enetc_pf_notify_vf_link_down()
> for the PF phylink callbacks. Through this, VFs can perceive the link
> status and report it to upper layers such as the kernel network stack,
> containers and virtual machines.
>
> Currently only the ENETC v4 driver supports this feature; v1 does not.
> And the SR-IOV feature of ENETC v4 will be added by subsequent patches.
>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
next prev parent reply other threads:[~2026-09-11 20:15 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 10:07 [PATCH v4 net-next 00/15] net: enetc: SR-IOV improvements and ENETC v4 VF support wei.fang
2026-09-09 10:07 ` [PATCH v4 net-next 01/15] net: enetc: add trusted " 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 [this message]
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=GV2PR04MB117404BFD5F8818898AE307EC96BE2@GV2PR04MB11740.eurprd04.prod.outlook.com \
--to=claudiu.manoil@nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--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=wei.fang@oss.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