From 9b15f282952b12d1761c03ee48293baecaf32d0c Mon Sep 17 00:00:00 2001 From: Pierre Pfister Date: Thu, 15 Sep 2016 13:45:31 +0100 Subject: Add ILA API and API test plugin VPP-412 The ILA plugin could only be configured through CLI. This patch adds API support to ila_interface and ila_add_del_entry functions. The patch also adds a test plugin for vpp_api_test. Change-Id: I35d96c4e56bb32862cd08cc86a9fa25ff56ef583 Signed-off-by: Pierre Pfister --- plugins/ila-plugin/ila/ila.api | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 plugins/ila-plugin/ila/ila.api (limited to 'plugins/ila-plugin/ila/ila.api') diff --git a/plugins/ila-plugin/ila/ila.api b/plugins/ila-plugin/ila/ila.api new file mode 100644 index 00000000000..9315fbb02d0 --- /dev/null +++ b/plugins/ila-plugin/ila/ila.api @@ -0,0 +1,62 @@ +/** \brief Enable ILA processing of SIR-to-ILA packets on a given interface. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - The software interface index. + @param enable - Enable if not null, disable otherwise. +*/ +define ila_iface +{ + u32 client_index; + u32 context; + u32 sw_if_index; + u8 enable; +}; + +define ila_iface_reply { + u32 context; + i32 retval; +}; + +/** \brief Add or delete an ILA entry. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param type - The ILA type to be used. + Supported values: + 0: Interface Identifier (iid) + 1: Locally Unique Identifier (luid) + 3: IPv6 Virtual Network Identifier (vnid-ip6) + 4: Multicast Virtual Network Identifier (vnid-multicast) + @param sir_address - Standard Identifier Representation address which uniquely + identifies the ILA entry. + @param local_adj_index - The local FIB index if the entry is a local entry, + ~0 if the entry is not local (only used to translate from SIR to ILA). + @param csum_mode - The checksum mode for this entry. + Supported values: + 0: No action + 1: Neutral Mapping + 2: Adjust for Transport Layer + @param dir - The translation direction + Supported values: + 0: Bidirection + 1: SIR to ILA only + 2: ILA to SIR only + @param is_del - Whether the entry with the given SIR address should be deleted. +*/ +define ila_add_del_entry { + u32 client_index; + u32 context; + u8 type; + u8 sir_address[16]; + u64 locator; + u32 vnid; + u32 local_adj_index; + u8 csum_mode; + u8 dir; + u8 is_del; +}; + +define ila_add_del_entry_reply { + u32 context; + i32 retval; +}; + -- cgit 1.2.3-korg