Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172499477
D59805.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
863 B
Referenced Files
None
Subscribers
None
D59805.id.diff
View Options
diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c
--- a/sys/dev/enetc/if_enetc.c
+++ b/sys/dev/enetc/if_enetc.c
@@ -44,6 +44,7 @@
#include <net/if_types.h>
#include <net/if_media.h>
#include <net/iflib.h>
+#include <net/rss_config.h>
#include <dev/enetc/enetc_hw.h>
#include <dev/enetc/enetc.h>
@@ -603,6 +604,7 @@
{
struct iflib_dma_info dma;
int error, i, buckets_num = 0;
+ uint8_t rss_key[RSS_KEYSIZE];
uint8_t *rss_table;
uint32_t reg;
@@ -614,8 +616,11 @@
if (buckets_num == 0)
return (ENOTSUP);
+ _Static_assert(ENETC_RSSHASH_KEY_SIZE == RSS_KEYSIZE,
+ "RSS key size mismatch");
+ rss_getkey(rss_key);
for (i = 0; i < ENETC_RSSHASH_KEY_SIZE / sizeof(uint32_t); i++) {
- arc4rand((uint8_t *)®, sizeof(reg), 0);
+ reg = le32dec(rss_key + i * sizeof(reg));
ENETC_PORT_WR4(sc, ENETC_PRSSK(i), reg);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 19, 9:25 PM (17 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39214691
Default Alt Text
D59805.id.diff (863 B)
Attached To
Mode
D59805: enetc: Use the common RSS key
Attached
Detach File
Event Timeline
Log In to Comment