Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157025276
D6723.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
D6723.diff
View Options
Index: head/sys/dev/sfxge/sfxge_tx.c
===================================================================
--- head/sys/dev/sfxge/sfxge_tx.c
+++ head/sys/dev/sfxge/sfxge_tx.c
@@ -49,6 +49,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_rss.h"
+
#include <sys/param.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
@@ -68,6 +70,10 @@
#include <netinet/ip6.h>
#include <netinet/tcp.h>
+#ifdef RSS
+#include <net/rss_config.h>
+#endif
+
#include "common/efx.h"
#include "sfxge.h"
@@ -818,12 +824,24 @@
(CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO)) {
int index = 0;
+#ifdef RSS
+ uint32_t bucket_id;
+
+ /*
+ * Select a TX queue which matches the corresponding
+ * RX queue for the hash in order to assign both
+ * TX and RX parts of the flow to the same CPU
+ */
+ if (rss_m2bucket(m, &bucket_id) == 0)
+ index = bucket_id % (sc->txq_count - (SFXGE_TXQ_NTYPES - 1));
+#else
/* check if flowid is set */
if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
uint32_t hash = m->m_pkthdr.flowid;
index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX];
}
+#endif
#if SFXGE_TX_PARSE_EARLY
if (m->m_pkthdr.csum_flags & CSUM_TSO)
sfxge_parse_tx_packet(m);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 12:30 AM (1 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33277334
Default Alt Text
D6723.diff (1 KB)
Attached To
Mode
D6723: [6/6] sfxge(4): pick an RSS bucket for the packet enqueued and select TXQ accordingly
Attached
Detach File
Event Timeline
Log In to Comment