sfxge(4): set up the indirection table using the kernel-driven RSS bucket ids

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6722
This commit is contained in:
Andrew Rybchenko 2016-06-06 09:07:26 +00:00
parent 35c0644e49
commit f949e9f802

View File

@ -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;