diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/inet/ipclassifier.h | 5 | ||||
-rw-r--r-- | usr/src/uts/common/inet/squeue.c | 3 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp.c | 27 | ||||
-rw-r--r-- | usr/src/uts/common/inet/udp/udp.c | 11 |
4 files changed, 22 insertions, 24 deletions
diff --git a/usr/src/uts/common/inet/ipclassifier.h b/usr/src/uts/common/inet/ipclassifier.h index 85302c350b..18d8cb40c8 100644 --- a/usr/src/uts/common/inet/ipclassifier.h +++ b/usr/src/uts/common/inet/ipclassifier.h @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,7 +37,6 @@ extern "C" { #include <inet/ip.h> #include <inet/mi.h> #include <inet/tcp.h> -#include <inet/udp_impl.h> #include <inet/ip6.h> #include <netinet/in.h> /* for IPPROTO_* constants */ #include <sys/sdt.h> @@ -178,7 +177,7 @@ struct conn_s { pad_to_bit_31 : 1; tcp_t *conn_tcp; /* Pointer to the tcp struct */ - udp_t *conn_udp; /* Pointer to the udp struct */ + struct udp_s *conn_udp; /* Pointer to the udp struct */ squeue_t *conn_sqp; /* Squeue for processing */ edesc_rpf conn_recv; /* Pointer to recv routine */ diff --git a/usr/src/uts/common/inet/squeue.c b/usr/src/uts/common/inet/squeue.c index 0c65af421b..08dfa95479 100644 --- a/usr/src/uts/common/inet/squeue.c +++ b/usr/src/uts/common/inet/squeue.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -184,6 +184,7 @@ #include <sys/ddi.h> #include <inet/ipclassifier.h> +#include <inet/udp_impl.h> /* * State flags. diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c index 15dccca9b0..7c24c353d7 100644 --- a/usr/src/uts/common/inet/tcp/tcp.c +++ b/usr/src/uts/common/inet/tcp/tcp.c @@ -16789,16 +16789,16 @@ tcp_output(void *arg, mblk_t *mp, void *arg2) ASSERT((connp->conn_fanout != NULL && connp->conn_ref >= 4) || (connp->conn_fanout == NULL && connp->conn_ref >= 3)); - /* Bypass tcp protocol for fused tcp loopback */ - if (tcp->tcp_fused) { - msize = msgdsize(mp); - mutex_enter(&connp->conn_lock); - tcp->tcp_squeue_bytes -= msize; - mutex_exit(&connp->conn_lock); + ASSERT(DB_TYPE(mp) == M_DATA); + msize = (mp->b_cont == NULL) ? MBLKL(mp) : msgdsize(mp); - if (tcp_fuse_output(tcp, mp, msize)) - return; - } + mutex_enter(&connp->conn_lock); + tcp->tcp_squeue_bytes -= msize; + mutex_exit(&connp->conn_lock); + + /* Bypass tcp protocol for fused tcp loopback */ + if (tcp->tcp_fused && tcp_fuse_output(tcp, mp, msize)) + return; mss = tcp->tcp_mss; if (tcp->tcp_xmit_zc_clean) @@ -16824,11 +16824,6 @@ tcp_output(void *arg, mblk_t *mp, void *arg2) (len == 0) || (len > mss) || (tcp->tcp_valid_bits != 0)) { - msize = msgdsize(mp); - mutex_enter(&connp->conn_lock); - tcp->tcp_squeue_bytes -= msize; - mutex_exit(&connp->conn_lock); - tcp_wput_data(tcp, mp, B_FALSE); return; } @@ -16836,10 +16831,6 @@ tcp_output(void *arg, mblk_t *mp, void *arg2) ASSERT(tcp->tcp_xmit_tail_unsent == 0); ASSERT(tcp->tcp_fin_sent == 0); - mutex_enter(&connp->conn_lock); - tcp->tcp_squeue_bytes -= len; - mutex_exit(&connp->conn_lock); - /* queue new packet onto retransmission queue */ if (tcp->tcp_xmit_head == NULL) { tcp->tcp_xmit_head = mp; diff --git a/usr/src/uts/common/inet/udp/udp.c b/usr/src/uts/common/inet/udp/udp.c index 3888f36ce2..0784151525 100644 --- a/usr/src/uts/common/inet/udp/udp.c +++ b/usr/src/uts/common/inet/udp/udp.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1990 Mentat Inc. */ @@ -358,6 +358,11 @@ static struct qinit udp_winit = { &udp_info, NULL, NULL, NULL, STRUIOT_NONE }; +static struct qinit winit = { + (pfi_t)putnext, NULL, NULL, NULL, NULL, + &udp_info, NULL, NULL, NULL, STRUIOT_NONE +}; + /* Support for just SNMP if UDP is not pushed directly over device IP */ struct qinit udp_snmp_rinit = { (pfi_t)putnext, NULL, udp_open, ip_snmpmod_close, NULL, @@ -370,7 +375,7 @@ struct qinit udp_snmp_winit = { }; struct streamtab udpinfo = { - &udp_rinit, &udp_winit + &udp_rinit, &winit }; static sin_t sin_null; /* Zero address for quick clears */ @@ -2860,6 +2865,8 @@ udp_open(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *credp) udp->udp_max_hdr_len + udp_wroff_extra); (void) mi_set_sth_hiwat(UDP_RD(q), udp_set_rcv_hiwat(udp, q->q_hiwat)); + WR(UDP_RD(q))->q_qinfo = &udp_winit; + return (0); } |