7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 * Copyright (c) 2017 OmniTI Computer Consulting, Inc. All rights reserved.
26 * Copyright (c) 2016 by Delphix. All rights reserved.
27 * Copyright (c) 2018 Joyent, Inc. All rights reserved.
28 */
29
30 #include <sys/types.h>
31 #include <sys/stream.h>
32 #include <sys/dlpi.h>
33 #include <sys/stropts.h>
34 #include <sys/sysmacros.h>
35 #include <sys/strsubr.h>
36 #include <sys/strlog.h>
37 #include <sys/strsun.h>
38 #include <sys/zone.h>
39 #define _SUN_TPI_VERSION 2
40 #include <sys/tihdr.h>
41 #include <sys/xti_inet.h>
42 #include <sys/ddi.h>
43 #include <sys/suntpi.h>
44 #include <sys/cmn_err.h>
45 #include <sys/debug.h>
46 #include <sys/kobj.h>
47 #include <sys/modctl.h>
13920 kstat_t *ksp;
13921
13922 ip_stat_t template = {
13923 { "ip_udp_fannorm", KSTAT_DATA_UINT64 },
13924 { "ip_udp_fanmb", KSTAT_DATA_UINT64 },
13925 { "ip_recv_pullup", KSTAT_DATA_UINT64 },
13926 { "ip_db_ref", KSTAT_DATA_UINT64 },
13927 { "ip_notaligned", KSTAT_DATA_UINT64 },
13928 { "ip_multimblk", KSTAT_DATA_UINT64 },
13929 { "ip_opt", KSTAT_DATA_UINT64 },
13930 { "ipsec_proto_ahesp", KSTAT_DATA_UINT64 },
13931 { "ip_conn_flputbq", KSTAT_DATA_UINT64 },
13932 { "ip_conn_walk_drain", KSTAT_DATA_UINT64 },
13933 { "ip_out_sw_cksum", KSTAT_DATA_UINT64 },
13934 { "ip_out_sw_cksum_bytes", KSTAT_DATA_UINT64 },
13935 { "ip_in_sw_cksum", KSTAT_DATA_UINT64 },
13936 { "ip_ire_reclaim_calls", KSTAT_DATA_UINT64 },
13937 { "ip_ire_reclaim_deleted", KSTAT_DATA_UINT64 },
13938 { "ip_nce_reclaim_calls", KSTAT_DATA_UINT64 },
13939 { "ip_nce_reclaim_deleted", KSTAT_DATA_UINT64 },
13940 { "ip_dce_reclaim_calls", KSTAT_DATA_UINT64 },
13941 { "ip_dce_reclaim_deleted", KSTAT_DATA_UINT64 },
13942 { "ip_tcp_in_full_hw_cksum_err", KSTAT_DATA_UINT64 },
13943 { "ip_tcp_in_part_hw_cksum_err", KSTAT_DATA_UINT64 },
13944 { "ip_tcp_in_sw_cksum_err", KSTAT_DATA_UINT64 },
13945 { "ip_udp_in_full_hw_cksum_err", KSTAT_DATA_UINT64 },
13946 { "ip_udp_in_part_hw_cksum_err", KSTAT_DATA_UINT64 },
13947 { "ip_udp_in_sw_cksum_err", KSTAT_DATA_UINT64 },
13948 { "conn_in_recvdstaddr", KSTAT_DATA_UINT64 },
13949 { "conn_in_recvopts", KSTAT_DATA_UINT64 },
13950 { "conn_in_recvif", KSTAT_DATA_UINT64 },
13951 { "conn_in_recvslla", KSTAT_DATA_UINT64 },
13952 { "conn_in_recvucred", KSTAT_DATA_UINT64 },
13953 { "conn_in_recvttl", KSTAT_DATA_UINT64 },
13954 { "conn_in_recvhopopts", KSTAT_DATA_UINT64 },
13955 { "conn_in_recvhoplimit", KSTAT_DATA_UINT64 },
13956 { "conn_in_recvdstopts", KSTAT_DATA_UINT64 },
13957 { "conn_in_recvrthdrdstopts", KSTAT_DATA_UINT64 },
13958 { "conn_in_recvrthdr", KSTAT_DATA_UINT64 },
13959 { "conn_in_recvpktinfo", KSTAT_DATA_UINT64 },
|
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 * Copyright (c) 2017 OmniTI Computer Consulting, Inc. All rights reserved.
26 * Copyright (c) 2016 by Delphix. All rights reserved.
27 * Copyright (c) 2019 Joyent, Inc. All rights reserved.
28 */
29
30 #include <sys/types.h>
31 #include <sys/stream.h>
32 #include <sys/dlpi.h>
33 #include <sys/stropts.h>
34 #include <sys/sysmacros.h>
35 #include <sys/strsubr.h>
36 #include <sys/strlog.h>
37 #include <sys/strsun.h>
38 #include <sys/zone.h>
39 #define _SUN_TPI_VERSION 2
40 #include <sys/tihdr.h>
41 #include <sys/xti_inet.h>
42 #include <sys/ddi.h>
43 #include <sys/suntpi.h>
44 #include <sys/cmn_err.h>
45 #include <sys/debug.h>
46 #include <sys/kobj.h>
47 #include <sys/modctl.h>
13920 kstat_t *ksp;
13921
13922 ip_stat_t template = {
13923 { "ip_udp_fannorm", KSTAT_DATA_UINT64 },
13924 { "ip_udp_fanmb", KSTAT_DATA_UINT64 },
13925 { "ip_recv_pullup", KSTAT_DATA_UINT64 },
13926 { "ip_db_ref", KSTAT_DATA_UINT64 },
13927 { "ip_notaligned", KSTAT_DATA_UINT64 },
13928 { "ip_multimblk", KSTAT_DATA_UINT64 },
13929 { "ip_opt", KSTAT_DATA_UINT64 },
13930 { "ipsec_proto_ahesp", KSTAT_DATA_UINT64 },
13931 { "ip_conn_flputbq", KSTAT_DATA_UINT64 },
13932 { "ip_conn_walk_drain", KSTAT_DATA_UINT64 },
13933 { "ip_out_sw_cksum", KSTAT_DATA_UINT64 },
13934 { "ip_out_sw_cksum_bytes", KSTAT_DATA_UINT64 },
13935 { "ip_in_sw_cksum", KSTAT_DATA_UINT64 },
13936 { "ip_ire_reclaim_calls", KSTAT_DATA_UINT64 },
13937 { "ip_ire_reclaim_deleted", KSTAT_DATA_UINT64 },
13938 { "ip_nce_reclaim_calls", KSTAT_DATA_UINT64 },
13939 { "ip_nce_reclaim_deleted", KSTAT_DATA_UINT64 },
13940 { "ip_nce_mcast_reclaim_calls", KSTAT_DATA_UINT64 },
13941 { "ip_nce_mcast_reclaim_deleted", KSTAT_DATA_UINT64 },
13942 { "ip_nce_mcast_reclaim_tqfail", KSTAT_DATA_UINT64 },
13943 { "ip_dce_reclaim_calls", KSTAT_DATA_UINT64 },
13944 { "ip_dce_reclaim_deleted", KSTAT_DATA_UINT64 },
13945 { "ip_tcp_in_full_hw_cksum_err", KSTAT_DATA_UINT64 },
13946 { "ip_tcp_in_part_hw_cksum_err", KSTAT_DATA_UINT64 },
13947 { "ip_tcp_in_sw_cksum_err", KSTAT_DATA_UINT64 },
13948 { "ip_udp_in_full_hw_cksum_err", KSTAT_DATA_UINT64 },
13949 { "ip_udp_in_part_hw_cksum_err", KSTAT_DATA_UINT64 },
13950 { "ip_udp_in_sw_cksum_err", KSTAT_DATA_UINT64 },
13951 { "conn_in_recvdstaddr", KSTAT_DATA_UINT64 },
13952 { "conn_in_recvopts", KSTAT_DATA_UINT64 },
13953 { "conn_in_recvif", KSTAT_DATA_UINT64 },
13954 { "conn_in_recvslla", KSTAT_DATA_UINT64 },
13955 { "conn_in_recvucred", KSTAT_DATA_UINT64 },
13956 { "conn_in_recvttl", KSTAT_DATA_UINT64 },
13957 { "conn_in_recvhopopts", KSTAT_DATA_UINT64 },
13958 { "conn_in_recvhoplimit", KSTAT_DATA_UINT64 },
13959 { "conn_in_recvdstopts", KSTAT_DATA_UINT64 },
13960 { "conn_in_recvrthdrdstopts", KSTAT_DATA_UINT64 },
13961 { "conn_in_recvrthdr", KSTAT_DATA_UINT64 },
13962 { "conn_in_recvpktinfo", KSTAT_DATA_UINT64 },
|