summaryrefslogtreecommitdiffstats
path: root/sys/dev/hatm/if_hatmconf.h
blob: 5402697410d721414722e990e4fe92afe93dd978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*-
 * Copyright (c) 2001-2003
 *	Fraunhofer Institute for Open Communication Systems (FhG Fokus).
 * 	All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * Author: Hartmut Brandt <harti@freebsd.org>
 *
 * $FreeBSD$
 *
 * Default configuration
 */

/* configuration */
#define HE_CONFIG_VPI_BITS	2
#define HE_CONFIG_VCI_BITS	10

/* interrupt group 0 only */
/* the size must be 1 <= size <= 1023 */
#define HE_CONFIG_IRQ0_SIZE	256
#define HE_CONFIG_IRQ0_THRESH	224		/* retrigger interrupt */
#define HE_CONFIG_IRQ0_LINE	HE_REGM_IRQ_A	/* routing */

/* don't change these */
#define HE_CONFIG_TXMEM		(128 * 1024)	/* words */
#define HE_CONFIG_RXMEM		(64 * 1024)	/* words */
#define HE_CONFIG_LCMEM		(512 * 1024)	/* words */

/* group 0 - all AALs except AAL.raw */
/* receive group 0 buffer pools (mbufs and mbufs+cluster) */
/* the size must be a power of 2: 4 <= size <= 8192 */
#define HE_CONFIG_RBPS0_SIZE	2048	/* entries per queue */
#define HE_CONFIG_RBPS0_THRESH	256	/* interrupt threshold */
#define HE_CONFIG_RBPL0_SIZE	512	/* entries per queue */
#define HE_CONFIG_RBPL0_THRESH	32	/* interrupt threshold */

/* receive group 0 buffer return queue */
/* the size must be a power of 2: 1 <= size <= 16384 */
#define HE_CONFIG_RBRQ0_SIZE	512	/* entries in queue */
#define HE_CONFIG_RBRQ0_THRESH	256	/* interrupt threshold */
#define HE_CONFIG_RBRQ0_TOUT	10	/* interrupt timeout */
#define HE_CONFIG_RBRQ0_PCNT	5	/* packet count threshold */

/* group 1 - raw cells */
/* receive group 1 small buffer pool */
/* the size must be a power of 2: 4 <= size <= 8192 */
#define HE_CONFIG_RBPS1_SIZE	1024	/* entries in queue */
#define HE_CONFIG_RBPS1_THRESH	512	/* interrupt threshold */

/* receive group 1 buffer return queue */
/* the size must be a power of 2: 1 <= size <= 16384 */
#define HE_CONFIG_RBRQ1_SIZE	512	/* entries in queue */
#define HE_CONFIG_RBRQ1_THRESH	256	/* interrupt threshold */
#define HE_CONFIG_RBRQ1_TOUT	100	/* interrupt timeout */
#define HE_CONFIG_RBRQ1_PCNT	25	/* packet count threshold */

/* there is only one TPD queue */
/* the size must be a power of 2: 1 <= size <= 4096 */
#define HE_CONFIG_TPDRQ_SIZE	2048	/* entries in queue */

/* transmit group 0 */
/* the size must be a power of 2: 1 <= size <= 16384 */
#define HE_CONFIG_TBRQ_SIZE	512	/* entries in queue */
#define HE_CONFIG_TBRQ_THRESH	400	/* interrupt threshold */

/* Maximum number of TPDs to allocate to a single VCC. This
 * number should depend on the cell rate and the maximum allowed cell delay */
#define HE_CONFIG_TPD_MAXCC	2048

/* Maximum number of external mbuf pages */
#define HE_CONFIG_MAX_MBUF_PAGES	256

/* Maximum number of TPDs used for one packet */
#define HE_CONFIG_MAX_TPD_PER_PACKET			\
	((((HE_MAX_PDU + MCLBYTES - 1) / MCLBYTES + 2) / 3) + 2)

/* Number of TPDs to reserve for close operations */
#define HE_CONFIG_TPD_RESERVE	32

/* Number of TPDs per VCC when to re-enable flow control */
#define HE_CONFIG_TPD_FLOW_ENB	80

/* MCR for flushing CBR and ABR connections at close */
#define HE_CONFIG_FLUSH_RATE	200000
OpenPOWER on IntegriCloud