]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/dpdk/lib/librte_ethdev/ethdev_private.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_ethdev / ethdev_private.h
CommitLineData
9f95a23c
TL
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Gaƫtan Rivet
3 */
4
f67539c2
TL
5#ifndef _ETH_PRIVATE_H_
6#define _ETH_PRIVATE_H_
9f95a23c
TL
7
8#include "rte_ethdev.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*
15 * Convert rte_eth_dev pointer to port id.
16 * NULL will be translated to RTE_MAX_ETHPORTS.
17 */
18uint16_t eth_dev_to_id(const struct rte_eth_dev *dev);
19
20/* Generic rte_eth_dev comparison function. */
21typedef int (*rte_eth_cmp_t)(const struct rte_eth_dev *, const void *);
22
23/* Generic rte_eth_dev iterator. */
24struct rte_eth_dev *
25eth_find_device(const struct rte_eth_dev *_start, rte_eth_cmp_t cmp,
26 const void *data);
27
28/* Parse devargs value for representor parameter. */
29typedef int (*rte_eth_devargs_callback_t)(char *str, void *data);
30int rte_eth_devargs_parse_list(char *str, rte_eth_devargs_callback_t callback,
31 void *data);
32int rte_eth_devargs_parse_representor_ports(char *str, void *data);
33
34#ifdef __cplusplus
35}
36#endif
37
f67539c2 38#endif /* _ETH_PRIVATE_H_ */