dev: interrupt mode support
Type: improvement
Change-Id: I4a0578598182339bcf76e6b01da76b590a06f773
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/dev/pci.c b/src/vnet/dev/pci.c
index 3310841..d35c5f9 100644
--- a/src/vnet/dev/pci.c
+++ b/src/vnet/dev/pci.c
@@ -2,16 +2,15 @@
* Copyright (c) 2023 Cisco Systems, Inc.
*/
-#include "vlib/pci/pci.h"
#include <vnet/vnet.h>
#include <vnet/dev/dev.h>
#include <vnet/dev/pci.h>
#include <vnet/dev/log.h>
+#include <vlib/unix/unix.h>
VLIB_REGISTER_LOG_CLASS (dev_log, static) = {
.class_name = "dev",
.subclass_name = "pci",
- .default_syslog_level = VLIB_LOG_LEVEL_DEBUG,
};
static int
@@ -317,6 +316,18 @@
return VNET_DEV_OK;
}
+void
+vnet_dev_pci_msix_set_polling_thread (vlib_main_t *vm, vnet_dev_t *dev,
+ u16 line, u16 thread_index)
+{
+ vlib_pci_dev_handle_t h = vnet_dev_get_pci_handle (dev);
+ u32 index;
+
+ index = vlib_pci_get_msix_file_index (vm, h, line);
+
+ clib_file_set_polling_thread (&file_main, index, thread_index);
+}
+
vnet_dev_rv_t
vnet_dev_pci_msix_remove_handler (vlib_main_t *vm, vnet_dev_t *dev, u16 first,
u16 count)