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