summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-10-07 13:56:19 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:32 +0200
commitfbc8341218bc0a373035468445dfd29a433e8f47 (patch)
treecbbbf5ecbfe852e8638f644f52145c3208aa433f /drivers/net/mlx5/mlx5_ethdev.c
parentb53cd86965a13f0d9efcd7fb02e96bb3f5215916 (diff)
downloaddpdk-next-eventdev-fbc8341218bc0a373035468445dfd29a433e8f47.zip
dpdk-next-eventdev-fbc8341218bc0a373035468445dfd29a433e8f47.tar.gz
dpdk-next-eventdev-fbc8341218bc0a373035468445dfd29a433e8f47.tar.xz
net/mlx5: fix device scan within switch domain
In LAG configuration the devices in the same switch domain might be spawned on the base of different PCI devices, so we should check all devices backed by mlx5 PMD whether they belong to specified switch domain. When the new devices are being created it is not possible to detect whether the sibling devices created in the current probe() loop belong to the driver, driver field is not filled yet (it will be done on returned success of current probe()). This patch updates the device scanning, allowing extra match on current backing PCI device, is being used to create siblings. Fixes: f7e95215ac7c ("net/mlx5: extend switch domain searching range") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index aa645d0..f2b1752 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -601,7 +601,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->switch_info.port_id |=
priv->pf_bond << MLX5_PORT_ID_BONDING_PF_SHIFT;
}
- MLX5_ETH_FOREACH_DEV(port_id) {
+ MLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {
struct mlx5_priv *opriv =
rte_eth_devices[port_id].data->dev_private;
@@ -734,7 +734,7 @@ mlx5_find_master_dev(struct rte_eth_dev *dev)
priv = dev->data->dev_private;
domain_id = priv->domain_id;
assert(priv->representor);
- MLX5_ETH_FOREACH_DEV(port_id) {
+ MLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {
struct mlx5_priv *opriv =
rte_eth_devices[port_id].data->dev_private;
if (opriv &&