FD.io VPP
v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
nsh.api
Go to the documentation of this file.
1
2
3
/** \brief
/** \brief Set or delete an NSH header entry keyed by NSP/NSI
4
@param client_index - opaque cookie to identify the sender
5
@param context - sender context, to match reply w/ request
6
@param is_add - add address if non-zero, else delete
7
@param nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
8
@param md_type - metadata type [1|2] - only MDType1 supported today
9
@param ver_o_c - version, O-bit and C-bit (see nsh_packet.h)
10
@param ttl - indicates the maximum SFF hops for an SFP
11
@param length - header length in n x 32bits, should be 6 for MDtype1
12
@param next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6
13
@param c1 - 32bit Metadata type1 field (context1)
14
@param c2 - 32bit Metadata type1 field (context2)
15
@param c3 - 32bit Metadata type1 field (context3)
16
@param c4 - 32bit Metadata type1 field (context4)
17
@param tlvs - Metadata Type 2 only, Type Length Value metadata.
18
*/
19
define nsh_add_del_entry {
20
u32 client_index;
21
u32 context;
22
u8 is_add;
23
u32 nsp_nsi;
24
u8 md_type;
25
u8 ver_o_c;
26
u8 ttl;
27
u8 length;
28
u8 next_protocol;
29
u32 c1;
30
u32 c2;
31
u32 c3;
32
u32 c4;
33
u8 tlv_length;
34
u8 tlv[248];
35
};
36
37
/** \brief Reply from adding NSH entry (nsh_add_del_entry)
38
@param context - sender context, to match reply w/ request
39
@param retval - 0 means all ok
40
*/
41
define nsh_add_del_entry_reply {
42
u32 context;
43
i32 retval;
44
u32 entry_index;
45
};
46
47
48
define nsh_entry_dump {
49
u32 client_index;
50
u32 context;
51
u32 entry_index;
52
};
53
54
define nsh_entry_details {
55
u32 context;
56
u32 entry_index;
57
u32 nsp_nsi;
58
u8 md_type;
59
u8 ver_o_c;
60
u8 ttl;
61
u8 length;
62
u8 next_protocol;
63
u32 c1;
64
u32 c2;
65
u32 c3;
66
u32 c4;
67
u8 tlv_length;
68
u8 tlv[248];
69
};
70
71
/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
72
@param client_index - opaque cookie to identify the sender
73
@param context - sender context, to match reply w/ request
74
@param is_add - add address if non-zero, else delete
75
@param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
76
@param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
77
if next action is to decap to NSH next protocol
78
Note the following heuristic:
79
- if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
80
- if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
81
Note: these are heuristics. Rules about NSI decrement are out of scope
82
@param sw_if_index - index number of outer encap for NSH egress
83
@param next_node - explicitly which node to send to
84
Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
85
*/
86
define nsh_add_del_map {
87
u32 client_index;
88
u32 context;
89
u8 is_add;
90
u32 nsp_nsi;
91
u32 mapped_nsp_nsi;
92
u32 nsh_action;
93
u32 sw_if_index;
94
u32 rx_sw_if_index;
95
u32 next_node;
96
};
97
98
/** \brief Reply from adding NSH map (nsh_add_del_map)
99
@param context - sender context, to match reply w/ request
100
@param retval - 0 means all ok
101
*/
102
define nsh_add_del_map_reply {
103
u32 context;
104
i32 retval;
105
u32 map_index;
106
};
107
108
define nsh_map_dump {
109
u32 client_index;
110
u32 context;
111
u32 map_index;
112
};
113
114
define nsh_map_details {
115
u32 context;
116
u32 map_index;
117
u32 nsp_nsi;
118
u32 mapped_nsp_nsi;
119
u32 nsh_action;
120
u32 sw_if_index;
121
u32 rx_sw_if_index;
122
u32 next_node;
123
};
src
plugins
nsh
nsh.api
Generated on Mon Jun 29 2020 14:36:15 for FD.io VPP by
1.8.13