From a5cfa3a229b52bce6155190df6f640248ceb9c0f Mon Sep 17 00:00:00 2001 From: Sridhar Samudrala Date: Sun, 8 Feb 2004 19:14:24 -0800 Subject: [PATCH] [SCTP] Removed SCTP specific rmem/wmem sysctl's and use the global rmem_default/wmem_default values for SCTP socket buffer sizes. --- include/net/sctp/structs.h | 6 ------ net/sctp/associola.c | 4 ++-- net/sctp/endpointola.c | 4 ---- net/sctp/protocol.c | 4 ---- net/sctp/sysctl.c | 16 ---------------- net/sctp/ulpqueue.c | 2 +- 6 files changed, 3 insertions(+), 33 deletions(-) diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index fa98456f5a0b7..92394f3de76a3 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -193,10 +193,6 @@ extern struct sctp_globals { /* Flag to indicate if addip is enabled. */ int addip_enable; - - /* socket receive and send buffer sizes. */ - int rmem; - int wmem; } sctp_globals; #define sctp_rto_initial (sctp_globals.rto_initial) @@ -225,8 +221,6 @@ extern struct sctp_globals { #define sctp_local_addr_list (sctp_globals.local_addr_list) #define sctp_local_addr_lock (sctp_globals.local_addr_lock) #define sctp_addip_enable (sctp_globals.addip_enable) -#define sctp_rmem (sctp_globals.rmem) -#define sctp_wmem (sctp_globals.wmem) /* SCTP Socket type: UDP or TCP style. */ typedef enum { diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 29fa694a2344c..5c15d829abbab 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -192,7 +192,7 @@ struct sctp_association *sctp_association_init(struct sctp_association *asoc, asoc->rwnd_over = 0; /* Use my own max window until I learn something better. */ - asoc->peer.rwnd = sctp_rmem; + asoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW; /* Set the sndbuf size for transmit. */ asoc->sndbuf_used = 0; @@ -498,7 +498,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, * so initialize ssthresh to the default value and it will be set * later when we process the INIT. */ - peer->ssthresh = sctp_rmem; + peer->ssthresh = SCTP_DEFAULT_MAXWINDOW; peer->partial_bytes_acked = 0; peer->flight_size = 0; diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 6391db36d14ba..e706368b6aa75 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -147,10 +147,6 @@ struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, ep->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] = sp->autoclose * HZ; - /* Set up the default send/receive buffer space. */ - sk->sk_rcvbuf = sctp_rmem; - sk->sk_sndbuf = sctp_wmem; - /* Use SCTP specific send buffer space queues. */ sk->sk_write_space = sctp_write_space; sk->sk_use_write_queue = 1; diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 2e796280fe294..e903cf341126b 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1049,10 +1049,6 @@ __init int sctp_init(void) sctp_max_instreams = SCTP_DEFAULT_INSTREAMS; sctp_max_outstreams = SCTP_DEFAULT_OUTSTREAMS; - /* Initialize default send & receive buffer sizes. */ - sctp_rmem = SCTP_DEFAULT_MAXWINDOW; - sctp_wmem = SCTP_DEFAULT_MAXWINDOW; - /* Size and allocate the association hash table. * The methodology is similar to that of the tcp hash tables. */ diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 573278445bb45..15c5f3bfecbf3 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -170,22 +170,6 @@ static ctl_table sctp_table[] = { .mode = 0644, .proc_handler = &proc_dointvec }, - { - .ctl_name = NET_SCTP_RMEM, - .procname = "rmem", - .data = &sctp_rmem, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .ctl_name = NET_SCTP_WMEM, - .procname = "wmem", - .data = &sctp_wmem, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, { .ctl_name = 0 } }; diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index d9ec4affd16af..a02b2143239b7 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c @@ -768,7 +768,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, needed = ntohs(chunk->chunk_hdr->length); needed -= sizeof(sctp_data_chunk_t); } else - needed = sctp_rmem; + needed = SCTP_DEFAULT_MAXWINDOW; freed = 0; -- 2.53.0