summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.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/sctp_output.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/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index f35ea8c..022ffbe 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -2949,17 +2949,10 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
* we must use rotation amongst the bound addresses..
*/
if (ro->ro_rt == NULL) {
- uint32_t table_id = 0;
-
/*
* Need a route to cache.
*/
- if (stcb) {
- table_id = stcb->asoc.table_id;
- } else {
- table_id = SCTP_VRF_DEFAULT_TABLEID(vrf_id);
- }
- SCTP_RTALLOC(ro, vrf_id, table_id);
+ SCTP_RTALLOC(ro, vrf_id);
}
if (ro->ro_rt == NULL) {
return (NULL);
@@ -3469,7 +3462,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
SCTP_ATTACH_CHAIN(o_pak, m, packet_length);
/* send it out. table id is taken from stcb */
- SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id, 0);
+ SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id);
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
@@ -3686,7 +3679,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
/* send it out. table id is taken from stcb */
SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp,
- stcb, vrf_id, 0);
+ stcb, vrf_id);
if (net) {
/* for link local this must be done */
@@ -4483,7 +4476,7 @@ sctp_are_there_new_addresses(struct sctp_association *asoc,
void
sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct mbuf *init_pkt, int iphlen, int offset, struct sctphdr *sh,
- struct sctp_init_chunk *init_chk, uint32_t vrf_id, uint32_t table_id)
+ struct sctp_init_chunk *init_chk, uint32_t vrf_id)
{
struct sctp_association *asoc;
struct mbuf *m, *m_at, *m_tmp, *m_cookie, *op_err, *mp_last;
@@ -4521,8 +4514,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
* though we even set the T bit and copy in the 0 tag.. this
* looks no different than if no listener was present.
*/
- sctp_send_abort(init_pkt, iphlen, sh, 0, NULL, vrf_id,
- table_id);
+ sctp_send_abort(init_pkt, iphlen, sh, 0, NULL, vrf_id);
return;
}
abort_flag = 0;
@@ -4531,8 +4523,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
&abort_flag, (struct sctp_chunkhdr *)init_chk);
if (abort_flag) {
sctp_send_abort(init_pkt, iphlen, sh,
- init_chk->init.initiate_tag, op_err, vrf_id,
- table_id);
+ init_chk->init.initiate_tag, op_err, vrf_id);
return;
}
m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
@@ -9252,7 +9243,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
void
sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
- uint32_t vrf_id, uint32_t table_id)
+ uint32_t vrf_id)
{
/* formulate and SEND a SHUTDOWN-COMPLETE */
struct mbuf *o_pak;
@@ -9355,7 +9346,7 @@ sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
/* out it goes */
- SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id, table_id);
+ SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id);
/* Free the route if we got one back */
if (ro.ro_rt)
@@ -9372,7 +9363,7 @@ sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
sctp_packet_log(mout, mlen);
#endif
SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
- SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
+ SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
/* Free the route if we got one back */
if (ro.ro_rt)
@@ -10091,7 +10082,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
void
sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
- struct mbuf *err_cause, uint32_t vrf_id, uint32_t table_id)
+ struct mbuf *err_cause, uint32_t vrf_id)
{
/*-
* Formulate the abort message, and send it back down.
@@ -10224,7 +10215,7 @@ sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
sctp_packet_log(mout, len);
#endif
SCTP_ATTACH_CHAIN(o_pak, mout, len);
- SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id, table_id);
+ SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id);
/* Free the route if we got one back */
if (ro.ro_rt)
@@ -10244,7 +10235,7 @@ sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
sctp_packet_log(mout, len);
#endif
SCTP_ATTACH_CHAIN(o_pak, mout, len);
- SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
+ SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
/* Free the route if we got one back */
if (ro.ro_rt)
@@ -10256,7 +10247,7 @@ sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
void
sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
- uint32_t vrf_id, uint32_t table_id)
+ uint32_t vrf_id)
{
struct mbuf *o_pak;
struct sctphdr *ihdr;
@@ -10349,7 +10340,7 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
#endif
SCTP_ATTACH_CHAIN(o_pak, mout, len);
- SCTP_IP_OUTPUT(retcode, o_pak, &ro, stcb, vrf_id, table_id);
+ SCTP_IP_OUTPUT(retcode, o_pak, &ro, stcb, vrf_id);
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
@@ -10396,7 +10387,7 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
sctp_packet_log(mout, len);
#endif
SCTP_ATTACH_CHAIN(o_pak, mout, len);
- SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
+ SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
OpenPOWER on IntegriCloud