git: 49f9143d9a37 - main - ixgbe: Enable PF RSS across queues with SR-IOV

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Mon, 10 Aug 2026 00:20:28 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=49f9143d9a37a4646c9f4ddac53b97dde04e3fa3

commit 49f9143d9a37a4646c9f4ddac53b97dde04e3fa3
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-09 11:34:58 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-10 00:19:28 +0000

    ixgbe: Enable PF RSS across queues with SR-IOV
    
    PSRTYPE is indexed by pool in VMDq+RSS mode, and its RQPL
    field selects the number of receive queues available within the pool.
    The PF occupies the last pool, but the driver programmed pool zero and
    left the PF RQPL value at zero.  As a result, all PF receive traffic
    was directed to its first queue while SR-IOV was enabled.
    
    Program PSRTYPE for the PF pool and encode its allocated receive queue
    count.
    
    MFC after:      2 weeks
---
 sys/dev/ixgbe/if_ix.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 2bdfc20df9bc..cd8acf6685a8 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -858,7 +858,21 @@ ixgbe_initialize_receive_units(if_ctx_t ctx)
 		    IXGBE_PSRTYPE_UDPHDR |
 		    IXGBE_PSRTYPE_IPV4HDR |
 		    IXGBE_PSRTYPE_IPV6HDR;
-		IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype);
+
+		/*
+		 * In VMDq+RSS mode PSRTYPE is per pool, and RQPL controls
+		 * how many receive queues RSS may select within that pool.
+		 * The PF occupies the last pool rather than pool zero.
+		 */
+#ifdef PCI_IOV
+		if (sc->iov_mode != IXGBE_NO_VM) {
+			if (sc->num_rx_queues > 3)
+				psrtype |= 2u << IXGBE_PSRTYPE_RQPL_SHIFT;
+			else if (sc->num_rx_queues > 1)
+				psrtype |= 1u << IXGBE_PSRTYPE_RQPL_SHIFT;
+		}
+#endif
+		IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(sc->pool), psrtype);
 	}
 
 	rxcsum = IXGBE_READ_REG(hw, IXGBE_RXCSUM);