hpts: move inp initialization from the generic inpcb code to TCP
Differential revision: https://reviews.freebsd.org/D37124
This commit is contained in:
parent
9eb0e8326d
commit
ab0ef9455f
@ -639,13 +639,6 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo)
|
|||||||
* to be cleaned up.
|
* to be cleaned up.
|
||||||
*/
|
*/
|
||||||
inp->inp_route.ro_flags = RT_LLE_CACHE;
|
inp->inp_route.ro_flags = RT_LLE_CACHE;
|
||||||
#ifdef TCPHPTS
|
|
||||||
/*
|
|
||||||
* If using hpts lets drop a random number in so
|
|
||||||
* not all new connections fall on the same CPU.
|
|
||||||
*/
|
|
||||||
inp->inp_hpts_cpu = hpts_random_cpu(inp);
|
|
||||||
#endif
|
|
||||||
refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */
|
refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */
|
||||||
INP_WLOCK(inp);
|
INP_WLOCK(inp);
|
||||||
INP_INFO_WLOCK(pcbinfo);
|
INP_INFO_WLOCK(pcbinfo);
|
||||||
|
@ -2315,6 +2315,13 @@ tcp_newtcpcb(struct inpcb *inp)
|
|||||||
*/
|
*/
|
||||||
inp->inp_ip_ttl = V_ip_defttl;
|
inp->inp_ip_ttl = V_ip_defttl;
|
||||||
inp->inp_ppcb = tp;
|
inp->inp_ppcb = tp;
|
||||||
|
#ifdef TCPHPTS
|
||||||
|
/*
|
||||||
|
* If using hpts lets drop a random number in so
|
||||||
|
* not all new connections fall on the same CPU.
|
||||||
|
*/
|
||||||
|
inp->inp_hpts_cpu = hpts_random_cpu(inp);
|
||||||
|
#endif
|
||||||
#ifdef TCPPCAP
|
#ifdef TCPPCAP
|
||||||
/*
|
/*
|
||||||
* Init the TCP PCAP queues.
|
* Init the TCP PCAP queues.
|
||||||
|
Loading…
Reference in New Issue
Block a user