1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Gaƫtan Rivet
5 #ifndef _ETH_PRIVATE_H_
6 #define _ETH_PRIVATE_H_
8 #include "rte_ethdev.h"
15 * Convert rte_eth_dev pointer to port id.
16 * NULL will be translated to RTE_MAX_ETHPORTS.
18 uint16_t eth_dev_to_id(const struct rte_eth_dev *dev);
20 /* Generic rte_eth_dev comparison function. */
21 typedef int (*rte_eth_cmp_t)(const struct rte_eth_dev *, const void *);
23 /* Generic rte_eth_dev iterator. */
25 eth_find_device(const struct rte_eth_dev *_start, rte_eth_cmp_t cmp,
28 /* Parse devargs value for representor parameter. */
29 typedef int (*rte_eth_devargs_callback_t)(char *str, void *data);
30 int rte_eth_devargs_parse_list(char *str, rte_eth_devargs_callback_t callback,
32 int rte_eth_devargs_parse_representor_ports(char *str, void *data);
38 #endif /* _ETH_PRIVATE_H_ */