Page MenuHomeFreeBSD

D6720.diff
No OneTemporary

D6720.diff

Index: head/sys/dev/sfxge/sfxge.c
===================================================================
--- head/sys/dev/sfxge/sfxge.c
+++ head/sys/dev/sfxge/sfxge.c
@@ -34,6 +34,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_rss.h"
+
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bus.h>
@@ -58,6 +60,10 @@
#include <net/if_media.h>
#include <net/if_types.h>
+#ifdef RSS
+#include <net/rss_config.h>
+#endif
+
#include "common/efx.h"
#include "sfxge.h"
@@ -127,7 +133,15 @@
* - hardwire maximum RSS channels
* - administratively specified maximum RSS channels
*/
+#ifdef RSS
+ /*
+ * Avoid extra limitations so that the number of queues
+ * may be configured at administrator's will
+ */
+ evq_max = MIN(MAX(rss_getnumbuckets(), 1), EFX_MAXRSS);
+#else
evq_max = MIN(mp_ncpus, EFX_MAXRSS);
+#endif
if (sc->max_rss_channels > 0)
evq_max = MIN(evq_max, sc->max_rss_channels);
@@ -163,6 +177,14 @@
KASSERT(sc->evq_max <= evq_max,
("allocated more than maximum requested"));
+#ifdef RSS
+ if (sc->evq_max < rss_getnumbuckets())
+ device_printf(sc->dev, "The number of allocated queues (%u) "
+ "is less than the number of RSS buckets (%u); "
+ "performance degradation might be observed",
+ sc->evq_max, rss_getnumbuckets());
+#endif
+
/*
* NIC is kept initialized in the case of success to be able to
* initialize port to find out media types.

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 8:29 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30997948
Default Alt Text
D6720.diff (1 KB)

Event Timeline