tcp_hpts: make RSS kernel compile again.
Add proper #includes, and #ifdefs and some style fixes to make RSS kernels compile again. There are still possible issues with uin16_t vs. uint_t cpuid which I am not going near. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D23726
This commit is contained in:
parent
a2fba2a700
commit
4e1a3ff884
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358577
@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "opt_inet.h"
|
#include "opt_inet.h"
|
||||||
#include "opt_inet6.h"
|
#include "opt_inet6.h"
|
||||||
|
#include "opt_rss.h"
|
||||||
#include "opt_tcpdebug.h"
|
#include "opt_tcpdebug.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some notes about usage.
|
* Some notes about usage.
|
||||||
*
|
*
|
||||||
@ -151,6 +153,11 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
#include <net/vnet.h>
|
#include <net/vnet.h>
|
||||||
|
|
||||||
|
#ifdef RSS
|
||||||
|
#include <net/netisr.h>
|
||||||
|
#include <net/rss_config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TCPSTATES /* for logging */
|
#define TCPSTATES /* for logging */
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@ -180,7 +187,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <netinet/tcp_offload.h>
|
#include <netinet/tcp_offload.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "opt_rss.h"
|
|
||||||
|
|
||||||
MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts");
|
MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts");
|
||||||
#ifdef RSS
|
#ifdef RSS
|
||||||
@ -1151,9 +1157,10 @@ hpts_random_cpu(struct inpcb *inp){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t
|
static uint16_t
|
||||||
hpts_cpuid(struct inpcb *inp){
|
hpts_cpuid(struct inpcb *inp)
|
||||||
|
{
|
||||||
u_int cpuid;
|
u_int cpuid;
|
||||||
#ifdef NUMA
|
#if !defined(RSS) && defined(NUMA)
|
||||||
struct hpts_domain_info *di;
|
struct hpts_domain_info *di;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1167,7 +1174,7 @@ hpts_cpuid(struct inpcb *inp){
|
|||||||
return (inp->inp_hpts_cpu);
|
return (inp->inp_hpts_cpu);
|
||||||
}
|
}
|
||||||
/* If one is set the other must be the same */
|
/* If one is set the other must be the same */
|
||||||
#ifdef RSS
|
#ifdef RSS
|
||||||
cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype);
|
cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype);
|
||||||
if (cpuid == NETISR_CPUID_NONE)
|
if (cpuid == NETISR_CPUID_NONE)
|
||||||
return (hpts_random_cpu(inp));
|
return (hpts_random_cpu(inp));
|
||||||
|
Loading…
Reference in New Issue
Block a user