vlib: pci cleanup and improvements

Change-Id: Ieafbed6f2db3dec65e4b43d84a4661f6a1bbe891
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2023-07-28 13:19:49 +02:00
committed by Florin Coras
parent c5c0d0cf8a
commit 00ea98ad60
7 changed files with 535 additions and 490 deletions

View File

@ -1955,17 +1955,4 @@ avf_init (vlib_main_t * vm)
return 0;
}
/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (avf_init) =
{
.runs_after = VLIB_INITS ("pci_bus_init"),
};
/* *INDENT-OFF* */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
VLIB_INIT_FUNCTION (avf_init);

View File

@ -167,8 +167,8 @@ init_intel_uncore_iio_bw (vlib_main_t *vm, struct perfmon_bundle *b)
s = format (
s, "%-10U%-5U%-13U%04x:%04x %-14U%-16s%v\n", format_stack_socket, p,
h, addr, format_vlib_pci_link_port, d, format_vlib_pci_addr, addr,
d->vendor_id, d->device_id, format_vlib_pci_link_speed, d,
h, addr, format_vlib_pci_link_port, &d->config, format_vlib_pci_addr,
addr, d->vendor_id, d->device_id, format_vlib_pci_link_speed, d,
d->driver_name ? (char *) d->driver_name : "", d->product_name);
vlib_pci_free_device_info (d);

View File

@ -1152,15 +1152,4 @@ rdma_init (vlib_main_t * vm)
return 0;
}
VLIB_INIT_FUNCTION (rdma_init) =
{
.runs_after = VLIB_INITS ("pci_bus_init"),
};
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
VLIB_INIT_FUNCTION (rdma_init);

View File

