summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/virtio/cli.c9
-rw-r--r--src/vnet/devices/virtio/device.c2
-rw-r--r--src/vnet/devices/virtio/node.c8
-rw-r--r--src/vnet/devices/virtio/pci.c8
-rw-r--r--src/vnet/devices/virtio/virtio_api.c4
5 files changed, 7 insertions, 24 deletions
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index d006524c71d..92e7e93831a 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -14,11 +14,6 @@
* limitations under the License.
*------------------------------------------------------------------
*/
-#include <stdint.h>
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <inttypes.h>
-
#include <vlib/vlib.h>
#include <vlib/unix/unix.h>
#include <vlib/pci/pci.h>
@@ -66,7 +61,7 @@ virtio_pci_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (virtio_pci_create_command, static) = {
.path = "create interface virtio",
- .short_help = "create interface virtio <pci-address>"
+ .short_help = "create interface virtio <pci-address> "
"[feature-mask <hex-mask>] [rx-queue-size <size>] [tx-queue-size <size>]",
.function = virtio_pci_create_command_fn,
};
@@ -119,7 +114,7 @@ virtio_pci_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (virtio_pci_delete_command, static) = {
.path = "delete interface virtio",
- .short_help = "delete interface virtio"
+ .short_help = "delete interface virtio "
"{<interface> | sw_if_index <sw_idx>}",
.function = virtio_pci_delete_command_fn,
};
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c
index 4eeb2caf8a1..78d6907d084 100644
--- a/src/vnet/devices/virtio/device.c
+++ b/src/vnet/devices/virtio/device.c
@@ -18,8 +18,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <linux/virtio_net.h>
-#include <linux/vhost.h>
#include <vlib/vlib.h>
#include <vlib/unix/unix.h>
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index c02b607d5fe..6627456de00 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -21,8 +21,6 @@
#include <net/if.h>
#include <linux/if_tun.h>
#include <sys/ioctl.h>
-#include <linux/virtio_net.h>
-#include <linux/vhost.h>
#include <sys/eventfd.h>
#include <vlib/vlib.h>
@@ -40,10 +38,10 @@
typedef enum
{
-#define _(f,s) TAP_INPUT_ERROR_##f,
+#define _(f,s) VIRTIO_INPUT_ERROR_##f,
foreach_virtio_input_error
#undef _
- TAP_INPUT_N_ERROR,
+ VIRTIO_INPUT_N_ERROR,
} virtio_input_error_t;
static char *virtio_input_error_strings[] = {
@@ -302,7 +300,7 @@ VLIB_REGISTER_NODE (virtio_input_node) = {
.format_trace = format_virtio_input_trace,
.type = VLIB_NODE_TYPE_INPUT,
.state = VLIB_NODE_STATE_INTERRUPT,
- .n_errors = TAP_INPUT_N_ERROR,
+ .n_errors = VIRTIO_INPUT_N_ERROR,
.error_strings = virtio_input_error_strings,
};
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 531a7fb26f6..e615827ccd4 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -15,19 +15,11 @@
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/virtio_net.h>
-#include <linux/virtio_ring.h>
-#include <linux/vhost.h>
-#include <sys/eventfd.h>
-#if defined(__x86_64__)
-#include <sys/io.h>
-#endif
#include <vppinfra/types.h>
#include <vlib/vlib.h>
#include <vlib/pci/pci.h>
#include <vnet/ethernet/ethernet.h>
-#include <vpp/app/version.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/devices/virtio/virtio.h>
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index 6f70b090034..5035799befe 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -108,7 +108,7 @@ vl_api_virtio_pci_delete_t_handler (vl_api_virtio_pci_delete_t * mp)
{
vnet_main_t *vnm = vnet_get_main ();
vlib_main_t *vm = vlib_get_main ();
- virtio_main_t *vmx = &virtio_main;
+ virtio_main_t *vim = &virtio_main;
int rv = 0;
vnet_hw_interface_t *hw;
virtio_if_t *vif;
@@ -124,7 +124,7 @@ vl_api_virtio_pci_delete_t_handler (vl_api_virtio_pci_delete_t * mp)
goto reply;
}
- vif = pool_elt_at_index (vmx->interfaces, hw->dev_instance);
+ vif = pool_elt_at_index (vim->interfaces, hw->dev_instance);
rv = virtio_pci_delete_if (vm, vif);