Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109878215
D40061.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
D40061.diff
View Options
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -55,6 +55,7 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
+#include "opt_rss.h"
#include <sys/param.h>
#include <sys/arb.h>
@@ -83,6 +84,7 @@
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
+#include <net/rss_config.h>
#include <net/vnet.h>
#define TCPSTATES /* for logging */
@@ -90,6 +92,7 @@
#include <netinet/in.h>
#include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h>
+#include <netinet/in_rss.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h> /* required for icmp_var.h */
@@ -99,6 +102,7 @@
#include <netinet/ip6.h>
#include <netinet/icmp6.h>
#include <netinet6/in6_pcb.h>
+#include <netinet6/in6_rss.h>
#include <netinet6/in6_var.h>
#include <netinet6/ip6_var.h>
#include <netinet6/nd6.h>
@@ -936,10 +940,35 @@
INP_LOCK_ASSERT(inp);
if ((inp->inp_flowtype == M_HASHTYPE_NONE) &&
- (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) &&
!SOLISTENING(inp->inp_socket)) {
- inp->inp_flowid = m->m_pkthdr.flowid;
- inp->inp_flowtype = M_HASHTYPE_GET(m);
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
+ inp->inp_flowid = m->m_pkthdr.flowid;
+ inp->inp_flowtype = M_HASHTYPE_GET(m);
+#ifdef RSS
+ } else {
+ /* assign flowid by software RSS hash */
+#ifdef INET6
+ if (isipv6) {
+ rss_proto_software_hash_v6(&inp->in6p_faddr,
+ &inp->in6p_laddr,
+ inp->inp_fport,
+ inp->inp_lport,
+ IPPROTO_TCP,
+ &inp->inp_flowid,
+ &inp->inp_flowtype);
+ } else
+#endif /* INET6 */
+ {
+ rss_proto_software_hash_v4(inp->inp_faddr,
+ inp->inp_laddr,
+ inp->inp_fport,
+ inp->inp_lport,
+ IPPROTO_TCP,
+ &inp->inp_flowid,
+ &inp->inp_flowtype);
+ }
+#endif /* RSS */
+ }
}
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
#ifdef INET6
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 4:24 PM (13 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16597939
Default Alt Text
D40061.diff (1 KB)
Attached To
Mode
D40061: Under RSS, assign a TCP flow's inp_flowid anyway.
Attached
Detach File
Event Timeline
Log In to Comment