Title: Substrate Control: Common Type Definitions
1Substrate ControlCommon Type Definitions
- Fred Kuhns
- fredk_at_arl.wustl.edu
- Applied Research Laboratory
- Washington University in St. Louis
2Simple Types
- bw_t unsigned 32-bit Bandwidth units are Kb/s
- cnt_t unsigned 32-bit item count or system
counter value - len_t unsigned 16-bit count
- tStamp_t unsigned 32-bit time stamp.
- dwX_t Defines a generic X-Byte data word of
integral type - Assume twos complement representation of integer
values, NBO on the wire. - plabID_t unsigned 32-bit, globally unique slice
ID assigned by PLC - name_t len_t len ucharlen
- string representation on the wire
- fpID_t unsigned 16-bit, Fast path identifier
(fpID) - Slice fpid range 0, N)
- Substrate range 1, M) (0 represents the global
namespace) - ctxID_t unsigned 16-bit, Message context ID.
- 0 used for substrate/ privileged context
otherwise fpid - retCode_t signed 32-bit return code returned by
server methods. - 0 must always represent success (see
wusppretCode_t)
3Simple Types
- qid_t unsigned 16-bit, Slice relative qid
- Ranges Slice 0, N) Substrate 1, M)
- fid_t unsigned 32-bit filter identifier
- Range Slice and Substrate 0, N)
- Address/Network related
- ipAddr_t unsigned 32-bit IP address
- always in network byte order (NBO)
- ipPort_t unsigned 16-bit UDP/TCP Port number
or ICMP ID - always in NBO
- ipProto_t unsigned 8-bit IP header protocol
field - TCP6,UDP17, ICMP1
- hwaddr_t array of 6 uint8_t Ethernet MAC
Address - vlanID_t unsigned 16-bit VLAN identifier
4Interfaces, Meta-Interfaces and Endpoints
- ifn_t unsigned 16-bit Logical interface number
(aka link id). - no correspondence to physical interface number
used as interface index in NPE TCAM filters - miID_t unsigned 16-bit fast path relative
Meta-Interface number - Ranges Slice relative only, 0, N)
- ifType_t unsigned 16-bit Interface type
- 0 Public Internet 1 SPP Peering
- Endpoints
- struct epoint_t ipAddr_t
ipPort_t ipProto_t - struct epInfo_t bw_t bw epoint_t ep
- struct ifAttr_t ifn_t ifn
ifType_t type ipAddr_t ipaddr
bw_t link bw_t
avail - if_list ifAttr_t, ...
5FastPath Related Types
- Specify fastpath NP resources
- fpParams_t copt_t, bwspec_t, rcnts_t, mem_t
- copt_t unsigned 16-bit code option identifier
- Defined code options Invalid 0, IPv4 1, i3
2 - struct bwspec_t bw_t firm bw_t soft
- Aggregate BW requirements for fastpath across all
interfaces - bw-firm Expresses the required aggregate
processing resources in terms of BW, units are
Kbps. - bw-soft A hint as to the expected max required
processing resources. Resources are not actually
allocated to the fast-path, rather the system
uses this number for load balancing best-effort
fast-paths across available NPEs. - struct rcnts_t cnt_t fltrs cnt_t
queues cnt_t buffers cnt_t stats - Max resource counts
- struct mem_t cnt_t sram cnt_t dram
- Requested size in Bytes (may be fixed by code
option) - Data describing an instantiated fastpaths NP
resources, returned to slice - struct fpInfo_t fpID_t fpid // Slice
relative fast-path id, starts at 0 ipAddr_t
npeIP // FP addr on the NPE epoint_t ldAddr
// Local Delivery UDP Port epoint_t exAddr //
Exception traffic UDP Port
6Reservations
- rdate_t date_t start date_t end
- date_t YYYYMMDDHHMMSS
- Always 14 Bytes
- Not null terminated on wire
- Interface BW requirements
- ifParams_t cnt_t, ifRec_t
- ifRec_t bw_t, ipAddr_t
- Reservation Records
- fpRSpec_t fpParams_t, ifParams_t, name_t fpName
- Defines resources required for one fastpath
instance - plRSpec_t ifParams_t
- rsvRecord_t rdate_t cnt_t fpCnt fpRSpec_tf
pCnt plRSpec - List all resource allocations for a given
interval of time.
7Filters
- typedef dw1_t fltrKey_tCOPT_KEY_SIZE // 14
Bytes - struct fpKeyWrap_t uchar type // 0 Normal,
1 substrate only (i.e. tunnel) miID_t rxmi //
Receiving meta-interface ID fltrKey_t coptKey
// Code option specific lookup key - struct fpFltrResult_t dw1_t actions // 0
forward, 1 local, 2 drop, 3 drop and
local?? ipAddr_t daddr // UDP tunnels
destination IP ipPort_t dport // UDP tunnels
destination port qid_t qid // Slice
relative queue ID statID_t sindx // stats
index - struct fpFltr_t fpKeyWrap_t
keyWrap fltrKey_t coptMask
fpFltrResult_t result
8Misc Types
- sid_t unsigned 16-bit (Absolute) Scheduler Id
- There are a total of 20 schedulers split across 4
queue managers - range 0, 20)
- 5 schedulers per QM 4 QMs
- Queue Manager ID qmID_t sid / 5
- QMs scheduler ID schedID_t sid 5
- qmID_t unsigned Byte 2-bit QM identifier
- schID_t unsigned Byte 3-bit qm relative
scheduler identifier - sched_map_t qmID_t qmID schID_t
schID qid_t qid statID_t sindx vlanID_t
vid
9IPv4 Filter Formats (Slices view)
Defined by the IPv4 Code Option, 14 Bytes
Substrate
rx miID
daddr
saddr
sport
dport
tcp/proto
type
32
32
16
16
16
16
8
Type 0 gt Normal Lookup 1 gt Substrate only
lookup
6
8
2
Result
TX IP daddr
TX dport
sindx
qid
L
D
32
16
16
16
8
Destination Address of UDP egress tunnel
actions
D Drop packet L Local delivery
- RMP translations (see next page)
- rx miID to rxPort and input IP address
- result qid to ingress meta-interface ID
- SCD translations
- input IP address to ifindx
- Slice relative IDs to global IDs (qid, sindx,
fid) - fastpath ID (message context ID) to vlan
- TX miID to corresponding scheduler and QM IDs
10IPv4 TCAM Filter Formats (on NPE)
Defined by the IPv4 Code Option, 112bits
Substrate defined
daddr
saddr
sport
dport
tcp/proto
vlan
if
T
RX port
11
1
16
4
32
32
16
16
16
Represents input meta-interface
6
8
2
T 0 Normal Lookup T 1 substrate only lookup
Result, 128 bits
TX IP daddr
TX dport
TX sport
rsv
QM
sindx
Sch
qid
rsv
L
D
rsv
32
16
12
15
16
3
2
16
11
3
1
1
TX sport represents the output meta-interface.
The TX IP addres and dport is provided by the
slice. (RMP maps miid to tx tunnel params, use
dport provided by slice)
global stats index (SCD maps slices sindx to
global value)
20-bit internal qid (SCD maps slices miid to QM
and Sch. SCD Also maps slices qid to global qid
value)
D Drop packet L Local delivery
Slice parameters
Key Input miid, IPv4 fltr daddr, saddr, sport,
dport, tcp/proto
Result Flags Drop, GPE, sindx, Output miID, QID
11Stats (accessing FP instance specific counters)
- struct statRec_t cnt_t cnt tStamp_t
tstamp - flags dw1_t, bit vector.
- see figure to the right
- handle unsigned 32-bit
- opaque reference to periodic event
- statID_t unsigned 32-bit Stats Index
- Ranges Slice 0, N), Substrate 0, M)