-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathenum.go
69 lines (51 loc) · 1.63 KB
/
enum.go
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
package iface
//go:generate go run ../mk/enumgen/ -guard=NDNDPDK_IFACE_ENUM_H -out=../csrc/iface/enum.h .
import "strconv"
const (
// MaxBurstSize is the maximum and default burst size.
MaxBurstSize = 64
// MaxInputDemuxDest is the maximum number of destinations in InputDemux.
MaxInputDemuxDest = 128
// MaxFaceRxThreads is the maximum number of RX threads in a face.
MaxFaceRxThreads = 8
// MaxFaceTxThreads is the maximum number of TX threads in a face.
MaxFaceTxThreads = 1
// MinReassemblerCapacity is the minimum partial message store capacity in the reassembler.
MinReassemblerCapacity = 4
// MaxReassemblerCapacity is the maximum partial message store capacity in the reassembler.
MaxReassemblerCapacity = 8192
// DefaultReassemblerCapacity is the default partial message store capacity in the reassembler.
DefaultReassemblerCapacity = 64
// MinOutputQueueSize is the minimum packet queue capacity before the output thread.
MinOutputQueueSize = 256
// DefaultOutputQueueSize is the default packet queue capacity before the output thread.
DefaultOutputQueueSize = 1024
// MinMTU is the minimum value of Maximum Transmission Unit (MTU).
MinMTU = 960
// MaxMTU is the maximum value of Maximum Transmission Unit (MTU).
MaxMTU = 65000
_ = "enumgen"
)
// State indicates face state.
type State uint8
// State values.
const (
StateUnused = iota
StateUp
StateDown
StateRemoved
_ = "enumgen:FaceState:Face"
)
func (st State) String() string {
switch st {
case StateUnused:
return "unused"
case StateUp:
return "up"
case StateDown:
return "down"
case StateRemoved:
return "removed"
}
return strconv.Itoa(int(st))
}