aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/sctp.h1
-rw-r--r--sys/netinet/sctp_constants.h6
-rw-r--r--sys/netinet/sctp_os_bsd.h5
-rw-r--r--sys/netinet/sctp_pcb.h4
-rw-r--r--sys/netinet/sctputil.c72
5 files changed, 21 insertions, 67 deletions
diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h
index ec42cffaf661..578be4f64cad 100644
--- a/sys/netinet/sctp.h
+++ b/sys/netinet/sctp.h
@@ -545,7 +545,6 @@ struct sctp_error_auth_invalid_hmac {
#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0000000000000010
#define SCTP_PCB_FLAGS_DO_ASCONF 0x0000000000000020
#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0000000000000040
-#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0000000000000080
/* socket options */
#define SCTP_PCB_FLAGS_NODELAY 0x0000000000000100
#define SCTP_PCB_FLAGS_AUTOCLOSE 0x0000000000000200
diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h
index dca34cc59ffa..3faf31d4cc37 100644
--- a/sys/netinet/sctp_constants.h
+++ b/sys/netinet/sctp_constants.h
@@ -555,11 +555,9 @@ __FBSDID("$FreeBSD$");
#define SCTP_TIMER_TYPE_INPKILL 15
#define SCTP_TIMER_TYPE_ASOCKILL 16
#define SCTP_TIMER_TYPE_ADDR_WQ 17
-#define SCTP_TIMER_TYPE_ZERO_COPY 18
-#define SCTP_TIMER_TYPE_ZCOPY_SENDQ 19
-#define SCTP_TIMER_TYPE_PRIM_DELETED 20
+#define SCTP_TIMER_TYPE_PRIM_DELETED 18
/* 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) && \
((t) < SCTP_TIMER_TYPE_LAST))
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
index 9afd8592da5c..5c0b80db1da1 100644
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -404,11 +404,6 @@ typedef struct rtentry sctp_rtentry_t;
#define SCTP_RTALLOC(ro, vrf_id, 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.
*/
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index 86fae1f4adac..acc683112cd1 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -314,10 +314,6 @@ struct sctp_pcb {
*/
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;
/* defaults to 0 */
int auto_close_time;
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index f61a3edc60ab..618dbbc02d3f 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -1633,22 +1633,6 @@ sctp_timeout_handler(void *t)
/* call the handler for the appropriate timer 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:
sctp_handle_addr_wq();
break;
@@ -1962,14 +1946,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_TCB_LOCK_ASSERT(stcb);
}
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:
/* Only 1 tick away :-) */
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);
}
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:
tmr = &SCTP_BASE_INFO(addr_wq_timer);
break;
@@ -4470,36 +4440,32 @@ sctp_wakeup_the_read_socket(struct sctp_inpcb *inp,
)
{
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)
- struct socket *so;
+ struct socket *so;
- so = SCTP_INP_SO(inp);
- if (!so_locked) {
- if (stcb) {
- atomic_add_int(&stcb->asoc.refcnt, 1);
- 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;
- }
+ so = SCTP_INP_SO(inp);
+ if (!so_locked) {
+ if (stcb) {
+ atomic_add_int(&stcb->asoc.refcnt, 1);
+ SCTP_TCB_UNLOCK(stcb);
}
-#endif
- sctp_sorwakeup(inp, inp->sctp_socket);
-#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
- if (!so_locked) {
+ 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_sorwakeup(inp, inp->sctp_socket);
+#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
+ if (!so_locked) {
+ SCTP_SOCKET_UNLOCK(so, 1);
}
+#endif
}
}