summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-06-01 11:19:54 +0000
committerrrs <rrs@FreeBSD.org>2007-06-01 11:19:54 +0000
commitf978918265146648d92dec52ff74fbf46eb3f5f9 (patch)
treec2755093118649fbe976c97b2ea337fa91ffad1b /sys/netinet/sctputil.c
parent4623bf3eb19a3fc2581cc6506b9754427f5e3687 (diff)
downloadFreeBSD-src-f978918265146648d92dec52ff74fbf46eb3f5f9.zip
FreeBSD-src-f978918265146648d92dec52ff74fbf46eb3f5f9.tar.gz
- Take out the broken table-id concept. Panda Routers have a M-VRF
concept that is NOT well thought out for a multi-homed transport protocol. So the useless table-id entries passed around need to be removed. - Add a event timer for the zero copy api. - Fix a bug in sctp_timer.c when searching for an alternate with the largest ssthresh (the compare was wrong).
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 8b4943a..ab4e8aa 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -955,8 +955,6 @@ sctp_init_asoc(struct sctp_inpcb *m, struct sctp_tcb *stcb,
asoc->my_vtag_nonce = sctp_select_a_tag(m);
asoc->peer_vtag_nonce = sctp_select_a_tag(m);
asoc->vrf_id = vrf_id;
- /* Save the table id as well from the inp */
- asoc->table_id = m->def_table_id;
if (sctp_is_feature_on(m, SCTP_PCB_FLAGS_DONOT_HEARTBEAT))
asoc->hb_is_disabled = 1;
@@ -1466,6 +1464,11 @@ sctp_timeout_handler(void *t)
SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket);
}
break;
+ case SCTP_TIMER_TYPE_ZCOPY_SENDQ:
+ 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;
@@ -1788,6 +1791,10 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
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 = &sctppcbinfo.addr_wq_timer;
@@ -2137,7 +2144,9 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
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 = &sctppcbinfo.addr_wq_timer;
break;
@@ -3559,7 +3568,7 @@ sctp_abort_notification(struct sctp_tcb *stcb, int error)
void
sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct mbuf *m, int iphlen, struct sctphdr *sh, struct mbuf *op_err,
- uint32_t vrf_id, uint32_t table_id)
+ uint32_t vrf_id)
{
uint32_t vtag;
@@ -3570,9 +3579,8 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
sctp_abort_notification(stcb, 0);
/* get the assoc vrf id and table id */
vrf_id = stcb->asoc.vrf_id;
- table_id = stcb->asoc.table_id;
}
- sctp_send_abort(m, iphlen, sh, vtag, op_err, vrf_id, table_id);
+ sctp_send_abort(m, iphlen, sh, vtag, op_err, vrf_id);
if (stcb != NULL) {
/* Ok, now lets free it */
sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4);
@@ -3684,8 +3692,7 @@ sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
void
sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
- struct sctp_inpcb *inp, struct mbuf *op_err, uint32_t vrf_id,
- uint32_t table_id)
+ struct sctp_inpcb *inp, struct mbuf *op_err, uint32_t vrf_id)
{
struct sctp_chunkhdr *ch, chunk_buf;
unsigned int chk_length;
@@ -3720,8 +3727,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
*/
return;
case SCTP_SHUTDOWN_ACK:
- sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id,
- table_id);
+ sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id);
return;
default:
break;
@@ -3730,7 +3736,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset,
sizeof(*ch), (uint8_t *) & chunk_buf);
}
- sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, table_id);
+ sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id);
}
/*
OpenPOWER on IntegriCloud