author | masputra |
Sat, 22 Oct 2005 22:50:14 -0700 | |
changeset 741 | 40027a3621ac |
parent 0 | 68f95e015346 |
child 1673 | e9d43be08d46 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* CDDL HEADER START |
|
3 |
* |
|
4 |
* The contents of this file are subject to the terms of the |
|
5 |
* Common Development and Distribution License, Version 1.0 only |
|
6 |
* (the "License"). You may not use this file except in compliance |
|
7 |
* with the License. |
|
8 |
* |
|
9 |
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 |
* or http://www.opensolaris.org/os/licensing. |
|
11 |
* See the License for the specific language governing permissions |
|
12 |
* and limitations under the License. |
|
13 |
* |
|
14 |
* When distributing Covered Code, include this CDDL HEADER in each |
|
15 |
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 |
* If applicable, add the following below this CDDL HEADER, with the |
|
17 |
* fields enclosed by brackets "[]" replaced with your own identifying |
|
18 |
* information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 |
* |
|
20 |
* CDDL HEADER END |
|
21 |
*/ |
|
22 |
/* |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
23 |
* Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
0 | 24 |
* Use is subject to license terms. |
25 |
*/ |
|
26 |
||
27 |
#ifndef _UDP_IMPL_H |
|
28 |
#define _UDP_IMPL_H |
|
29 |
||
30 |
#pragma ident "%Z%%M% %I% %E% SMI" |
|
31 |
||
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
32 |
/* |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
33 |
* UDP implementation private declarations. These interfaces are |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
34 |
* used to build the IP module and are not meant to be accessed |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
35 |
* by any modules except IP itself. They are undocumented and are |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
36 |
* subject to change without notice. |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
37 |
*/ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
38 |
|
0 | 39 |
#ifdef __cplusplus |
40 |
extern "C" { |
|
41 |
#endif |
|
42 |
||
43 |
#ifdef _KERNEL |
|
44 |
||
45 |
#include <sys/int_types.h> |
|
46 |
||
47 |
#include <netinet/in.h> |
|
48 |
#include <netinet/ip6.h> |
|
49 |
||
50 |
#include <inet/common.h> |
|
51 |
#include <inet/ip.h> |
|
52 |
||
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
53 |
#define UDP_MOD_ID 5607 |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
54 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
55 |
/* udp_mode. UDP_MT_HOT and UDP_SQUEUE are stable modes. Rest are transient */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
56 |
typedef enum { |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
57 |
UDP_MT_HOT = 0, /* UDP endpoint is MT HOT */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
58 |
UDP_MT_QUEUED = 1, /* Messages enqueued in udp_mphead */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
59 |
UDP_QUEUED_SQUEUE = 2, /* Messages enqueued in conn_sqp */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
60 |
UDP_SQUEUE = 3 /* Single threaded using squeues */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
61 |
} udp_mode_t; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
62 |
|
0 | 63 |
/* Internal udp control structure, one per open stream */ |
64 |
typedef struct udp_s { |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
65 |
uint32_t udp_state; /* TPI state */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
66 |
in_port_t udp_port; /* Port bound to this stream */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
67 |
in_port_t udp_dstport; /* Connected port */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
68 |
in6_addr_t udp_v6src; /* Source address of this stream */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
69 |
in6_addr_t udp_bound_v6src; /* Explicitly bound address */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
70 |
in6_addr_t udp_v6dst; /* Connected destination */ |
0 | 71 |
uint32_t udp_flowinfo; /* Connected flow id and tclass */ |
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
72 |
uint32_t udp_max_hdr_len; /* For write offset in stream head */ |
0 | 73 |
sa_family_t udp_family; /* Family from socket() call */ |
74 |
/* |
|
75 |
* IP format that packets transmitted from this struct should use. |
|
76 |
* Value can be IP4_VERSION or IPV6_VERSION. |
|
77 |
*/ |
|
78 |
ushort_t udp_ipversion; |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
79 |
uint32_t udp_ip_snd_options_len; /* Len of IPv4 options */ |
0 | 80 |
uchar_t *udp_ip_snd_options; /* Ptr to IPv4 options */ |
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
81 |
uint32_t udp_ip_rcv_options_len; /* Len of IPv4 options recvd */ |
0 | 82 |
uchar_t *udp_ip_rcv_options; /* Ptr to IPv4 options recvd */ |
83 |
uchar_t udp_multicast_ttl; /* IP*_MULTICAST_TTL/HOPS */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
84 |
ipaddr_t udp_multicast_if_addr; /* IP_MULTICAST_IF option */ |
0 | 85 |
uint_t udp_multicast_if_index; /* IPV6_MULTICAST_IF option */ |
86 |
int udp_bound_if; /* IP*_BOUND_IF option */ |
|
87 |
int udp_xmit_if; /* IP_XMIT_IF option */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
88 |
conn_t *udp_connp; |
0 | 89 |
uint32_t |
90 |
udp_debug : 1, /* SO_DEBUG "socket" option. */ |
|
91 |
udp_dontroute : 1, /* SO_DONTROUTE "socket" option. */ |
|
92 |
udp_broadcast : 1, /* SO_BROADCAST "socket" option. */ |
|
93 |
udp_useloopback : 1, /* SO_USELOOPBACK "socket" option */ |
|
94 |
||
95 |
udp_reuseaddr : 1, /* SO_REUSEADDR "socket" option. */ |
|
96 |
udp_dgram_errind : 1, /* SO_DGRAM_ERRIND option */ |
|
97 |
udp_recvdstaddr : 1, /* IP_RECVDSTADDR option */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
98 |
udp_recvopts : 1, /* IP_RECVOPTS option */ |
0 | 99 |
|
100 |
udp_discon_pending : 1, /* T_DISCON_REQ in progress */ |
|
101 |
udp_unspec_source : 1, /* IP*_UNSPEC_SRC option */ |
|
102 |
udp_ipv6_recvpktinfo : 1, /* IPV6_RECVPKTINFO option */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
103 |
udp_ipv6_recvhoplimit : 1, /* IPV6_RECVHOPLIMIT option */ |
0 | 104 |
|
105 |
udp_ipv6_recvhopopts : 1, /* IPV6_RECVHOPOPTS option */ |
|
106 |
udp_ipv6_recvdstopts : 1, /* IPV6_RECVDSTOPTS option */ |
|
107 |
udp_ipv6_recvrthdr : 1, /* IPV6_RECVRTHDR option */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
108 |
udp_ipv6_recvtclass : 1, /* IPV6_RECVTCLASS */ |
0 | 109 |
|
110 |
udp_ipv6_recvpathmtu : 1, /* IPV6_RECVPATHMTU */ |
|
111 |
udp_anon_priv_bind : 1, |
|
112 |
udp_exclbind : 1, /* ``exclusive'' binding */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
113 |
udp_recvif : 1, /* IP_RECVIF option */ |
0 | 114 |
|
115 |
udp_recvslla : 1, /* IP_RECVSLLA option */ |
|
116 |
udp_recvttl : 1, /* IP_RECVTTL option */ |
|
117 |
udp_recvucred : 1, /* IP_RECVUCRED option */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
118 |
udp_old_ipv6_recvdstopts : 1, /* old form of IPV6_DSTOPTS */ |
0 | 119 |
|
120 |
udp_ipv6_recvrthdrdstopts : 1, /* IPV6_RECVRTHDRDSTOPTS */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
121 |
udp_rcvhdr : 1, /* UDP_RCVHDR option */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
122 |
udp_issocket : 1, /* socket mode */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
123 |
udp_direct_sockfs : 1, /* direct calls to/from sockfs */ |
0 | 124 |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
125 |
udp_pad_to_bit_31 : 4; |
0 | 126 |
|
127 |
uint8_t udp_type_of_service; /* IP_TOS option */ |
|
128 |
uint8_t udp_ttl; /* TTL or hoplimit */ |
|
129 |
||
130 |
ip6_pkt_t udp_sticky_ipp; /* Sticky options */ |
|
131 |
uint8_t *udp_sticky_hdrs; /* Prebuilt IPv6 hdrs */ |
|
132 |
uint_t udp_sticky_hdrs_len; /* Incl. ip6h and any ip6i */ |
|
133 |
struct udp_s *udp_bind_hash; /* Bind hash chain */ |
|
134 |
struct udp_s **udp_ptpbhn; /* Pointer to previous bind hash next. */ |
|
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
135 |
udp_mode_t udp_mode; /* Current mode of operation */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
136 |
mblk_t *udp_mphead; /* Head of the queued operations */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
137 |
mblk_t *udp_mptail; /* Tail of the queued operations */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
138 |
uint_t udp_mpcount; /* Number of messages in the queue */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
139 |
uint_t udp_reader_count; /* Number of reader threads */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
140 |
uint_t udp_squeue_count; /* Number of messages in conn_sqp */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
141 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
142 |
kmutex_t udp_drain_lock; /* lock for udp_rcv_list */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
143 |
boolean_t udp_drain_qfull; /* drain queue is full */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
144 |
mblk_t *udp_rcv_list_head; /* b_next chain of mblks */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
145 |
mblk_t *udp_rcv_list_tail; /* last mblk in chain */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
146 |
uint_t udp_rcv_cnt; /* total data in rcv_list */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
147 |
uint_t udp_rcv_msgcnt; /* total messages in rcv_list */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
148 |
size_t udp_rcv_hiwat; /* receive high watermark */ |
0 | 149 |
} udp_t; |
150 |
||
151 |
/* UDP Protocol header */ |
|
152 |
/* UDP Protocol header aligned */ |
|
153 |
typedef struct udpahdr_s { |
|
154 |
in_port_t uha_src_port; /* Source port */ |
|
155 |
in_port_t uha_dst_port; /* Destination port */ |
|
156 |
uint16_t uha_length; /* UDP length */ |
|
157 |
uint16_t uha_checksum; /* UDP checksum */ |
|
158 |
} udpha_t; |
|
159 |
#define UDPH_SIZE 8 |
|
160 |
||
741
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
161 |
/* Named Dispatch Parameter Management Structure */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
162 |
typedef struct udpparam_s { |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
163 |
uint32_t udp_param_min; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
164 |
uint32_t udp_param_max; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
165 |
uint32_t udp_param_value; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
166 |
char *udp_param_name; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
167 |
} udpparam_t; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
168 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
169 |
extern udpparam_t udp_param_arr[]; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
170 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
171 |
#define udp_wroff_extra udp_param_arr[0].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
172 |
#define udp_ipv4_ttl udp_param_arr[1].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
173 |
#define udp_ipv6_hoplimit udp_param_arr[2].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
174 |
#define udp_smallest_nonpriv_port udp_param_arr[3].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
175 |
#define udp_do_checksum udp_param_arr[4].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
176 |
#define udp_smallest_anon_port udp_param_arr[5].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
177 |
#define udp_largest_anon_port udp_param_arr[6].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
178 |
#define udp_xmit_hiwat udp_param_arr[7].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
179 |
#define udp_xmit_lowat udp_param_arr[8].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
180 |
#define udp_recv_hiwat udp_param_arr[9].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
181 |
#define udp_max_buf udp_param_arr[10].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
182 |
#define udp_ndd_get_info_interval udp_param_arr[11].udp_param_value |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
183 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
184 |
/* Kstats */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
185 |
typedef struct { /* Class "net" kstats */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
186 |
kstat_named_t udp_ip_send; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
187 |
kstat_named_t udp_ip_ire_send; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
188 |
kstat_named_t udp_ire_null; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
189 |
kstat_named_t udp_drain; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
190 |
kstat_named_t udp_sock_fallback; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
191 |
kstat_named_t udp_rrw_busy; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
192 |
kstat_named_t udp_rrw_msgcnt; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
193 |
kstat_named_t udp_out_sw_cksum; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
194 |
kstat_named_t udp_out_sw_cksum_bytes; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
195 |
kstat_named_t udp_out_opt; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
196 |
kstat_named_t udp_out_err_notconn; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
197 |
kstat_named_t udp_out_err_output; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
198 |
kstat_named_t udp_out_err_tudr; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
199 |
kstat_named_t udp_in_pktinfo; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
200 |
kstat_named_t udp_in_recvdstaddr; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
201 |
kstat_named_t udp_in_recvopts; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
202 |
kstat_named_t udp_in_recvif; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
203 |
kstat_named_t udp_in_recvslla; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
204 |
kstat_named_t udp_in_recvucred; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
205 |
kstat_named_t udp_in_recvttl; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
206 |
kstat_named_t udp_in_recvhopopts; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
207 |
kstat_named_t udp_in_recvhoplimit; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
208 |
kstat_named_t udp_in_recvdstopts; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
209 |
kstat_named_t udp_in_recvrtdstopts; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
210 |
kstat_named_t udp_in_recvrthdr; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
211 |
kstat_named_t udp_in_recvpktinfo; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
212 |
kstat_named_t udp_in_recvtclass; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
213 |
#ifdef DEBUG |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
214 |
kstat_named_t udp_data_conn; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
215 |
kstat_named_t udp_data_notconn; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
216 |
#endif |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
217 |
} udp_stat_t; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
218 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
219 |
extern udp_stat_t udp_statistics; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
220 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
221 |
#define UDP_STAT(x) (udp_statistics.x.value.ui64++) |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
222 |
#define UDP_STAT_UPDATE(x, n) (udp_statistics.x.value.ui64 += (n)) |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
223 |
#ifdef DEBUG |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
224 |
#define UDP_DBGSTAT(x) UDP_STAT(x) |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
225 |
#else |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
226 |
#define UDP_DBGSTAT(x) |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
227 |
#endif /* DEBUG */ |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
228 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
229 |
extern major_t UDP6_MAJ; |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
230 |
|
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
231 |
extern int udp_opt_default(queue_t *, t_scalar_t, t_scalar_t, uchar_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
232 |
extern int udp_opt_get(queue_t *, t_scalar_t, t_scalar_t, uchar_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
233 |
extern int udp_opt_set(queue_t *, uint_t, int, int, uint_t, uchar_t *, |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
234 |
uint_t *, uchar_t *, void *, cred_t *, mblk_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
235 |
extern int udp_snmp_get(queue_t *, mblk_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
236 |
extern int udp_snmp_set(queue_t *, t_scalar_t, t_scalar_t, uchar_t *, int); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
237 |
extern void udp_close_free(conn_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
238 |
extern void udp_quiesce_conn(conn_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
239 |
extern void udp_ddi_init(void); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
240 |
extern void udp_ddi_destroy(void); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
241 |
extern void udp_resume_bind(conn_t *, mblk_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
242 |
extern void udp_conn_recv(conn_t *, mblk_t *); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
243 |
extern boolean_t udp_compute_checksum(void); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
244 |
extern void udp_wput_data(queue_t *, mblk_t *, struct sockaddr *, |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
245 |
socklen_t); |
40027a3621ac
PSARC 2005/082 Yosemite: UDP Performance Enhancement
masputra
parents:
0
diff
changeset
|
246 |
|
0 | 247 |
#endif /* _KERNEL */ |
248 |
||
249 |
#ifdef __cplusplus |
|
250 |
} |
|
251 |
#endif |
|
252 |
||
253 |
#endif /* _UDP_IMPL_H */ |