Re: [PATCH net-next v11 02/12] enic: verify firmware supports V2 SR-IOV at probe time

From: Breno Leitao

Date: Mon Jul 06 2026 - 07:05:18 EST


On Fri, Jul 03, 2026 at 11:08:51AM -0700, Satish Kharat wrote:
> During PF probe, query the firmware get-supported-feature interface
> to verify that the running firmware supports V2 SR-IOV. Firmware
> version 5.3(4.72) and later report VIC_FEATURE_SRIOV via
> CMD_GET_SUPP_FEATURE_VER. If the firmware does not support the
> feature, set vf_type to ENIC_VF_TYPE_NONE and log a warning so the
> admin knows a firmware upgrade is needed.
>
> V2 VFs are only ever enabled later through the sysfs .sriov_configure
> path (enic_sriov_configure()), which rejects ENIC_VF_TYPE_NONE before
> calling pci_enable_sriov(); there is no probe-time auto-enable, so
> firmware that lacks V2 support never exposes VFs.
>
> VIC_FEATURE_SRIOV is assigned the explicit value 4 to match the
> firmware ABI. Slot 3 (firmware's VIC_FEATURE_PTP) is reserved with
> a comment rather than a placeholder enum entry, since PTP is not
> used by the upstream driver.
>
> Suggested-by: Breno Leitao <leitao@xxxxxxxxxx>
> Signed-off-by: Satish Kharat <satishkh@xxxxxxxxx>

Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>