Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172462852
D59799.id187058.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59799.id187058.diff
View Options
diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c
--- a/sys/dev/mana/mana_en.c
+++ b/sys/dev/mana/mana_en.c
@@ -49,9 +49,7 @@
#include <net/if_var.h>
#include <net/if_types.h>
#include <net/if_vlan_var.h>
-#ifdef RSS
#include <net/rss_config.h>
-#endif
#include <netinet/in_systm.h>
#include <netinet/in.h>
@@ -71,22 +69,6 @@
extern unsigned int mana_rx_req_size;
extern unsigned int mana_rx_refill_threshold;
-static void
-mana_rss_key_fill(void *k, size_t size)
-{
- static bool rss_key_generated = false;
- static uint8_t rss_key[MANA_HASH_KEY_SIZE];
-
- KASSERT(size <= MANA_HASH_KEY_SIZE,
- ("Request more buytes than MANA RSS key can hold"));
-
- if (!rss_key_generated) {
- arc4random_buf(rss_key, MANA_HASH_KEY_SIZE);
- rss_key_generated = true;
- }
- memcpy(k, rss_key, size);
-}
-
static int
mana_ifmedia_change(if_t ifp __unused)
{
@@ -2958,7 +2940,9 @@
if_setmtu(ndev, apc->mtu);
if_setbaudrate(ndev, IF_Gbps(100));
- mana_rss_key_fill(apc->hashkey, MANA_HASH_KEY_SIZE);
+ _Static_assert(sizeof(apc->hashkey) == RSS_KEYSIZE,
+ "RSS key size mismatch");
+ rss_getkey(apc->hashkey);
err = mana_init_port(ndev);
if (err)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 19, 3:49 PM (8 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39214506
Default Alt Text
D59799.id187058.diff (1 KB)
Attached To
Mode
D59799: mana: Initialize ports with the common RSS key
Attached
Detach File
Event Timeline
Log In to Comment