VNET Device Drivers
I: devices
-Y: src/vnet/devices/af_packet/FEATURE.yaml
Y: src/vnet/devices/pipe/FEATURE.yaml
M: Damjan Marion <damarion@cisco.com>
F: src/vnet/devices/
+AF PACKET Drivers
+I: af_packet
+Y: src/plugins/af_packet/FEATURE.yaml
+M: Mohsin Kazmi <sykazmi@cisco.com>
+F: src/plugins/af_packet
+
VNET TAP Drivers
I: tap
Y: src/vnet/devices/tap/FEATURE.yaml
--- /dev/null
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2022 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+add_vpp_plugin(af_packet
+ SOURCES
+ plugin.c
+ af_packet.c
+ device.c
+ node.c
+ cli.c
+ af_packet_api.c
+
+ MULTIARCH_SOURCES
+ node.c
+ device.c
+
+ INSTALL_HEADERS
+ af_packet.h
+
+ API_FILES
+ af_packet.api
+
+ # API_TEST_SOURCES
+ #af_packet_test_api.c
+)
#include <vnet/interface/rx_queue_funcs.h>
#include <vnet/interface/tx_queue_funcs.h>
-#include <vnet/devices/af_packet/af_packet.h>
+#include <af_packet/af_packet.h>
af_packet_main_t af_packet_main;
#include <vnet/interface.h>
#include <vnet/api_errno.h>
-#include <vnet/devices/af_packet/af_packet.h>
+#include <af_packet/af_packet.h>
#include <vnet/format_fns.h>
-#include <vnet/devices/af_packet/af_packet.api_enum.h>
-#include <vnet/devices/af_packet/af_packet.api_types.h>
+#include <af_packet/af_packet.api_enum.h>
+#include <af_packet/af_packet.api_types.h>
#define REPLY_MSG_ID_BASE msg_id_base
#include <vlibapi/api_helper_macros.h>
vec_free (out_af_packet_ifs);
}
-#include <vnet/devices/af_packet/af_packet.api.c>
+#include <af_packet/af_packet.api.c>
static clib_error_t *
af_packet_api_hookup (vlib_main_t * vm)
{
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
-#include <vnet/devices/af_packet/af_packet.h>
+#include <af_packet/af_packet.h>
/**
* @file
#include <vnet/tcp/tcp_packet.h>
#include <vnet/udp/udp_packet.h>
-#include <vnet/devices/af_packet/af_packet.h>
+#include <af_packet/af_packet.h>
#include <vnet/devices/virtio/virtio_std.h>
#define foreach_af_packet_tx_func_error \
#include <vnet/feature/feature.h>
#include <vnet/ethernet/packet.h>
-#include <vnet/devices/af_packet/af_packet.h>
+#include <af_packet/af_packet.h>
#include <vnet/devices/virtio/virtio_std.h>
#define foreach_af_packet_input_error \
--- /dev/null
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright (c) 2022 Cisco Systems, Inc.
+ * License: Cisco Proprietary Closed Source License - Cisco Internal.
+ * The software, documentation and any fonts accompanying this License whether
+ * on disk, in read only memory, on any other media or in any other form (col-
+ * lectively the “Software”) are licensed, not sold, to you by Cisco, Inc.
+ * (“Cisco”) for use only under the terms of this License, and Cisco reserves
+ * all rights not expressly granted to you. The rights granted herein are
+ * limited to Cisco’s intel- lectual property rights in the Cisco Software and
+ * do not include any other patents or intellectual property rights. You own
+ * the media on which the Cisco Software is recorded but Cisco and/or Cisco’s
+ * licensor(s) retain ownership of the Software itself.
+ */
+
+#include <vlib/vlib.h>
+#include <vnet/plugin/plugin.h>
+#include <vpp/app/version.h>
+
+VLIB_PLUGIN_REGISTER () = {
+ .version = VPP_BUILD_VER,
+ .description = "af-packet",
+};
list(APPEND VNET_MULTIARCH_SOURCES
devices/virtio/node.c
- devices/af_packet/node.c
devices/virtio/device.c
)
tls/tls_test.h
)
-##############################################################################
-# Linux packet interface
-##############################################################################
-
-list(APPEND VNET_SOURCES
- devices/af_packet/af_packet.c
- devices/af_packet/device.c
- devices/af_packet/node.c
- devices/af_packet/cli.c
- devices/af_packet/af_packet_api.c
-)
-
-list(APPEND VNET_MULTIARCH_SOURCES
- devices/af_packet/device.c
-)
-
-list(APPEND VNET_HEADERS
- devices/af_packet/af_packet.h
-)
-
-list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
##############################################################################
# Driver feature graph arc support