Page MenuHomeFreeBSD

D59794.id187053.diff
No OneTemporary

D59794.id187053.diff

diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c
--- a/sys/dev/axgbe/if_axgbe_pci.c
+++ b/sys/dev/axgbe/if_axgbe_pci.c
@@ -59,8 +59,8 @@
#include "opt_inet6.h"
#include "opt_rss.h"
-#ifdef RSS
#include <net/rss_config.h>
+#ifdef RSS
#include <netinet/in_rss.h>
#endif
@@ -723,13 +723,17 @@
{
int i;
- /* Get RSS key */
#ifdef RSS
int qid;
uint32_t rss_hash_config = 0;
+#endif
+ /* Get RSS key independently of software RSS queue placement. */
+ _Static_assert(sizeof(pdata->rss_key) == RSS_KEYSIZE,
+ "RSS key size mismatch");
rss_getkey((uint8_t *)&pdata->rss_key);
+#ifdef RSS
rss_hash_config = rss_gethashconfig();
if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4)
@@ -739,8 +743,6 @@
if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4)
XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);
#else
- arc4rand(&pdata->rss_key, ARRAY_SIZE(pdata->rss_key), 0);
-
XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, IP2TE, 1);
XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, TCP4TE, 1);
XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 19, 9:32 PM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39214309
Default Alt Text
D59794.id187053.diff (1 KB)

Event Timeline