From f949e9f802dc72c4a7a86bcaced1d082e076ab4c Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Mon, 6 Jun 2016 09:07:26 +0000 Subject: [PATCH] sfxge(4): set up the indirection table using the kernel-driven RSS bucket ids Submitted by: Ivan Malov Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6722 --- sys/dev/sfxge/sfxge_rx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c index 1eb8dfd565a..590ac89fac8 100644 --- a/sys/dev/sfxge/sfxge_rx.c +++ b/sys/dev/sfxge/sfxge_rx.c @@ -1129,7 +1129,12 @@ sfxge_rx_start(struct sfxge_softc *sc) * Set up the scale table. Enable all hash types and hash insertion. */ for (index = 0; index < SFXGE_RX_SCALE_MAX; index++) +#ifdef RSS + sc->rx_indir_table[index] = + rss_get_indirection_to_bucket(index) % sc->rxq_count; +#else sc->rx_indir_table[index] = index % sc->rxq_count; +#endif if ((rc = efx_rx_scale_tbl_set(sc->enp, sc->rx_indir_table, SFXGE_RX_SCALE_MAX)) != 0) goto fail;