Download raw body.
ice max vectors
On Tue, Feb 24, 2026 at 09:45:36PM +0100, Mark Kettenis wrote:
> > #define ICE_MAX_VECTORS 8 /* XXX this is pretty arbitrary */
> > Does anyone know a more realistic number for ice than 8 ?
>
> You could look at pcidump -v output on a few machines. MSI should
> report the number of vectors; for MSI-X the table size should be
> equivalent.
138:0:1: Intel E810-XXV SFP
0x0070: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
Enabled: yes; table size 1024 (BAR 3:0)
225:0:0: Intel E810-C QSFP
0x0070: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
Enabled: yes; table size 1024 (BAR 3:0)
Should I change it to 1024? Only sc_vectors could become larger,
but it is limited by ncpus.
sc->sc_nvectors = MIN(sc->sc_nmsix_max, ncpus);
sc->sc_nvectors = MIN(sc->sc_nvectors, ICE_MAX_VECTORS);
sc->sc_vectors = mallocarray(sizeof(*sc->sc_vectors), sc->sc_nvectors,
M_DEVBUF, M_WAITOK|M_CANFAIL|M_ZERO);
bluhm
Index: dev/pci/if_ice.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/dev/pci/if_ice.c,v
diff -u -p -r1.68 if_ice.c
--- dev/pci/if_ice.c 24 Feb 2026 20:14:29 -0000 1.68
+++ dev/pci/if_ice.c 24 Feb 2026 21:29:55 -0000
@@ -263,7 +263,7 @@ struct ice_intr_vector {
pci_intr_handle_t ih;
};
-#define ICE_MAX_VECTORS 8 /* XXX this is pretty arbitrary */
+#define ICE_MAX_VECTORS 1024
static struct rwlock ice_sff_lock = RWLOCK_INITIALIZER("icesff");
@@ -308,8 +308,8 @@ struct ice_softc {
/* isc_* fields inherited from FreeBSD iflib struct if_softc_ctx */
int isc_tx_nsegments;
- int isc_ntxd[8];
- int isc_nrxd[8];
+ int isc_ntxd[MIN(ICE_MAX_VECTORS, IF_MAX_VECTORS)];
+ int isc_nrxd[MIN(ICE_MAX_VECTORS, IF_MAX_VECTORS)];
int isc_tx_tso_segments_max;
int isc_tx_tso_size_max;
int isc_tx_tso_segsize_max;
@@ -339,7 +339,7 @@ struct ice_softc {
int rebuild_ticks;
- int sw_intr[ICE_MAX_VECTORS];
+ int sw_intr[MIN(ICE_MAX_VECTORS, IF_MAX_VECTORS) + 1];
};
static int ice_rxrinfo(struct ice_softc *, struct if_rxrinfo *);
ice max vectors