aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/pci
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/pci')
-rw-r--r--src/vlib/pci/pci.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/vlib/pci/pci.h b/src/vlib/pci/pci.h
index cf69de49976..072988a3561 100644
--- a/src/vlib/pci/pci.h
+++ b/src/vlib/pci/pci.h
@@ -117,6 +117,10 @@ typedef struct
u16 vendor_id, device_id;
} pci_device_id_t;
+typedef void (pci_intx_handler_function_t) (vlib_pci_dev_handle_t handle);
+typedef void (pci_msix_handler_function_t) (vlib_pci_dev_handle_t handle,
+ u16 line);
+
typedef struct _pci_device_registration
{
/* Driver init function. */
@@ -124,7 +128,7 @@ typedef struct _pci_device_registration
vlib_pci_dev_handle_t handle);
/* Interrupt handler */
- void (*interrupt_handler) (vlib_pci_dev_handle_t handle);
+ pci_intx_handler_function_t *interrupt_handler;
/* List of registrations */
struct _pci_device_registration *next_registration;
@@ -252,6 +256,15 @@ clib_error_t *vlib_pci_map_region_fixed (vlib_pci_dev_handle_t h,
u32 resource, u8 * addr,
void **result);
+clib_error_t *vlib_pci_register_msix_handler (vlib_pci_dev_handle_t h,
+ u32 start, u32 count,
+ pci_msix_handler_function_t *
+ msix_handler);
+clib_error_t *vlib_pci_enable_msix_irq (vlib_pci_dev_handle_t h, u16 start,
+ u16 count);
+clib_error_t *vlib_pci_disable_msix_irq (vlib_pci_dev_handle_t h, u16 start,
+ u16 count);
+
unformat_function_t unformat_vlib_pci_addr;
format_function_t format_vlib_pci_addr;
format_function_t format_vlib_pci_link_speed;