Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove SS_ISCONFIRMING, it is unused and TP4 will not co...
details: https://anonhg.NetBSD.org/src/rev/f682b673c765
branches: trunk
changeset: 789644:f682b673c765
user: rmind <rmind%NetBSD.org@localhost>
date: Thu Aug 29 17:49:20 2013 +0000
description:
Remove SS_ISCONFIRMING, it is unused and TP4 will not come back.
diffstat:
sys/dev/kttcp.c | 12 +++++-------
sys/kern/uipc_socket.c | 10 +++-------
sys/kern/uipc_socket2.c | 20 +++++++++-----------
sys/kern/uipc_syscalls.c | 8 +++-----
sys/kern/uipc_usrreq.c | 6 +++---
sys/net/if_gre.c | 13 +++++--------
sys/netbt/l2cap_socket.c | 6 +++---
sys/netbt/rfcomm_socket.c | 6 +++---
sys/netbt/sco_socket.c | 6 +++---
sys/netinet/tcp_input.c | 6 +++---
sys/rump/net/lib/libsockin/sockin.c | 6 +++---
sys/sys/socketvar.h | 5 ++---
12 files changed, 45 insertions(+), 59 deletions(-)
diffs (truncated from 411 to 300 lines):
diff -r 3352fb7e83a2 -r f682b673c765 sys/dev/kttcp.c
--- a/sys/dev/kttcp.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/dev/kttcp.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kttcp.c,v 1.30 2011/12/22 02:00:19 jakllsch Exp $ */
+/* $NetBSD: kttcp.c,v 1.31 2013/08/29 17:49:21 rmind Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.30 2011/12/22 02:00:19 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.31 2013/08/29 17:49:21 rmind Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -226,10 +226,10 @@
}
if ((so->so_state & SS_ISCONNECTED) == 0) {
if (so->so_proto->pr_flags & PR_CONNREQUIRED) {
- if ((so->so_state & SS_ISCONFIRMING) == 0)
- snderr(ENOTCONN);
- } else
+ snderr(ENOTCONN);
+ } else {
snderr(EDESTADDRREQ);
+ }
}
space = sbspace(&so->so_snd);
if (flags & MSG_OOB)
@@ -375,8 +375,6 @@
if (mp)
*mp = NULL;
solock(so);
- if (so->so_state & SS_ISCONFIRMING && resid)
- (*pr->pr_usrreq)(so, PRU_RCVD, NULL, NULL, NULL, NULL);
restart:
if ((error = sblock(&so->so_rcv, SBLOCKWAIT(flags))) != 0)
return (error);
diff -r 3352fb7e83a2 -r f682b673c765 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/kern/uipc_socket.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.216 2013/08/02 20:00:33 spz Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.217 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.216 2013/08/02 20:00:33 spz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.217 2013/08/29 17:49:21 rmind Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -927,8 +927,7 @@
}
if ((so->so_state & SS_ISCONNECTED) == 0) {
if (so->so_proto->pr_flags & PR_CONNREQUIRED) {
- if ((so->so_state & SS_ISCONFIRMING) == 0 &&
- !(resid == 0 && clen != 0)) {
+ if (resid || clen == 0) {
error = ENOTCONN;
goto release;
}
@@ -1185,9 +1184,6 @@
*/
s = splsoftnet();
solock(so);
- if (so->so_state & SS_ISCONFIRMING && uio->uio_resid)
- (*pr->pr_usrreq)(so, PRU_RCVD, NULL, NULL, NULL, l);
-
restart:
if ((error = sblock(&so->so_rcv, SBLOCKWAIT(flags))) != 0) {
sounlock(so);
diff -r 3352fb7e83a2 -r f682b673c765 sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/kern/uipc_socket2.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket2.c,v 1.112 2013/06/28 01:23:38 matt Exp $ */
+/* $NetBSD: uipc_socket2.c,v 1.113 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.112 2013/06/28 01:23:38 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.113 2013/08/29 17:49:21 rmind Exp $");
#include "opt_mbuftrace.h"
#include "opt_sb_max.h"
@@ -175,7 +175,7 @@
KASSERT(solocked(so));
KASSERT(head == NULL || solocked2(so, head));
- so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
+ so->so_state &= ~(SS_ISCONNECTING | SS_ISDISCONNECTING);
so->so_state |= SS_ISCONNECTED;
if (head && so->so_onq == &head->so_q0) {
if ((so->so_options & SO_ACCEPTFILTER) == 0) {
@@ -239,21 +239,19 @@
* connection is possible (subject to space constraints, etc.)
* then we allocate a new structure, propoerly linked into the
* data structure of the original socket, and return this.
- * Connstatus may be 0, SS_ISCONFIRMING, or SS_ISCONNECTED.
*/
struct socket *
-sonewconn(struct socket *head, int connstatus)
+sonewconn(struct socket *head, bool conncomplete)
{
struct socket *so;
int soqueue, error;
- KASSERT(connstatus == 0 || connstatus == SS_ISCONFIRMING ||
- connstatus == SS_ISCONNECTED);
KASSERT(solocked(head));
if ((head->so_options & SO_ACCEPTFILTER) != 0)
- connstatus = 0;
- soqueue = connstatus ? 1 : 0;
+ conncomplete = false;
+ soqueue = conncomplete ? 1 : 0;
+
if (head->so_qlen + head->so_q0len > 3 * head->so_qlimit / 2)
return NULL;
so = soget(false);
@@ -301,10 +299,10 @@
soput(so);
return NULL;
}
- if (connstatus) {
+ if (conncomplete) {
sorwakeup(head);
cv_broadcast(&head->so_cv);
- so->so_state |= connstatus;
+ so->so_state |= SS_ISCONNECTED;
}
return so;
}
diff -r 3352fb7e83a2 -r f682b673c765 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/kern/uipc_syscalls.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.161 2013/06/03 23:45:31 christos Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.162 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.161 2013/06/03 23:45:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.162 2013/08/29 17:49:21 rmind Exp $");
#include "opt_pipe.h"
@@ -1289,7 +1289,6 @@
/*
* Get socket name.
*/
-/* ARGSUSED */
int
do_sys_getsockname(struct lwp *l, int fd, int which, struct mbuf **nam)
{
@@ -1304,8 +1303,7 @@
MCLAIM(m, so->so_mowner);
solock(so);
- if (which == PRU_PEERADDR
- && (so->so_state & (SS_ISCONNECTED | SS_ISCONFIRMING)) == 0) {
+ if (which == PRU_PEERADDR && (so->so_state & SS_ISCONNECTED) == 0) {
error = ENOTCONN;
} else {
*nam = m;
diff -r 3352fb7e83a2 -r f682b673c765 sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/kern/uipc_usrreq.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.143 2013/08/01 19:33:21 drochner Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.144 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.143 2013/08/01 19:33:21 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.144 2013/08/29 17:49:21 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1046,7 +1046,7 @@
KASSERT((so2->so_options & SO_ACCEPTCONN) == 0 ||
so2->so_lock == uipc_lock);
if ((so2->so_options & SO_ACCEPTCONN) == 0 ||
- (so3 = sonewconn(so2, 0)) == NULL) {
+ (so3 = sonewconn(so2, false)) == NULL) {
error = ECONNREFUSED;
sounlock(so);
goto bad;
diff -r 3352fb7e83a2 -r f682b673c765 sys/net/if_gre.c
--- a/sys/net/if_gre.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/net/if_gre.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gre.c,v 1.150 2011/11/09 19:43:22 christos Exp $ */
+/* $NetBSD: if_gre.c,v 1.151 2013/08/29 17:49:21 rmind Exp $ */
/*
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.150 2011/11/09 19:43:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.151 2013/08/29 17:49:21 rmind Exp $");
#include "opt_atalk.h"
#include "opt_gre.h"
@@ -516,10 +516,10 @@
}
if ((so->so_state & SS_ISCONNECTED) == 0) {
if (so->so_proto->pr_flags & PR_CONNREQUIRED) {
- if ((so->so_state & SS_ISCONFIRMING) == 0)
- snderr(ENOTCONN);
- } else
+ snderr(ENOTCONN);
+ } else {
snderr(EDESTADDRREQ);
+ }
}
space = sbspace(&so->so_snd);
if (resid > so->so_snd.sb_hiwat)
@@ -566,9 +566,6 @@
*mp = NULL;
KASSERT(pr->pr_flags & PR_ATOMIC);
-
- if (so->so_state & SS_ISCONFIRMING)
- (*pr->pr_usrreq)(so, PRU_RCVD, NULL, NULL, NULL, curlwp);
restart:
if ((error = sblock(&so->so_rcv, M_NOWAIT)) != 0) {
return error;
diff -r 3352fb7e83a2 -r f682b673c765 sys/netbt/l2cap_socket.c
--- a/sys/netbt/l2cap_socket.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/netbt/l2cap_socket.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: l2cap_socket.c,v 1.9 2008/08/06 15:01:24 plunky Exp $ */
+/* $NetBSD: l2cap_socket.c,v 1.10 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.9 2008/08/06 15:01:24 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.10 2013/08/29 17:49:21 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -336,7 +336,7 @@
struct socket *so = arg;
DPRINTF("New Connection\n");
- so = sonewconn(so, 0);
+ so = sonewconn(so, false);
if (so == NULL)
return NULL;
diff -r 3352fb7e83a2 -r f682b673c765 sys/netbt/rfcomm_socket.c
--- a/sys/netbt/rfcomm_socket.c Thu Aug 29 15:50:41 2013 +0000
+++ b/sys/netbt/rfcomm_socket.c Thu Aug 29 17:49:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rfcomm_socket.c,v 1.10 2008/08/06 15:01:24 plunky Exp $ */
+/* $NetBSD: rfcomm_socket.c,v 1.11 2013/08/29 17:49:21 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.10 2008/08/06 15:01:24 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.11 2013/08/29 17:49:21 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -338,7 +338,7 @@
struct socket *so = arg;
DPRINTF("New Connection\n");
- so = sonewconn(so, 0);
Home |
Main Index |
Thread Index |
Old Index