More cleanups due to ifdef cleanup done upstream
MFC after: 1 week
This commit is contained in:
parent
462171d9aa
commit
2f9e6db0be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362106
@ -1012,7 +1012,7 @@ do { \
|
|||||||
do { \
|
do { \
|
||||||
if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
|
if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
|
||||||
inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \
|
inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \
|
||||||
SOCKBUF_UNLOCK(&((so)->so_rcv)); \
|
SOCKBUF_UNLOCK(&((so)->so_rcv)); \
|
||||||
} else { \
|
} else { \
|
||||||
sorwakeup_locked(so); \
|
sorwakeup_locked(so); \
|
||||||
} \
|
} \
|
||||||
|
@ -5723,7 +5723,7 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
extern int *sctp_cpuarry;
|
extern int *sctp_cpuarry;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5735,7 +5735,7 @@ sctp_input(struct mbuf **mp, int *offp, int proto SCTP_UNUSED)
|
|||||||
|
|
||||||
m = *mp;
|
m = *mp;
|
||||||
off = *offp;
|
off = *offp;
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
if (mp_ncpus > 1) {
|
if (mp_ncpus > 1) {
|
||||||
struct ip *ip;
|
struct ip *ip;
|
||||||
struct sctphdr *sh;
|
struct sctphdr *sh;
|
||||||
|
@ -5535,18 +5535,14 @@ sctp_del_local_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Temporarily remove for __APPLE__ until we use the Tiger equivalents
|
|
||||||
*/
|
|
||||||
/* sysctl */
|
/* sysctl */
|
||||||
static int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC;
|
static int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC;
|
||||||
static int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR;
|
static int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR;
|
||||||
|
|
||||||
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
|
||||||
struct sctp_mcore_ctrl *sctp_mcore_workers = NULL;
|
struct sctp_mcore_ctrl *sctp_mcore_workers = NULL;
|
||||||
int *sctp_cpuarry = NULL;
|
int *sctp_cpuarry = NULL;
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use)
|
sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use)
|
||||||
{
|
{
|
||||||
@ -5716,13 +5712,13 @@ sctp_pcb_init(void)
|
|||||||
#if defined(SCTP_LOCAL_TRACE_BUF)
|
#if defined(SCTP_LOCAL_TRACE_BUF)
|
||||||
memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log));
|
memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log));
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
||||||
SCTP_MALLOC(SCTP_BASE_STATS, struct sctpstat *,
|
SCTP_MALLOC(SCTP_BASE_STATS, struct sctpstat *,
|
||||||
((mp_maxid + 1) * sizeof(struct sctpstat)),
|
((mp_maxid + 1) * sizeof(struct sctpstat)),
|
||||||
SCTP_M_MCORE);
|
SCTP_M_MCORE);
|
||||||
#endif
|
#endif
|
||||||
(void)SCTP_GETTIME_TIMEVAL(&tv);
|
(void)SCTP_GETTIME_TIMEVAL(&tv);
|
||||||
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
||||||
memset(SCTP_BASE_STATS, 0, sizeof(struct sctpstat) * (mp_maxid + 1));
|
memset(SCTP_BASE_STATS, 0, sizeof(struct sctpstat) * (mp_maxid + 1));
|
||||||
SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t)tv.tv_sec;
|
SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t)tv.tv_sec;
|
||||||
SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t)tv.tv_usec;
|
SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t)tv.tv_usec;
|
||||||
@ -5833,7 +5829,7 @@ sctp_pcb_init(void)
|
|||||||
}
|
}
|
||||||
sctp_startup_iterator();
|
sctp_startup_iterator();
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
sctp_startup_mcore_threads();
|
sctp_startup_mcore_threads();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5988,7 +5984,7 @@ sctp_pcb_finish(void)
|
|||||||
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq));
|
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq));
|
||||||
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf));
|
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf));
|
||||||
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack));
|
SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack));
|
||||||
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
||||||
SCTP_FREE(SCTP_BASE_STATS, SCTP_M_MCORE);
|
SCTP_FREE(SCTP_BASE_STATS, SCTP_M_MCORE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ struct sctp_base_info {
|
|||||||
* All static structures that anchor the system must be here.
|
* All static structures that anchor the system must be here.
|
||||||
*/
|
*/
|
||||||
struct sctp_epinfo sctppcbinfo;
|
struct sctp_epinfo sctppcbinfo;
|
||||||
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
||||||
struct sctpstat *sctpstat;
|
struct sctpstat *sctpstat;
|
||||||
#else
|
#else
|
||||||
struct sctpstat sctpstat;
|
struct sctpstat sctpstat;
|
||||||
@ -478,7 +478,6 @@ struct sctp_tcb {
|
|||||||
#include <netinet/sctp_lock_bsd.h>
|
#include <netinet/sctp_lock_bsd.h>
|
||||||
|
|
||||||
|
|
||||||
/* TODO where to put non-_KERNEL things for __Userspace__? */
|
|
||||||
#if defined(_KERNEL) || defined(__Userspace__)
|
#if defined(_KERNEL) || defined(__Userspace__)
|
||||||
|
|
||||||
/* Attention Julian, this is the extern that
|
/* Attention Julian, this is the extern that
|
||||||
@ -646,7 +645,7 @@ sctp_initiate_iterator(inp_func inpf,
|
|||||||
end_func ef,
|
end_func ef,
|
||||||
struct sctp_inpcb *,
|
struct sctp_inpcb *,
|
||||||
uint8_t co_off);
|
uint8_t co_off);
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
void
|
void
|
||||||
sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use);
|
sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ typedef void (*asoc_func) (struct sctp_inpcb *, struct sctp_tcb *, void *ptr,
|
|||||||
typedef int (*inp_func) (struct sctp_inpcb *, void *ptr, uint32_t val);
|
typedef int (*inp_func) (struct sctp_inpcb *, void *ptr, uint32_t val);
|
||||||
typedef void (*end_func) (void *ptr, uint32_t val);
|
typedef void (*end_func) (void *ptr, uint32_t val);
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
|
#if defined(SCTP_MCORE_INPUT) && defined(SMP)
|
||||||
/* whats on the mcore control struct */
|
/* whats on the mcore control struct */
|
||||||
struct sctp_mcore_queue {
|
struct sctp_mcore_queue {
|
||||||
TAILQ_ENTRY(sctp_mcore_queue) next;
|
TAILQ_ENTRY(sctp_mcore_queue) next;
|
||||||
@ -129,11 +129,8 @@ struct sctp_mcore_ctrl {
|
|||||||
int running;
|
int running;
|
||||||
int cpuid;
|
int cpuid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct sctp_iterator {
|
struct sctp_iterator {
|
||||||
TAILQ_ENTRY(sctp_iterator) sctp_nxt_itr;
|
TAILQ_ENTRY(sctp_iterator) sctp_nxt_itr;
|
||||||
struct vnet *vn;
|
struct vnet *vn;
|
||||||
|
@ -1128,7 +1128,7 @@ struct sctpstat {
|
|||||||
|
|
||||||
#define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1)
|
#define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1)
|
||||||
#define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1)
|
#define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1)
|
||||||
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
|
||||||
#define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d)
|
#define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d)
|
||||||
#define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d)
|
#define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d)
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user