aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-09 11:34:58 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-10 00:19:28 +0000
commit49f9143d9a37a4646c9f4ddac53b97dde04e3fa3 (patch)
treea6f21ef3974046fda3a411cba42597aff2b2999f
parent0e56ccb5d86618994f884da21dfce692ad21e458 (diff)
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
-rw-r--r--sys/dev/ixgbe/if_ix.c16
1 files changed, 15 insertions, 1 deletions
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);