interrupts: rename device specific file descriptor
VFIO/UIO are mutually exclusive, storing file descriptor in a single field is enough. Signed-off-by: Harman Kalra <hkalra@marvell.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Raslan Darawsheh <rasland@nvidia.com>
This commit is contained in:
parent
73d844fd08
commit
99e6c7e316
@ -72,7 +72,7 @@ struct rte_intr_handle *rte_intr_instance_dup(const struct rte_intr_handle *src)
|
||||
intr_handle = rte_intr_instance_alloc(src->alloc_flags);
|
||||
if (intr_handle != NULL) {
|
||||
intr_handle->fd = src->fd;
|
||||
intr_handle->vfio_dev_fd = src->vfio_dev_fd;
|
||||
intr_handle->dev_fd = src->dev_fd;
|
||||
intr_handle->type = src->type;
|
||||
intr_handle->max_intr = src->max_intr;
|
||||
intr_handle->nb_efd = src->nb_efd;
|
||||
@ -140,7 +140,7 @@ int rte_intr_dev_fd_set(struct rte_intr_handle *intr_handle, int fd)
|
||||
{
|
||||
CHECK_VALID_INTR_HANDLE(intr_handle);
|
||||
|
||||
intr_handle->vfio_dev_fd = fd;
|
||||
intr_handle->dev_fd = fd;
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
@ -151,7 +151,7 @@ int rte_intr_dev_fd_get(const struct rte_intr_handle *intr_handle)
|
||||
{
|
||||
CHECK_VALID_INTR_HANDLE(intr_handle);
|
||||
|
||||
return intr_handle->vfio_dev_fd;
|
||||
return intr_handle->dev_fd;
|
||||
fail:
|
||||
return -1;
|
||||
}
|
||||
|
@ -9,13 +9,7 @@ struct rte_intr_handle {
|
||||
RTE_STD_C11
|
||||
union {
|
||||
struct {
|
||||
RTE_STD_C11
|
||||
union {
|
||||
/** VFIO device file descriptor */
|
||||
int vfio_dev_fd;
|
||||
/** UIO cfg file desc for uio_pci_generic */
|
||||
int uio_cfg_fd;
|
||||
};
|
||||
int dev_fd; /**< VFIO/UIO cfg device file descriptor */
|
||||
int fd; /**< interrupt event file descriptor */
|
||||
};
|
||||
void *windows_handle; /**< device driver handle */
|
||||
|
@ -151,7 +151,7 @@ RTE_TRACE_POINT(
|
||||
RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
|
||||
rte_intr_callback_fn cb, void *cb_arg, int rc),
|
||||
rte_trace_point_emit_int(rc);
|
||||
rte_trace_point_emit_int(handle->vfio_dev_fd);
|
||||
rte_trace_point_emit_int(handle->dev_fd);
|
||||
rte_trace_point_emit_int(handle->fd);
|
||||
rte_trace_point_emit_int(handle->type);
|
||||
rte_trace_point_emit_u32(handle->max_intr);
|
||||
@ -164,7 +164,7 @@ RTE_TRACE_POINT(
|
||||
RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
|
||||
rte_intr_callback_fn cb, void *cb_arg, int rc),
|
||||
rte_trace_point_emit_int(rc);
|
||||
rte_trace_point_emit_int(handle->vfio_dev_fd);
|
||||
rte_trace_point_emit_int(handle->dev_fd);
|
||||
rte_trace_point_emit_int(handle->fd);
|
||||
rte_trace_point_emit_int(handle->type);
|
||||
rte_trace_point_emit_u32(handle->max_intr);
|
||||
@ -176,7 +176,7 @@ RTE_TRACE_POINT(
|
||||
rte_eal_trace_intr_enable,
|
||||
RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
|
||||
rte_trace_point_emit_int(rc);
|
||||
rte_trace_point_emit_int(handle->vfio_dev_fd);
|
||||
rte_trace_point_emit_int(handle->dev_fd);
|
||||
rte_trace_point_emit_int(handle->fd);
|
||||
rte_trace_point_emit_int(handle->type);
|
||||
rte_trace_point_emit_u32(handle->max_intr);
|
||||
@ -186,7 +186,7 @@ RTE_TRACE_POINT(
|
||||
rte_eal_trace_intr_disable,
|
||||
RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
|
||||
rte_trace_point_emit_int(rc);
|
||||
rte_trace_point_emit_int(handle->vfio_dev_fd);
|
||||
rte_trace_point_emit_int(handle->dev_fd);
|
||||
rte_trace_point_emit_int(handle->fd);
|
||||
rte_trace_point_emit_int(handle->type);
|
||||
rte_trace_point_emit_u32(handle->max_intr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user