git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/cnxk: support bandwidth profile configure
[dpdk.git]
/
drivers
/
vdpa
/
mlx5
/
mlx5_vdpa.c
diff --git
a/drivers/vdpa/mlx5/mlx5_vdpa.c
b/drivers/vdpa/mlx5/mlx5_vdpa.c
index
9c9a552
..
6d17d7a
100644
(file)
--- a/
drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/
drivers/vdpa/mlx5/mlx5_vdpa.c
@@
-553,9
+553,13
@@
close:
static int
mlx5_vdpa_roce_disable(struct rte_device *dev)
{
static int
mlx5_vdpa_roce_disable(struct rte_device *dev)
{
+ char pci_addr[PCI_PRI_STR_SIZE] = { 0 };
+
+ 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. */
/* 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;
}
return -rte_errno;
return 0;
}