MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_os_net_probe

Function mlx5_os_net_probe

dpdk/drivers/net/mlx5/linux/mlx5_os.c:2881–2905  ·  view source on GitHub ↗

* Net class driver callback to probe a device. * * This function probe PCI bus device(s) or a single SF on auxiliary bus. * * @param[in] cdev * Pointer to the common mlx5 device. * @param[in, out] mkvlist * Pointer to mlx5 kvargs control, can be NULL if there is no devargs. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

2879 * 0 on success, a negative errno value otherwise and rte_errno is set.
2880 */
2881int
2882mlx5_os_net_probe(struct mlx5_common_device *cdev,
2883 struct mlx5_kvargs_ctrl *mkvlist)
2884{
2885 int ret;
2886
2887 if (rte_eal_process_type() == RTE_PROC_PRIMARY)
2888 mlx5_pmd_socket_init();
2889 ret = mlx5_init_once();
2890 if (ret) {
2891 DRV_LOG(ERR, "Unable to init PMD global data: %s",
2892 strerror(rte_errno));
2893 return -rte_errno;
2894 }
2895 ret = mlx5_probe_again_args_validate(cdev, mkvlist);
2896 if (ret) {
2897 DRV_LOG(ERR, "Probe again parameters are not compatible : %s",
2898 strerror(rte_errno));
2899 return -rte_errno;
2900 }
2901 if (mlx5_dev_is_pci(cdev->dev))
2902 return mlx5_os_pci_probe(cdev, mkvlist);
2903 else
2904 return mlx5_os_auxiliary_probe(cdev, mkvlist);
2905}
2906
2907/**
2908 * Cleanup resources when the last device is closed.

Callers

nothing calls this directly

Calls 7

rte_eal_process_typeFunction · 0.85
mlx5_pmd_socket_initFunction · 0.85
mlx5_dev_is_pciFunction · 0.85
mlx5_os_pci_probeFunction · 0.85
mlx5_os_auxiliary_probeFunction · 0.85
mlx5_init_onceFunction · 0.70

Tested by

no test coverage detected