From 7db6ab03db874d030a2d56ff02036c0594b46ccc Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 30 Jan 2020 20:39:58 +0100 Subject: [PATCH] misc: deprecate netmap and ixge drivers Both are out of sync for long time... Type: refactor Change-Id: I7de3170d35330fc172501d87655dfef91998b8fe Signed-off-by: Damjan Marion --- MAINTAINERS | 6 -- .../deprecated}/ixge/CMakeLists.txt | 0 {src/plugins => extras/deprecated}/ixge/ixge.c | 0 {src/plugins => extras/deprecated}/ixge/ixge.h | 0 .../deprecated}/netmap/FEATURE.yaml | 0 .../devices => extras/deprecated}/netmap/cli.c | 0 .../devices => extras/deprecated}/netmap/device.c | 0 .../devices => extras/deprecated}/netmap/dir.dox | 0 .../deprecated}/netmap/net_netmap.h | 0 .../deprecated}/netmap/netmap.api | 0 .../devices => extras/deprecated}/netmap/netmap.c | 0 .../devices => extras/deprecated}/netmap/netmap.h | 0 .../deprecated}/netmap/netmap_api.c | 0 .../devices => extras/deprecated}/netmap/node.c | 0 src/vat/api_format.c | 101 --------------------- src/vnet/CMakeLists.txt | 20 ---- src/vnet/vnet_all_api_h.h | 1 - src/vpp/api/vpe.api | 1 - 18 files changed, 129 deletions(-) rename {src/plugins => extras/deprecated}/ixge/CMakeLists.txt (100%) rename {src/plugins => extras/deprecated}/ixge/ixge.c (100%) rename {src/plugins => extras/deprecated}/ixge/ixge.h (100%) rename {src/vnet/devices => extras/deprecated}/netmap/FEATURE.yaml (100%) rename {src/vnet/devices => extras/deprecated}/netmap/cli.c (100%) rename {src/vnet/devices => extras/deprecated}/netmap/device.c (100%) rename {src/vnet/devices => extras/deprecated}/netmap/dir.dox (100%) rename {src/vnet/devices => extras/deprecated}/netmap/net_netmap.h (100%) rename {src/vnet/devices => extras/deprecated}/netmap/netmap.api (100%) rename {src/vnet/devices => extras/deprecated}/netmap/netmap.c (100%) rename {src/vnet/devices => extras/deprecated}/netmap/netmap.h (100%) rename {src/vnet/devices => extras/deprecated}/netmap/netmap_api.c (100%) rename {src/vnet/devices => extras/deprecated}/netmap/node.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index e0afbaa2792..45fc277f99f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -86,7 +86,6 @@ F: src/vnet/classify VNET Device Drivers I: devices Y: src/vnet/devices/af_packet/FEATURE.yaml -Y: src/vnet/devices/netmap/FEATURE.yaml Y: src/vnet/devices/pipe/FEATURE.yaml M: Damjan Marion F: src/vnet/devices/ @@ -417,11 +416,6 @@ I: igmp M: Neale Ranns F: src/plugins/igmp/ -Plugin - ixge device driver -I: ixge -M: Damjan Marion -F: src/plugins/ixge/ - Plugin - L3 Cross-Connect (L3XC) I: l3xc M: Neale Ranns diff --git a/src/plugins/ixge/CMakeLists.txt b/extras/deprecated/ixge/CMakeLists.txt similarity index 100% rename from src/plugins/ixge/CMakeLists.txt rename to extras/deprecated/ixge/CMakeLists.txt diff --git a/src/plugins/ixge/ixge.c b/extras/deprecated/ixge/ixge.c similarity index 100% rename from src/plugins/ixge/ixge.c rename to extras/deprecated/ixge/ixge.c diff --git a/src/plugins/ixge/ixge.h b/extras/deprecated/ixge/ixge.h similarity index 100% rename from src/plugins/ixge/ixge.h rename to extras/deprecated/ixge/ixge.h diff --git a/src/vnet/devices/netmap/FEATURE.yaml b/extras/deprecated/netmap/FEATURE.yaml similarity index 100% rename from src/vnet/devices/netmap/FEATURE.yaml rename to extras/deprecated/netmap/FEATURE.yaml diff --git a/src/vnet/devices/netmap/cli.c b/extras/deprecated/netmap/cli.c similarity index 100% rename from src/vnet/devices/netmap/cli.c rename to extras/deprecated/netmap/cli.c diff --git a/src/vnet/devices/netmap/device.c b/extras/deprecated/netmap/device.c similarity index 100% rename from src/vnet/devices/netmap/device.c rename to extras/deprecated/netmap/device.c diff --git a/src/vnet/devices/netmap/dir.dox b/extras/deprecated/netmap/dir.dox similarity index 100% rename from src/vnet/devices/netmap/dir.dox rename to extras/deprecated/netmap/dir.dox diff --git a/src/vnet/devices/netmap/net_netmap.h b/extras/deprecated/netmap/net_netmap.h similarity index 100% rename from src/vnet/devices/netmap/net_netmap.h rename to extras/deprecated/netmap/net_netmap.h diff --git a/src/vnet/devices/netmap/netmap.api b/extras/deprecated/netmap/netmap.api similarity index 100% rename from src/vnet/devices/netmap/netmap.api rename to extras/deprecated/netmap/netmap.api diff --git a/src/vnet/devices/netmap/netmap.c b/extras/deprecated/netmap/netmap.c similarity index 100% rename from src/vnet/devices/netmap/netmap.c rename to extras/deprecated/netmap/netmap.c diff --git a/src/vnet/devices/netmap/netmap.h b/extras/deprecated/netmap/netmap.h similarity index 100% rename from src/vnet/devices/netmap/netmap.h rename to extras/deprecated/netmap/netmap.h diff --git a/src/vnet/devices/netmap/netmap_api.c b/extras/deprecated/netmap/netmap_api.c similarity index 100% rename from src/vnet/devices/netmap/netmap_api.c rename to extras/deprecated/netmap/netmap_api.c diff --git a/src/vnet/devices/netmap/node.c b/extras/deprecated/netmap/node.c similarity index 100% rename from src/vnet/devices/netmap/node.c rename to extras/deprecated/netmap/node.c diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 02e1c8d1517..8e4abc3ae98 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -5109,8 +5109,6 @@ _(gpe_add_del_iface_reply) \ _(gpe_add_del_native_fwd_rpath_reply) \ _(af_packet_delete_reply) \ _(policer_classify_set_interface_reply) \ -_(netmap_create_reply) \ -_(netmap_delete_reply) \ _(set_ipfix_exporter_reply) \ _(set_ipfix_classify_stream_reply) \ _(ipfix_classify_table_add_del_reply) \ @@ -5386,8 +5384,6 @@ _(POLICER_ADD_DEL_REPLY, policer_add_del_reply) \ _(POLICER_DETAILS, policer_details) \ _(POLICER_CLASSIFY_SET_INTERFACE_REPLY, policer_classify_set_interface_reply) \ _(POLICER_CLASSIFY_DETAILS, policer_classify_details) \ -_(NETMAP_CREATE_REPLY, netmap_create_reply) \ -_(NETMAP_DELETE_REPLY, netmap_delete_reply) \ _(MPLS_TUNNEL_DETAILS, mpls_tunnel_details) \ _(MPLS_TABLE_DETAILS, mpls_table_details) \ _(MPLS_ROUTE_DETAILS, mpls_route_details) \ @@ -17516,100 +17512,6 @@ api_policer_classify_dump (vat_main_t * vam) return ret; } -static int -api_netmap_create (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_netmap_create_t *mp; - u8 *if_name = 0; - u8 hw_addr[6]; - u8 random_hw_addr = 1; - u8 is_pipe = 0; - u8 is_master = 0; - int ret; - - clib_memset (hw_addr, 0, sizeof (hw_addr)); - - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "name %s", &if_name)) - vec_add1 (if_name, 0); - else if (unformat (i, "hw_addr %U", unformat_ethernet_address, hw_addr)) - random_hw_addr = 0; - else if (unformat (i, "pipe")) - is_pipe = 1; - else if (unformat (i, "master")) - is_master = 1; - else if (unformat (i, "slave")) - is_master = 0; - else - break; - } - - if (!vec_len (if_name)) - { - errmsg ("interface name must be specified"); - return -99; - } - - if (vec_len (if_name) > 64) - { - errmsg ("interface name too long"); - return -99; - } - - M (NETMAP_CREATE, mp); - - clib_memcpy (mp->netmap_if_name, if_name, vec_len (if_name)); - clib_memcpy (mp->hw_addr, hw_addr, 6); - mp->use_random_hw_addr = random_hw_addr; - mp->is_pipe = is_pipe; - mp->is_master = is_master; - vec_free (if_name); - - S (mp); - W (ret); - return ret; -} - -static int -api_netmap_delete (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_netmap_delete_t *mp; - u8 *if_name = 0; - int ret; - - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "name %s", &if_name)) - vec_add1 (if_name, 0); - else - break; - } - - if (!vec_len (if_name)) - { - errmsg ("interface name must be specified"); - return -99; - } - - if (vec_len (if_name) > 64) - { - errmsg ("interface name too long"); - return -99; - } - - M (NETMAP_DELETE, mp); - - clib_memcpy (mp->netmap_if_name, if_name, vec_len (if_name)); - vec_free (if_name); - - S (mp); - W (ret); - return ret; -} - static u8 * format_fib_api_path_nh_proto (u8 * s, va_list * args) { @@ -21040,9 +20942,6 @@ _(policer_classify_set_interface, \ " | sw_if_index [ip4-table ] [ip6-table ]\n" \ " [l2-table ] [del]") \ _(policer_classify_dump, "type [ip4|ip6|l2]") \ -_(netmap_create, "name [hw-addr ] [pipe] " \ - "[master|slave]") \ -_(netmap_delete, "name ") \ _(mpls_tunnel_dump, "tunnel_index ") \ _(mpls_table_dump, "") \ _(mpls_route_dump, "table-id ") \ diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt index eb96699193c..6f9f6bcc974 100644 --- a/src/vnet/CMakeLists.txt +++ b/src/vnet/CMakeLists.txt @@ -1090,7 +1090,6 @@ list(APPEND VNET_HEADERS list(APPEND VNET_MULTIARCH_SOURCES devices/virtio/vhost_user_input.c devices/virtio/vhost_user_output.c - devices/netmap/node.c devices/virtio/node.c devices/af_packet/node.c devices/virtio/device.c @@ -1202,7 +1201,6 @@ list(APPEND VNET_SOURCES ) list(APPEND VNET_MULTIARCH_SOURCES - devices/netmap/device.c devices/af_packet/device.c ) @@ -1212,24 +1210,6 @@ list(APPEND VNET_HEADERS list(APPEND VNET_API_FILES devices/af_packet/af_packet.api) -############################################################################## -# NETMAP interface -############################################################################## - -list(APPEND VNET_SOURCES - devices/netmap/netmap.c - devices/netmap/device.c - devices/netmap/node.c - devices/netmap/cli.c - devices/netmap/netmap_api.c -) - -list(APPEND VNET_HEADERS - devices/netmap/netmap.h -) - -list(APPEND VNET_API_FILES devices/netmap/netmap.api) - ############################################################################## # Driver feature graph arc support ############################################################################## diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h index a0bf8f72d14..400caf5b513 100644 --- a/src/vnet/vnet_all_api_h.h +++ b/src/vnet/vnet_all_api_h.h @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/vpp/api/vpe.api b/src/vpp/api/vpe.api index deab6a22593..7846b8f34d7 100644 --- a/src/vpp/api/vpe.api +++ b/src/vpp/api/vpe.api @@ -32,7 +32,6 @@ import "vpp/api/vpe_types.api"; * GENEVE APIs: see .../src/vnet/geneve/{geneve.api, geneve_api.c} * LLDP APIs: see .../src/vnet/lldp/{lldp.api, lldp_api.c} * AF-PACKET APIs: see ... /vnet/devices/af_packet/{af_packet.api, af_packet_api.c} - * NETMAP APIs: see ... /src/vnet/devices/netmap/{netmap.api, netmap_api.c} * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c} * VXLAN GPE APIs: see .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c} * GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c} -- 2.16.6