summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/uipc_sockbuf.c44
-rw-r--r--sys/kern/uipc_socket2.c44
-rw-r--r--sys/sys/socketvar.h2
3 files changed, 0 insertions, 90 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 40907f9..47bf7bb 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -162,50 +162,6 @@ soisdisconnected(so)
}
/*
- * Return a random connection that hasn't been serviced yet and
- * is eligible for discard. There is a one in qlen chance that
- * we will return a null, saying that there are no dropable
- * requests. In this case, the protocol specific code should drop
- * the new request. This insures fairness.
- *
- * This may be used in conjunction with protocol specific queue
- * congestion routines.
- */
-struct socket *
-sodropablereq(head)
- register struct socket *head;
-{
- register struct socket *so;
- unsigned int i, j, qlen;
- static int rnd;
- static struct timeval old_runtime;
- static unsigned int cur_cnt, old_cnt;
- struct timeval tv;
-
- getmicrouptime(&tv);
- if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
- old_runtime = tv;
- old_cnt = cur_cnt / i;
- cur_cnt = 0;
- }
-
- so = TAILQ_FIRST(&head->so_incomp);
- if (!so)
- return (so);
-
- qlen = head->so_incqlen;
- if (++cur_cnt > qlen || old_cnt > qlen) {
- rnd = (314159 * rnd + 66329) & 0xffff;
- j = ((qlen + 1) * rnd) >> 16;
-
- while (j-- && so)
- so = TAILQ_NEXT(so, so_list);
- }
-
- return (so);
-}
-
-/*
* When an attempt at a new connection is noted on a socket
* which accepts connections, sonewconn is called. If the
* connection is possible (subject to space constraints, etc.)
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 40907f9..47bf7bb 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -162,50 +162,6 @@ soisdisconnected(so)
}
/*
- * Return a random connection that hasn't been serviced yet and
- * is eligible for discard. There is a one in qlen chance that
- * we will return a null, saying that there are no dropable
- * requests. In this case, the protocol specific code should drop
- * the new request. This insures fairness.
- *
- * This may be used in conjunction with protocol specific queue
- * congestion routines.
- */
-struct socket *
-sodropablereq(head)
- register struct socket *head;
-{
- register struct socket *so;
- unsigned int i, j, qlen;
- static int rnd;
- static struct timeval old_runtime;
- static unsigned int cur_cnt, old_cnt;
- struct timeval tv;
-
- getmicrouptime(&tv);
- if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
- old_runtime = tv;
- old_cnt = cur_cnt / i;
- cur_cnt = 0;
- }
-
- so = TAILQ_FIRST(&head->so_incomp);
- if (!so)
- return (so);
-
- qlen = head->so_incqlen;
- if (++cur_cnt > qlen || old_cnt > qlen) {
- rnd = (314159 * rnd + 66329) & 0xffff;
- j = ((qlen + 1) * rnd) >> 16;
-
- while (j-- && so)
- so = TAILQ_NEXT(so, so_list);
- }
-
- return (so);
-}
-
-/*
* When an attempt at a new connection is noted on a socket
* which accepts connections, sonewconn is called. If the
* connection is possible (subject to space constraints, etc.)
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index 93ea687..3bfcde2 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -392,8 +392,6 @@ void soisdisconnected(struct socket *so);
void soisdisconnecting(struct socket *so);
int solisten(struct socket *so, int backlog, struct thread *td);
struct socket *
- sodropablereq(struct socket *head);
-struct socket *
sonewconn(struct socket *head, int connstatus);
int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen);
int sooptcopyout(struct sockopt *sopt, void *buf, size_t len);
OpenPOWER on IntegriCloud