[dpdk-dev] [RFC 13/14] vdpa/mlx5: support SubFunction
Xueming Li
xuemingl at nvidia.com
Thu May 27 16:02:01 CEST 2021
From: Thomas Monjalon <thomas at monjalon.net>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
drivers/vdpa/mlx5/mlx5_vdpa.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 967234193f..2f4420becd 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -553,9 +553,13 @@ mlx5_vdpa_sys_roce_disable(const char *addr)
static int
mlx5_vdpa_roce_disable(struct rte_device *dev)
{
+ char pci_addr[PCI_PRI_STR_SIZE];
+
+ if (mlx5_dev_to_pci_str(dev, pci_addr, sizeof(pci_addr)) < 0)
+ return -rte_errno;
/* Firstly try to disable ROCE by Netlink and fallback to sysfs. */
- if (mlx5_vdpa_nl_roce_disable(dev->name) != 0 &&
- mlx5_vdpa_sys_roce_disable(dev->name) != 0)
+ if (mlx5_vdpa_nl_roce_disable(pci_addr) != 0 &&
+ mlx5_vdpa_sys_roce_disable(pci_addr) != 0)
return -rte_errno;
return 0;
}
--
2.25.1
More information about the dev
mailing list