igc: use newly exposed RSS hash key API rather than ad-hoc hashing
Differential Revision: https://reviews.freebsd.org/D53103 Reviewed by: markj Sponsored by: Netflix
This commit is contained in:
@@ -32,10 +32,9 @@
|
|||||||
#include <sys/sbuf.h>
|
#include <sys/sbuf.h>
|
||||||
#include <machine/_inttypes.h>
|
#include <machine/_inttypes.h>
|
||||||
|
|
||||||
#ifdef RSS
|
|
||||||
#include <net/rss_config.h>
|
#include <net/rss_config.h>
|
||||||
#include <netinet/in_rss.h>
|
#include <netinet/in_rss.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* PCI Device ID Table
|
* PCI Device ID Table
|
||||||
@@ -1940,12 +1939,8 @@ igc_initialize_rss_mapping(struct igc_softc *sc)
|
|||||||
*/
|
*/
|
||||||
mrqc = IGC_MRQC_ENABLE_RSS_4Q;
|
mrqc = IGC_MRQC_ENABLE_RSS_4Q;
|
||||||
|
|
||||||
#ifdef RSS
|
|
||||||
/* XXX ew typecasting */
|
/* XXX ew typecasting */
|
||||||
rss_getkey((uint8_t *) &rss_key);
|
rss_getkey((uint8_t *) &rss_key);
|
||||||
#else
|
|
||||||
arc4rand(&rss_key, sizeof(rss_key), 0);
|
|
||||||
#endif
|
|
||||||
for (i = 0; i < RSSKEYLEN; i++)
|
for (i = 0; i < RSSKEYLEN; i++)
|
||||||
IGC_WRITE_REG_ARRAY(hw, IGC_RSSRK(0), i, rss_key[i]);
|
IGC_WRITE_REG_ARRAY(hw, IGC_RSSRK(0), i, rss_key[i]);
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,8 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include "if_igc.h"
|
#include "if_igc.h"
|
||||||
|
|
||||||
#ifdef RSS
|
|
||||||
#include <net/rss_config.h>
|
#include <net/rss_config.h>
|
||||||
#include <netinet/in_rss.h>
|
#include <netinet/in_rss.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VERBOSE_DEBUG
|
#ifdef VERBOSE_DEBUG
|
||||||
#define DPRINTF device_printf
|
#define DPRINTF device_printf
|
||||||
|
|||||||
Reference in New Issue
Block a user