Remove code not used on any platform currently supported.

MFC after:	1 week
This commit is contained in:
Michael Tuexen 2017-09-16 21:26:06 +00:00
parent ec371b57e8
commit fe40f49bb3
5 changed files with 22 additions and 68 deletions

View File

@ -545,7 +545,6 @@ struct sctp_error_auth_invalid_hmac {
#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010 #define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010
#define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020 #define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020
#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040 #define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040
#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0000000000000080
/* socket options */ /* socket options */
#define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100 #define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100
#define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200 #define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200

View File

@ -555,11 +555,9 @@ __FBSDID("$FreeBSD$");
#define SCTP_TIMER_TYPE_INPKILL 15 #define SCTP_TIMER_TYPE_INPKILL 15
#define SCTP_TIMER_TYPE_ASOCKILL 16 #define SCTP_TIMER_TYPE_ASOCKILL 16
#define SCTP_TIMER_TYPE_ADDR_WQ 17 #define SCTP_TIMER_TYPE_ADDR_WQ 17
#define SCTP_TIMER_TYPE_ZERO_COPY 18 #define SCTP_TIMER_TYPE_PRIM_DELETED 18
#define SCTP_TIMER_TYPE_ZCOPY_SENDQ 19
#define SCTP_TIMER_TYPE_PRIM_DELETED 20
/* add new timers here - and increment LAST */ /* add new timers here - and increment LAST */
#define SCTP_TIMER_TYPE_LAST 21 #define SCTP_TIMER_TYPE_LAST 19
#define SCTP_IS_TIMER_TYPE_VALID(t) (((t) > SCTP_TIMER_TYPE_NONE) && \ #define SCTP_IS_TIMER_TYPE_VALID(t) (((t) > SCTP_TIMER_TYPE_NONE) && \
((t) < SCTP_TIMER_TYPE_LAST)) ((t) < SCTP_TIMER_TYPE_LAST))

View File

@ -404,11 +404,6 @@ typedef struct rtentry sctp_rtentry_t;
#define SCTP_RTALLOC(ro, vrf_id, fibnum) \ #define SCTP_RTALLOC(ro, vrf_id, fibnum) \
rtalloc_ign_fib((struct route *)ro, 0UL, fibnum) rtalloc_ign_fib((struct route *)ro, 0UL, fibnum)
/* Future zero copy wakeup/send function */
#define SCTP_ZERO_COPY_EVENT(inp, so)
/* This is re-pulse ourselves for sendbuf */
#define SCTP_ZERO_COPY_SENDQ_EVENT(inp, so)
/* /*
* SCTP protocol specific mbuf flags. * SCTP protocol specific mbuf flags.
*/ */

View File

@ -314,10 +314,6 @@ struct sctp_pcb {
*/ */
struct sctp_timer signature_change; struct sctp_timer signature_change;
/* Zero copy full buffer timer */
struct sctp_timer zero_copy_timer;
/* Zero copy app to transport (sendq) read repulse timer */
struct sctp_timer zero_copy_sendq_timer;
uint32_t def_cookie_life; uint32_t def_cookie_life;
/* defaults to 0 */ /* defaults to 0 */
int auto_close_time; int auto_close_time;

View File

@ -1633,22 +1633,6 @@ sctp_timeout_handler(void *t)
/* call the handler for the appropriate timer type */ /* call the handler for the appropriate timer type */
switch (type) { switch (type) {
case SCTP_TIMER_TYPE_ZERO_COPY:
if (inp == NULL) {
break;
}
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) {
SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket);
}
break;
case SCTP_TIMER_TYPE_ZCOPY_SENDQ:
if (inp == NULL) {
break;
}
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) {
SCTP_ZERO_COPY_SENDQ_EVENT(inp, inp->sctp_socket);
}
break;
case SCTP_TIMER_TYPE_ADDR_WQ: case SCTP_TIMER_TYPE_ADDR_WQ:
sctp_handle_addr_wq(); sctp_handle_addr_wq();
break; break;
@ -1962,14 +1946,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_TCB_LOCK_ASSERT(stcb); SCTP_TCB_LOCK_ASSERT(stcb);
} }
switch (t_type) { switch (t_type) {
case SCTP_TIMER_TYPE_ZERO_COPY:
tmr = &inp->sctp_ep.zero_copy_timer;
to_ticks = SCTP_ZERO_COPY_TICK_DELAY;
break;
case SCTP_TIMER_TYPE_ZCOPY_SENDQ:
tmr = &inp->sctp_ep.zero_copy_sendq_timer;
to_ticks = SCTP_ZERO_COPY_SENDQ_TICK_DELAY;
break;
case SCTP_TIMER_TYPE_ADDR_WQ: case SCTP_TIMER_TYPE_ADDR_WQ:
/* Only 1 tick away :-) */ /* Only 1 tick away :-) */
tmr = &SCTP_BASE_INFO(addr_wq_timer); tmr = &SCTP_BASE_INFO(addr_wq_timer);
@ -2251,12 +2227,6 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_TCB_LOCK_ASSERT(stcb); SCTP_TCB_LOCK_ASSERT(stcb);
} }
switch (t_type) { switch (t_type) {
case SCTP_TIMER_TYPE_ZERO_COPY:
tmr = &inp->sctp_ep.zero_copy_timer;
break;
case SCTP_TIMER_TYPE_ZCOPY_SENDQ:
tmr = &inp->sctp_ep.zero_copy_sendq_timer;
break;
case SCTP_TIMER_TYPE_ADDR_WQ: case SCTP_TIMER_TYPE_ADDR_WQ:
tmr = &SCTP_BASE_INFO(addr_wq_timer); tmr = &SCTP_BASE_INFO(addr_wq_timer);
break; break;
@ -4470,36 +4440,32 @@ sctp_wakeup_the_read_socket(struct sctp_inpcb *inp,
) )
{ {
if ((inp != NULL) && (inp->sctp_socket != NULL)) { if ((inp != NULL) && (inp->sctp_socket != NULL)) {
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) {
SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket);
} else {
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so; struct socket *so;
so = SCTP_INP_SO(inp); so = SCTP_INP_SO(inp);
if (!so_locked) { if (!so_locked) {
if (stcb) { if (stcb) {
atomic_add_int(&stcb->asoc.refcnt, 1); atomic_add_int(&stcb->asoc.refcnt, 1);
SCTP_TCB_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb);
}
SCTP_SOCKET_LOCK(so, 1);
if (stcb) {
SCTP_TCB_LOCK(stcb);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
}
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
SCTP_SOCKET_UNLOCK(so, 1);
return;
}
} }
#endif SCTP_SOCKET_LOCK(so, 1);
sctp_sorwakeup(inp, inp->sctp_socket); if (stcb) {
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_LOCK(stcb);
if (!so_locked) { atomic_subtract_int(&stcb->asoc.refcnt, 1);
}
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
SCTP_SOCKET_UNLOCK(so, 1); SCTP_SOCKET_UNLOCK(so, 1);
return;
} }
#endif
} }
#endif
sctp_sorwakeup(inp, inp->sctp_socket);
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
if (!so_locked) {
SCTP_SOCKET_UNLOCK(so, 1);
}
#endif
} }
} }