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

Function mlx5_ifindex

dpdk/drivers/net/mlx5/mlx5_ethdev.c:41–56  ·  view source on GitHub ↗

* Get the interface index from device name. * * @param[in] dev * Pointer to Ethernet device. * * @return * Nonzero interface index on success, zero otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

39 * Nonzero interface index on success, zero otherwise and rte_errno is set.
40 */
41unsigned int
42mlx5_ifindex(const struct rte_eth_dev *dev)
43{
44 struct mlx5_priv *priv = dev->data->dev_private;
45 unsigned int ifindex;
46
47 MLX5_ASSERT(priv);
48 MLX5_ASSERT(priv->if_index);
49 if (priv->master && priv->sh->bond.ifindex > 0)
50 ifindex = priv->sh->bond.ifindex;
51 else
52 ifindex = priv->if_index;
53 if (!ifindex)
54 rte_errno = ENXIO;
55 return ifindex;
56}
57
58/**
59 * DPDK callback for Ethernet device configuration.

Callers 8

mlx5_dev_infos_getFunction · 0.85
mlx5_dev_spawnFunction · 0.85
mlx5_os_mac_addr_removeFunction · 0.85
mlx5_os_mac_addr_addFunction · 0.85
mlx5_os_set_promiscFunction · 0.85
mlx5_os_set_allmultiFunction · 0.85
mlx5_os_mac_addr_flushFunction · 0.85
mlx5_get_ifnameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected