Spdk/lib/env_dpdk/22.11/dev_driver.h
Jim Harris 5497616e8f env_dpdk: add support for DPDK 22.11
DPDK has merged changes which hide remove some DPDK
object such as rte_device and rte_driver from the
public API.

So we add copies of the necessary header files into
our tree, along with a 22.11-specific pci_dpdk
implementation.

These files are copied over exactly, except for one
#include which needs to change from <> to "" so that
it picks up the header in our tree instead of looking
for it in system headers.

Longer-term we may want to look at ways to automated
checking and updating of these header files.  DPDK 22.11
isn't officially released yet, so the header files could
change, but we want to get this in now since without
it SPDK cannot build against DPDK tip at all.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I89ffd0abab52c404cfff911c1c9b0cd9e889241d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14570
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-11-02 10:50:23 +00:00

42 lines
1.0 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022 Red Hat, Inc.
*/
#ifndef DEV_DRIVER_H
#define DEV_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <rte_common.h>
#include "rte_dev.h"
/**
* A structure describing a device driver.
*/
struct rte_driver {
RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
const char *name; /**< Driver name. */
const char *alias; /**< Driver alias. */
};
/**
* A structure describing a generic device.
*/
struct rte_device {
RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
const char *name; /**< Device name */
const char *bus_info; /**< Device bus specific information */
const struct rte_driver *driver; /**< Driver assigned after probing */
const struct rte_bus *bus; /**< Bus handle assigned on scan */
int numa_node; /**< NUMA node connection */
struct rte_devargs *devargs; /**< Arguments for latest probing */
};
#ifdef __cplusplus
}
#endif
#endif /* DEV_DRIVER_H */