aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-12-20 14:05:46 +0100
committerDamjan Marion <damarion@cisco.com>2016-12-21 22:20:14 +0100
commit8b2b794ae99a2316caebceb65a5ab16f75536d6b (patch)
treed3551604554db51b5ebcd2c8cdc55612f574a262 /vpp
parentbbe3362948415a6fcee8246cc2e419240395d5d4 (diff)
API refactoring : netmap
Change-Id: I0e1ba784b09c00d2ae5ea51128dcba09d06f8766 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/vpp-api/api.c41
-rw-r--r--vpp/vpp-api/vpe.api55
2 files changed, 1 insertions, 95 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index 496c577e..2a38cb3c 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -83,7 +83,6 @@
#include <vnet/ip/ip6_hop_by_hop.h>
#include <vnet/ip/ip_source_and_port_range_check.h>
#include <vnet/policer/policer.h>
-#include <vnet/devices/netmap/netmap.h>
#include <vnet/flow/flow_report.h>
#include <vnet/ipsec-gre/ipsec_gre.h>
#include <vnet/flow/flow_report_classify.h>
@@ -268,8 +267,6 @@ _(POLICER_ADD_DEL, policer_add_del) \
_(POLICER_DUMP, policer_dump) \
_(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
_(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
-_(NETMAP_CREATE, netmap_create) \
-_(NETMAP_DELETE, netmap_delete) \
_(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
_(MPLS_TUNNEL_DETAILS, mpls_tunnel_details) \
_(MPLS_FIB_DUMP, mpls_fib_dump) \
@@ -5666,44 +5663,6 @@ vl_api_policer_classify_dump_t_handler (vl_api_policer_classify_dump_t * mp)
}
static void
-vl_api_netmap_create_t_handler (vl_api_netmap_create_t * mp)
-{
- vlib_main_t *vm = vlib_get_main ();
- vl_api_netmap_create_reply_t *rmp;
- int rv = 0;
- u8 *if_name = NULL;
-
- if_name = format (0, "%s", mp->netmap_if_name);
- vec_add1 (if_name, 0);
-
- rv =
- netmap_create_if (vm, if_name, mp->use_random_hw_addr ? 0 : mp->hw_addr,
- mp->is_pipe, mp->is_master, 0);
-
- vec_free (if_name);
-
- REPLY_MACRO (VL_API_NETMAP_CREATE_REPLY);
-}
-
-static void
-vl_api_netmap_delete_t_handler (vl_api_netmap_delete_t * mp)
-{
- vlib_main_t *vm = vlib_get_main ();
- vl_api_netmap_delete_reply_t *rmp;
- int rv = 0;
- u8 *if_name = NULL;
-
- if_name = format (0, "%s", mp->netmap_if_name);
- vec_add1 (if_name, 0);
-
- rv = netmap_delete_if (vm, if_name);
-
- vec_free (if_name);
-
- REPLY_MACRO (VL_API_NETMAP_DELETE_REPLY);
-}
-
-static void
vl_api_mpls_tunnel_details_t_handler (vl_api_mpls_fib_details_t * mp)
{
clib_warning ("BUG");
diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api
index 48171970..38561b67 100644
--- a/vpp/vpp-api/vpe.api
+++ b/vpp/vpp-api/vpe.api
@@ -27,6 +27,7 @@
* TAP APIs: see .../vnet/vnet/unix/{tap.api, tap_api.c}
* VXLAN APIs: see .../vnet/vnet/vxlan/{vxlan.api, vxlan_api.c}
* AF-PACKET APIs: ... see /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
+ * NETMAP APIs: see ... /vnet/vnet/devices/netmap/{netmap.api, netmap_api.c}
*/
/** \brief Create a new subinterface with the given vlan id
@@ -3686,60 +3687,6 @@ define policer_classify_details
u32 table_index;
};
-/** \brief Create netmap
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
- @param netmap_if_name - interface name
- @param hw_addr - interface MAC
- @param use_random_hw_addr - use random generated MAC
- @param is_pipe - is pipe
- @param is_master - 0=slave, 1=master
-*/
-define netmap_create
-{
- u32 client_index;
- u32 context;
-
- u8 netmap_if_name[64];
- u8 hw_addr[6];
- u8 use_random_hw_addr;
- u8 is_pipe;
- u8 is_master;
-};
-
-/** \brief Create netmap response
- @param context - sender context, to match reply w/ request
- @param retval - return value for request
-*/
-define netmap_create_reply
-{
- u32 context;
- i32 retval;
-};
-
-/** \brief Delete netmap
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
- @param netmap_if_name - interface name
-*/
-define netmap_delete
-{
- u32 client_index;
- u32 context;
-
- u8 netmap_if_name[64];
-};
-
-/** \brief Delete netmap response
- @param context - sender context, to match reply w/ request
- @param retval - return value for request
-*/
-define netmap_delete_reply
-{
- u32 context;
- i32 retval;
-};
-
/** \brief Classify get table IDs request
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request