Re: [PATCH v3 net-next 03/15] net: enetc: add link status message support to PF driver
From: Andrew Lunn
Date: Mon Aug 31 2026 - 08:04:14 EST
On Mon, Aug 31, 2026 at 10:54:29AM +0800, wei.fang@xxxxxxxxxxx wrote:
> From: Wei Fang <wei.fang@xxxxxxx>
>
> Add link status message support to the PF driver using three command IDs
> under message class 0x80 (ENETC_MSG_CLASS_ID_LINK_STATUS):
>
> 1. ENETC_MSG_GET_CURRENT_LINK_STATUS (cmd_id 0)
> The VF queries the current PF link status synchronously. This command is
> not used by the Linux VF driver but is intended for DPDK-owned VFs.
>
> 2. ENETC_MSG_REGISTER_LINK_CHANGE_NOTIFIER (cmd_id 1)
> The VF registers for link change notification. Upon registration, the PF
> immediately notifies the VF of the current link status via a PSI-to-VSI
> message, and continues to do so on every subsequent link state change.
>
> 3. ENETC_MSG_UNREGISTER_LINK_CHANGE_NOTIFIER (cmd_id 2)
> The VF unregisters from link change notification.
>
> For link status message, the PSI-to-VSI message is 16 bits wide: the
> upper 8 bits carry the message class ID, and the lower 8 bits carry the
> class code. Bit 0 of the class code indicates the link state (1 = link
> down, 0 = link up), and bit 1 indicates whether TX PAUSE is enabled on
> the PF (1 = enabled, 0 = disabled).
>
> The TX PAUSE state is included because VF RX BD rings support congestion
> mode, but whether the hardware can actually send PAUSE frames depends on
> whether TX PAUSE is enabled on the PF. By conveying the PF TX PAUSE state
> in the link status message, the VF can determine whether to enable
> congestion mode on its RX BD rings.
I see you have hit the 15 patch limit. Do you have a patch in the next
series implementing ethtool get and set pause?
Andrew