ice: Use the absolute VF number when adding a VSI

The Add VSI AdminQ command requires an absolute hardware VF number, while
vsi->vf_num is relative to its PF. Add the PF's vf_base_id, as the VF Tx
queue context already does.

On an E810 PF with vf_base_id 128, relative VFs 0 and 1 were associated
with hardware VFs 0 and 1 instead of 128 and 129. Their receive queues
became blocked and both native iavf and DPDK receivers dropped traffic.
A PF whose VF base is zero hides the error.

Validated the VSI-to-function mapping and receive traffic on that PF,
including VF reset recovery and local PF/VF forwarding with VSI loopback
enabled.

Fixes:          bc761988b7 ("ice: Add host SR-IOV support")
MFC after:      2 weeks
Sponsored by:   BBOX.io
This commit is contained in:
Kevin Bowling committed 2026-11-01 14:47:18 -07:00
1 parent 9bd865a67c
commit cbaf3f1bc5
1 file changed
+2 -1
+2 -1
View File
@@ -775,7 +775,8 @@ ice_initialize_vsi(struct ice_vsi *vsi)
#ifdef PCI_IOV
case ICE_VSI_VF:
ctx.flags = ICE_AQ_VSI_TYPE_VF;
ctx.vf_num = vsi->vf_num;
/* Add VSI requires the absolute VF number. */
ctx.vf_num = hw->func_caps.vf_base_id + vsi->vf_num;
break;
#endif
default: