Subject: Re: [PATCH net-next v7 01/10] enic: verify firmware supports V2 SR-IOV at probe time

From: Breno Leitao <[email-masked]>
Date: Thu, 14 May 2026 02:13:42 -0700

On Wed, May 13, 2026 at 08:15:38AM -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.
> 
> The VIC_FEATURE_SRIOV enum value (4) matches the firmware ABI. A
> placeholder entry (VIC_FEATURE_PTP at position 3) is added to keep
> the enum in sync with firmware's feature numbering.

Should you do something like the following, then?

	enum vic_feature_t {
		VIC_FEATURE_VXLAN,
		VIC_FEATURE_RDMA,
		VIC_FEATURE_VXLAN_PATCH,
		/* slot 3 reserved for firmware VIC_FEATURE_PTP */
		VIC_FEATURE_SRIOV       = 4,
		VIC_FEATURE_MAX,
	};

> +
> +	if (enic->vf_type != ENIC_VF_TYPE_V2)
> +		return;
> +
> +	/* A successful command means firmware recognizes
> +	 * VIC_FEATURE_SRIOV; supported_versions is available
> +	 * for sub-feature versioning in the future.
> +	 */
> +	err = vnic_dev_get_supported_feature_ver(enic->vdev,
> +						 VIC_FEATURE_SRIOV,
> +						 &supported_versions,
> +						 &a1);

In this case supported_versions and a1 are written but never read, does the API
need some refactor ?