uint8_t haswell_broadwell_cpu;
-static int
-mlx5_class_check_handler(__rte_unused const char *key, const char *value,
- void *opaque)
-{
- enum mlx5_class *ret = opaque;
-
- if (strcmp(value, "vdpa") == 0) {
- *ret = MLX5_CLASS_VDPA;
- } else if (strcmp(value, "net") == 0) {
- *ret = MLX5_CLASS_NET;
- } else {
- DRV_LOG(ERR, "Invalid mlx5 class %s. Maybe typo in device"
- " class argument setting?", value);
- *ret = MLX5_CLASS_INVALID;
- }
- return 0;
-}
-
-enum mlx5_class
-mlx5_class_get(struct rte_devargs *devargs)
-{
- struct rte_kvargs *kvlist;
- const char *key = MLX5_CLASS_ARG_NAME;
- enum mlx5_class ret = MLX5_CLASS_NET;
-
- if (devargs == NULL)
- return ret;
- kvlist = rte_kvargs_parse(devargs->args, NULL);
- if (kvlist == NULL)
- return ret;
- if (rte_kvargs_count(kvlist, key))
- rte_kvargs_process(kvlist, key, mlx5_class_check_handler, &ret);
- rte_kvargs_free(kvlist);
- return ret;
-}
-
-
/* In case this is an x86_64 intel processor to check if
* we should use relaxed ordering.
*/
LIST_HEAD(mlx5_dbr_page_list, mlx5_devx_dbr_page);
-__rte_internal
-enum mlx5_class mlx5_class_get(struct rte_devargs *devargs);
__rte_internal
void mlx5_translate_port_name(const char *port_name_in,
struct mlx5_switch_info *port_info_out);
struct mlx5_dev_config dev_config;
int ret;
- if (mlx5_class_get(pci_dev->device.devargs) != MLX5_CLASS_NET) {
- DRV_LOG(DEBUG, "Skip probing - should be probed by other mlx5"
- " driver.");
- return 1;
- }
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
mlx5_pmd_socket_init();
ret = mlx5_init_once();
struct mlx5_hca_attr attr;
int ret;
- if (mlx5_class_get(pci_dev->device.devargs) != MLX5_CLASS_VDPA) {
- DRV_LOG(DEBUG, "Skip probing - should be probed by other mlx5"
- " driver.");
- return 1;
- }
ibv = mlx5_vdpa_get_ib_device_match(&pci_dev->addr);
if (!ibv) {
DRV_LOG(ERR, "No matching IB device for PCI slot "