@ -61,12 +61,17 @@ static const char *sysfs_pci_drv_path = "/sys/bus/pci/drivers";
static char *sysfs_mod_vfio_noiommu =
"/sys/module/vfio/parameters/enable_unsafe_noiommu_mode";
#define pci_log_debug(vm, dev, f, ...) \
vlib_log(VLIB_LOG_LEVEL_DEBUG, pci_main.log_default, "%U: " f, \
format_vlib_pci_addr, vlib_pci_get_addr(vm, dev->handle), ## __VA_ARGS__)
#define pci_log_err(vm, dev, f, ...) \
vlib_log(VLIB_LOG_LEVEL_ERR, pci_main.log_default, "%U: " f, \
format_vlib_pci_addr, vlib_pci_get_addr(vm, dev->handle), ## __VA_ARGS__)
VLIB_REGISTER_LOG_CLASS (pci_log, static) = {
.class_name = "pci",
.subclass_name = "linux",
};
#define log_debug(p, f, ...) \
vlib_log (VLIB_LOG_LEVEL_DEBUG, pci_log.class, "%U: " f, \
format_vlib_pci_log, p->handle, ##__VA_ARGS__)
#define log_err(p, f, ...) \
vlib_log (VLIB_LOG_LEVEL_ERR, pci_log.class, "%U: " f, format_vlib_pci_log, \
p->handle, ##__VA_ARGS__)
typedef struct
{
@ -233,32 +238,13 @@ vlib_pci_get_device_info (vlib_main_t * vm, vlib_pci_addr_t * addr,
/* You can only read more that 64 bytes of config space as root; so we try to
read the full space but fall back to just the first 64 bytes. */
if (read (fd, &di->config_data, sizeof (di->config_data)) <
sizeof (di->config0))
if (read (fd, &di->config, sizeof (di->config)) < sizeof (di->config))
{
err = clib_error_return_unix (0, "read `%s'", f);
close (fd);
goto error;
}
{
static pci_config_header_t all_ones;
if (all_ones.vendor_id == 0)
clib_memset (&all_ones, ~0, sizeof (all_ones));
if (!memcmp (&di->config0.header, &all_ones, sizeof (all_ones)))
{
err = clib_error_return (0, "invalid PCI config for `%s'", f);
close (fd);
goto error;
}
}
if (di->config0.header.header_type == 0)
pci_config_type0_little_to_host (&di->config0);
else
pci_config_type1_little_to_host (&di->config1);
di->numa_node = -1;
vec_reset_length (f);
f = format (f, "%v/numa_node%c", dev_dir_name, 0);
@ -300,6 +286,13 @@ vlib_pci_get_device_info (vlib_main_t * vm, vlib_pci_addr_t * addr,
goto error;
di->device_id = tmp;
vec_reset_length (f);
f = format (f, "%v/revision%c", dev_dir_name, 0);
err = clib_sysfs_read ((char *) f, "0x%x", &tmp);
if (err)
goto error;
di->revision = tmp;
vec_reset_length (f);
f = format (f, "%v/driver%c", dev_dir_name, 0);
di->driver_name = clib_sysfs_link_to_name ((char *) f);
@ -670,13 +663,12 @@ vfio_set_irqs (vlib_main_t * vm, linux_pci_device_t * p, u32 index, u32 start,
return clib_error_return_unix (0, "ioctl(VFIO_DEVICE_GET_IRQ_INFO) "
"'%U'", format_vlib_pci_addr, &p->addr);
pci_log_debug (vm, p, "%s index:%u count:%u flags: %s%s%s%s(0x%x)",
__func__, ii.index, ii.count,
ii.flags & VFIO_IRQ_INFO_EVENTFD ? "eventfd " : "",
ii.flags & VFIO_IRQ_INFO_MASKABLE ? "maskable " : "",
ii.flags & VFIO_IRQ_INFO_AUTOMASKED ? "automasked " : "",
ii.flags & VFIO_IRQ_INFO_NORESIZE ? "noresize " : "",
ii.flags);
log_debug (p, "%s index:%u count:%u flags: %s%s%s%s(0x%x)", __func__,
ii.index, ii.count,
ii.flags & VFIO_IRQ_INFO_EVENTFD ? "eventfd " : "",
ii.flags & VFIO_IRQ_INFO_MASKABLE ? "maskable " : "",
ii.flags & VFIO_IRQ_INFO_AUTOMASKED ? "automasked " : "",
ii.flags & VFIO_IRQ_INFO_NORESIZE ? "noresize " : "", ii.flags);
if (ii.count < start + count)
return clib_error_return_unix (0, "vfio_set_irq: unexistng interrupt on "
@ -864,13 +856,12 @@ vlib_pci_register_intx_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h,
if (ioctl (p->fd, VFIO_DEVICE_GET_IRQ_INFO, &ii) < 0)
return clib_error_return_unix (0, "ioctl(VFIO_DEVICE_GET_IRQ_INFO) '"
"%U'", format_vlib_pci_addr, &p->addr);
pci_log_debug (vm, p, "%s index:%u count:%u flags: %s%s%s%s(0x%x)",
__func__, ii.index, ii.count,
ii.flags & VFIO_IRQ_INFO_EVENTFD ? "eventfd " : "",
ii.flags & VFIO_IRQ_INFO_MASKABLE ? "maskable " : "",
ii.flags & VFIO_IRQ_INFO_AUTOMASKED ? "automasked " : "",
ii.flags & VFIO_IRQ_INFO_NORESIZE ? "noresize " : "",
ii.flags);
log_debug (
p, "%s index:%u count:%u flags: %s%s%s%s(0x%x)", __func__, ii.index,
ii.count, ii.flags & VFIO_IRQ_INFO_EVENTFD ? "eventfd " : "",
ii.flags & VFIO_IRQ_INFO_MASKABLE ? "maskable " : "",
ii.flags & VFIO_IRQ_INFO_AUTOMASKED ? "automasked " : "",
ii.flags & VFIO_IRQ_INFO_NORESIZE ? "noresize " : "", ii.flags);
if (ii.count != 1)
return clib_error_return (0, "INTx interrupt does not exist on device"
"'%U'", format_vlib_pci_addr, &p->addr);
@ -1042,7 +1033,7 @@ add_device_vfio (vlib_main_t * vm, linux_pci_device_t * p,
goto error;
}
pci_log_debug (vm, p, "%s %U", __func__, format_vfio_region_info, &reg);
log_debug (p, "%s %U", __func__, format_vfio_region_info, &reg);
p->config_offset = reg.offset;
p->config_fd = p->fd;
@ -1177,7 +1168,7 @@ vlib_pci_region (vlib_main_t * vm, vlib_pci_dev_handle_t h, u32 bar, int *fd,
_fd = p->fd;
_size = r->size;
_offset = r->offset;
pci_log_debug (vm, p, "%s %U", __func__, format_vfio_region_info, r);
log_debug (p, "%s %U", __func__, format_vfio_region_info, r);
clib_mem_free (r);
}
else
@ -1198,18 +1189,18 @@ vlib_pci_map_region_int (vlib_main_t * vm, vlib_pci_dev_handle_t h,
int fd = -1;
clib_error_t *error;
u64 size = 0, offset = 0;
u16 command;
vlib_pci_config_reg_command_t command;
pci_log_debug (vm, p, "map region %u to va %p", bar, addr);
log_debug (p, "map region %u to va %p", bar, addr);
if ((error = vlib_pci_read_config_u16 (vm, h, 4, &command)))
if ((error = vlib_pci_read_config_u16 (vm, h, 4, &command.as_u16)))
return error;
if (!(command & PCI_COMMAND_MEMORY))
if (!(command.mem_space))
{
pci_log_debug (vm, p, "setting memory enable bit");
command |= PCI_COMMAND_MEMORY;
if ((error = vlib_pci_write_config_u16 (vm, h, 4, &command)))
log_debug (p, "setting memory enable bit");
command.mem_space = 1;
if ((error = vlib_pci_write_config_u16 (vm, h, 4, &command.as_u16)))
return error;
}
@ -1321,12 +1312,19 @@ vlib_pci_device_open (vlib_main_t * vm, vlib_pci_addr_t * addr,
if (err)
return err;
for (i = ids; i->vendor_id != 0; i++)
if (i->vendor_id == di->vendor_id && i->device_id == di->device_id)
break;
if (i->vendor_id == 0)
return clib_error_return (0, "Wrong vendor or device id");
if (ids)
{
for (i = ids; i->vendor_id != 0; i++)
if (i->vendor_id == di->vendor_id && i->device_id == di->device_id)
break;
if (i->vendor_id == 0)
{
vlib_pci_free_device_info (di);
return clib_error_return (0, "Wrong vendor or device id");
}
}
pool_get (lpm->linux_pci_devices, p);
p->handle = p - lpm->linux_pci_devices;
@ -1339,9 +1337,8 @@ vlib_pci_device_open (vlib_main_t * vm, vlib_pci_addr_t * addr,
*/
p->io_fd = -1;
pci_log_debug (vm, p, "open vid:0x%04x did:0x%04x driver:%s iommu_group:%d",
di->vendor_id, di->device_id, di->driver_name,
di->iommu_group);
log_debug (p, "open vid:0x%04x did:0x%04x driver:%s iommu_group:%d",
di->vendor_id, di->device_id, di->driver_name, di->iommu_group);
if (clib_strncmp ("vfio-pci", (char *) di->driver_name, 8) == 0)
err = add_device_vfio (vm, p, di, 0);
@ -1359,7 +1356,7 @@ error:
vlib_pci_free_device_info (di);
if (err)
{
pci_log_err (vm, p, "%U", format_clib_error, err);
log_err (p, "%U", format_clib_error, err);
clib_memset (p, 0, sizeof (linux_pci_device_t));
pool_put (lpm->linux_pci_devices, p);
}

View File

@ -52,9 +52,25 @@
vlib_pci_main_t pci_main;
vlib_pci_device_info_t * __attribute__ ((weak))
vlib_pci_get_device_info (vlib_main_t * vm, vlib_pci_addr_t * addr,
clib_error_t ** error)
VLIB_REGISTER_LOG_CLASS (pci_log, static) = {
.class_name = "pci",
};
#define log_debug(h, f, ...) \
vlib_log (VLIB_LOG_LEVEL_DEBUG, pci_log.class, "%U: " f, \
format_vlib_pci_log, h, ##__VA_ARGS__)
u8 *
format_vlib_pci_log (u8 *s, va_list *va)
{
vlib_pci_dev_handle_t h = va_arg (*va, vlib_pci_dev_handle_t);
return format (s, "%U", format_vlib_pci_addr,
vlib_pci_get_addr (vlib_get_main (), h));
}
vlib_pci_device_info_t *__attribute__ ((weak))
vlib_pci_get_device_info (vlib_main_t *vm, vlib_pci_addr_t *addr,
clib_error_t **error)
{
if (error)
*error = clib_error_return (0, "unsupported");
@ -72,6 +88,122 @@ vlib_pci_addr_t * __attribute__ ((weak)) vlib_pci_get_all_dev_addrs ()
return 0;
}
static clib_error_t *
_vlib_pci_config_set_control_bit (vlib_main_t *vm, vlib_pci_dev_handle_t h,
u16 bit, int new_val, int *already_set)
{
u16 control, old;
clib_error_t *err;
err = vlib_pci_read_write_config (
vm, h, VLIB_READ, STRUCT_OFFSET_OF (vlib_pci_config_t, command), &old,
STRUCT_SIZE_OF (vlib_pci_config_t, command));
if (err)
return err;
control = new_val ? old | bit : old & ~bit;
*already_set = old == control;
if (*already_set)
return 0;
return vlib_pci_read_write_config (
vm, h, VLIB_WRITE, STRUCT_OFFSET_OF (vlib_pci_config_t, command), &control,
STRUCT_SIZE_OF (vlib_pci_config_t, command));
}
clib_error_t *
vlib_pci_intr_enable (vlib_main_t *vm, vlib_pci_dev_handle_t h)
{
const vlib_pci_config_reg_command_t cmd = { .intx_disable = 1 };
clib_error_t *err;
int already_set;
err = _vlib_pci_config_set_control_bit (vm, h, cmd.as_u16, 0, &already_set);
log_debug (h, "interrupt%senabled", already_set ? " " : " already ");
return err;
}
clib_error_t *
vlib_pci_intr_disable (vlib_main_t *vm, vlib_pci_dev_handle_t h)
{
const vlib_pci_config_reg_command_t cmd = { .intx_disable = 1 };
clib_error_t *err;
int already_set;
err = _vlib_pci_config_set_control_bit (vm, h, cmd.as_u16, 1, &already_set);
log_debug (h, "interrupt%sdisabled", already_set ? " " : " already ");
return err;
}
clib_error_t *
vlib_pci_bus_master_enable (vlib_main_t *vm, vlib_pci_dev_handle_t h)
{
const vlib_pci_config_reg_command_t cmd = { .bus_master = 1 };
clib_error_t *err;
int already_set;
err = _vlib_pci_config_set_control_bit (vm, h, cmd.as_u16, 1, &already_set);
log_debug (h, "bus-master%senabled", already_set ? " " : " already ");
return err;
}
clib_error_t *
vlib_pci_bus_master_disable (vlib_main_t *vm, vlib_pci_dev_handle_t h)
{
const vlib_pci_config_reg_command_t cmd = { .bus_master = 1 };
clib_error_t *err;
int already_set;
err = _vlib_pci_config_set_control_bit (vm, h, cmd.as_u16, 0, &already_set);
log_debug (h, "bus-master%sdisabled", already_set ? " " : " already ");
return err;
}
clib_error_t *
vlib_pci_function_level_reset (vlib_main_t *vm, vlib_pci_dev_handle_t h)
{
vlib_pci_config_t cfg;
pci_capability_pcie_t *cap;
pci_capability_pcie_dev_control_t dev_control;
clib_error_t *err;
u8 offset;
log_debug (h, "function level reset");
err = vlib_pci_read_write_config (vm, h, VLIB_READ, 0, &cfg, sizeof (cfg));
if (err)
return err;
offset = cfg.cap_ptr;
while (offset)
{
cap = (pci_capability_pcie_t *) (cfg.data + offset);
if (cap->capability_id == PCI_CAP_ID_PCIE)
break;
offset = cap->next_offset;
}
if (cap->capability_id != PCI_CAP_ID_PCIE)
return clib_error_return (0, "PCIe capability config not found");
if (cap->dev_caps.flr_capable == 0)
return clib_error_return (0, "PCIe function level reset not supported");
dev_control = cap->dev_control;
dev_control.function_level_reset = 1;
if ((err = vlib_pci_write_config_u16 (
vm, h, offset + STRUCT_OFFSET_OF (pci_capability_pcie_t, dev_control),
&dev_control.as_u16)))
return err;
return 0;
}
static clib_error_t *
show_pci_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
@ -151,38 +283,54 @@ format_vlib_pci_addr (u8 * s, va_list * va)
u8 *
format_vlib_pci_link_port (u8 *s, va_list *va)
{
vlib_pci_device_info_t *d = va_arg (*va, vlib_pci_device_info_t *);
pcie_config_regs_t *r =
pci_config_find_capability (&d->config0, PCI_CAP_ID_PCIE);
vlib_pci_config_t *c = va_arg (*va, vlib_pci_config_t *);
pci_capability_pcie_t *r = pci_config_find_capability (c, PCI_CAP_ID_PCIE);
if (!r)
return format (s, "unknown");
return format (s, "P%d", r->link_capabilities >> 24);
return format (s, "P%d", r->link_caps.port_number);
}
static u8 *
_vlib_pci_link_speed (u8 *s, u8 speed, u8 width)
{
static char *speeds[] = {
[1] = "2.5", [2] = "5.0", [3] = "8.0", [4] = "16.0", [5] = "32.0"
};
if (speed > ARRAY_LEN (speeds) || speeds[speed] == 0)
s = format (s, "unknown speed");
else
s = format (s, "%s GT/s", speeds[speed]);
return format (s, " x%u", width);
}
u8 *
format_vlib_pci_link_speed (u8 * s, va_list * va)
format_vlib_pci_link_speed (u8 *s, va_list *va)
{
vlib_pci_device_info_t *d = va_arg (*va, vlib_pci_device_info_t *);
pcie_config_regs_t *r =
pci_config_find_capability (&d->config0, PCI_CAP_ID_PCIE);
int width;
vlib_pci_config_t *c = va_arg (*va, vlib_pci_config_t *);
pci_capability_pcie_t *r = pci_config_find_capability (c, PCI_CAP_ID_PCIE);
if (!r)
return format (s, "unknown");
width = (r->link_status >> 4) & 0x3f;
return _vlib_pci_link_speed (s, r->link_status.link_speed,
r->link_status.negotiated_link_width);
}
if ((r->link_status & 0xf) == 1)
return format (s, "2.5 GT/s x%u", width);
if ((r->link_status & 0xf) == 2)
return format (s, "5.0 GT/s x%u", width);
if ((r->link_status & 0xf) == 3)
return format (s, "8.0 GT/s x%u", width);
if ((r->link_status & 0xf) == 4)
return format (s, "16.0 GT/s x%u", width);
return format (s, "unknown");
u8 *
format_vlib_pci_link_speed_cap (u8 *s, va_list *va)
{
vlib_pci_config_t *c = va_arg (*va, vlib_pci_config_t *);
pci_capability_pcie_t *r = pci_config_find_capability (c, PCI_CAP_ID_PCIE);
if (!r)
return format (s, "unknown");
return _vlib_pci_link_speed (s, r->link_caps.max_link_speed,
r->link_caps.max_link_width);
}
u8 *
@ -257,29 +405,9 @@ format_vlib_pci_vpd (u8 * s, va_list * args)
return s;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_pci_command, static) = {
.path = "show pci",
.short_help = "show pci [all]",
.function = show_pci_fn,
};
/* *INDENT-ON* */
clib_error_t *
pci_bus_init (vlib_main_t * vm)
{
vlib_pci_main_t *pm = &pci_main;
pm->log_default = vlib_log_register_class ("pci", 0);
return 0;
}
VLIB_INIT_FUNCTION (pci_bus_init);
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/

View File

@ -72,6 +72,7 @@ typedef struct vlib_pci_device_info
u16 device_class;
u16 vendor_id;
u16 device_id;
u8 revision;
/* Vital Product Data */
u8 *product_name;
@ -82,12 +83,7 @@ typedef struct vlib_pci_device_info
u8 *driver_name;
/* First 64 bytes of configuration space. */
union
{
pci_config_type0_regs_t config0;
pci_config_type1_regs_t config1;
u8 config_data[256];
};
vlib_pci_config_t config;
/* IOMMU Group */
int iommu_group;
@ -129,6 +125,12 @@ typedef struct
u16 vendor_id, device_id;
} pci_device_id_t;
#define PCI_DEVICE_IDS(...) \
(pci_device_id_t[]) \
{ \
__VA_ARGS__, {} \
}
typedef void (pci_intx_handler_function_t) (vlib_main_t * vm,
vlib_pci_dev_handle_t handle);
typedef void (pci_msix_handler_function_t) (vlib_main_t * vm,
@ -198,15 +200,19 @@ clib_error_t *vlib_pci_read_write_io (vlib_main_t * vm,
vlib_read_or_write_t read_or_write,
uword address, void *data, u32 n_bytes);
#define _(t, x) \
static inline clib_error_t * \
vlib_pci_read_##x##_##t (vlib_main_t *vm, vlib_pci_dev_handle_t h, \
uword address, t * data) \
{ \
return vlib_pci_read_write_##x (vm, h, VLIB_READ,address, data, \
sizeof (data[0])); \
}
#define _(t, x) \
static inline clib_error_t *vlib_pci_read_##x##_##t ( \
vlib_main_t *vm, vlib_pci_dev_handle_t h, uword address, t *data) \
{ \
return vlib_pci_read_write_##x (vm, h, VLIB_READ, address, data, \
sizeof (data[0])); \
} \
static inline clib_error_t *vlib_pci_write_##x##_##t ( \
vlib_main_t *vm, vlib_pci_dev_handle_t h, uword address, t *data) \
{ \
return vlib_pci_read_write_##x (vm, h, VLIB_WRITE, address, data, \
sizeof (data[0])); \
}
_(u32, config);
_(u16, config);
@ -218,77 +224,6 @@ _(u8, io);
#undef _
#define _(t, x) \
static inline clib_error_t * \
vlib_pci_write_##x##_##t (vlib_main_t *vm, vlib_pci_dev_handle_t h, \
uword address, t * data) \
{ \
return vlib_pci_read_write_##x (vm, h, VLIB_WRITE, \
address, data, sizeof (data[0])); \
}
_(u32, config);
_(u16, config);
_(u8, config);
_(u32, io);
_(u16, io);
_(u8, io);
#undef _
static inline clib_error_t *
vlib_pci_intr_enable (vlib_main_t * vm, vlib_pci_dev_handle_t h)
{
u16 command;
clib_error_t *err;
err = vlib_pci_read_config_u16 (vm, h, 4, &command);
if (err)
return err;
command &= ~PCI_COMMAND_INTX_DISABLE;
return vlib_pci_write_config_u16 (vm, h, 4, &command);
}
static inline clib_error_t *
vlib_pci_intr_disable (vlib_main_t * vm, vlib_pci_dev_handle_t h)
{
u16 command;
clib_error_t *err;
err = vlib_pci_read_config_u16 (vm, h, 4, &command);
if (err)
return err;
command |= PCI_COMMAND_INTX_DISABLE;
return vlib_pci_write_config_u16 (vm, h, 4, &command);
}
static inline clib_error_t *
vlib_pci_bus_master_enable (vlib_main_t * vm, vlib_pci_dev_handle_t h)
{
clib_error_t *err;
u16 command;
/* Set bus master enable (BME) */
err = vlib_pci_read_config_u16 (vm, h, 4, &command);
if (err)
return err;
if (command & PCI_COMMAND_BUS_MASTER)
return 0;
command |= PCI_COMMAND_BUS_MASTER;
return vlib_pci_write_config_u16 (vm, h, 4, &command);
}
clib_error_t *vlib_pci_device_open (vlib_main_t * vm, vlib_pci_addr_t * addr,
pci_device_id_t ids[],
vlib_pci_dev_handle_t * handle);
@ -323,12 +258,22 @@ uword vlib_pci_get_msix_file_index (vlib_main_t * vm, vlib_pci_dev_handle_t h,
int vlib_pci_supports_virtual_addr_dma (vlib_main_t * vm,
vlib_pci_dev_handle_t h);
clib_error_t *vlib_pci_intr_enable (vlib_main_t *, vlib_pci_dev_handle_t);
clib_error_t *vlib_pci_intr_disable (vlib_main_t *, vlib_pci_dev_handle_t);
clib_error_t *vlib_pci_bus_master_enable (vlib_main_t *,
vlib_pci_dev_handle_t);
clib_error_t *vlib_pci_bus_master_disable (vlib_main_t *,
vlib_pci_dev_handle_t);
clib_error_t *vlib_pci_function_level_reset (vlib_main_t *,
vlib_pci_dev_handle_t);
unformat_function_t unformat_vlib_pci_addr;
format_function_t format_vlib_pci_addr;
format_function_t format_vlib_pci_link_speed;
format_function_t format_vlib_pci_link_speed_cap;
format_function_t format_vlib_pci_link_port;
format_function_t format_vlib_pci_vpd;
format_function_t format_vlib_pci_log;
#endif /* included_vlib_pci_h */

File diff suppressed because it is too large Load Diff