git: a044f8fff56b - stable/15 - ice: Use the absolute VF number when adding a VSI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Nov 2026 01:08:57 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=a044f8fff56bdbf2ebe90f4ca2bd4f2e9f2b239d
commit a044f8fff56bdbf2ebe90f4ca2bd4f2e9f2b239d
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-11-01 21:09:57 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-11-13 01:08:44 +0000
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: bc761988b724 ("ice: Add host SR-IOV support")
Sponsored by: BBOX.io
(cherry picked from commit cbaf3f1bc55524126182f63d09ed79ba8cf61cf2)
---
sys/dev/ice/ice_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c
index 8253f39f6d95..24685c896997 100644
--- a/sys/dev/ice/ice_lib.c
+++ b/sys/dev/ice/ice_lib.c
@@ -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: