git: 4857be0b8100 - stable/14 - ixgbe: check negotiated API for VF queue query

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a767bdc.40531.7132ca95__30297.8789013409$1786149980$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=4857be0b810080452f6ef2ca4b80be06e174a4aa

commit 4857be0b810080452f6ef2ca4b80be06e174a4aa
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-07-28 11:20:08 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-08 00:42:29 +0000

    ixgbe: check negotiated API for VF queue query
    
    The GET_QUEUES handler switches on msg[0], which contains the mailbox
    command rather than the negotiated API version.  It therefore cannot
    reject API 1.0 or an unnegotiated VF as intended.
    
    Switch on the API version stored for the VF.
    
    (cherry picked from commit 8d1d32942b810d613be45ea78939872711803c3b)
---
 sys/dev/ixgbe/if_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c
index 8230464bd9bc..c822303a4067 100644
--- a/sys/dev/ixgbe/if_sriov.c
+++ b/sys/dev/ixgbe/if_sriov.c
@@ -553,7 +553,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf,
 	hw = &sc->hw;
 
 	/* GET_QUEUES is not supported on pre-1.1 APIs. */
-	switch (msg[0]) {
+	switch (vf->api_ver) {
 	case IXGBE_API_VER_1_0:
 	case IXGBE_API_VER_UNKNOWN:
 		ixgbe_send_vf_failure(sc, vf, msg[0]);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.