Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 17.11-rc3
[deb_dpdk.git]
/
drivers
/
bus
/
pci
/
bsd
/
pci.c
diff --git
a/lib/librte_eal/bsdapp/eal/eal_pci.c
b/drivers/bus/pci/bsd/pci.c
similarity index 98%
rename from
lib/librte_eal/bsdapp/eal/eal_pci.c
rename to
drivers/bus/pci/bsd/pci.c
index
04eacdc
..
facc4b1
100644
(file)
--- a/
lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/
drivers/bus/pci/bsd/pci.c
@@
-57,10
+57,10
@@
#include <rte_interrupts.h>
#include <rte_log.h>
#include <rte_pci.h>
#include <rte_interrupts.h>
#include <rte_log.h>
#include <rte_pci.h>
+#include <rte_bus_pci.h>
#include <rte_common.h>
#include <rte_launch.h>
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_launch.h>
#include <rte_memory.h>
-#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_eal_memconfig.h>
#include <rte_per_lcore.h>
#include <rte_eal.h>
#include <rte_eal_memconfig.h>
#include <rte_per_lcore.h>
@@
-71,7
+71,7
@@
#include <rte_devargs.h>
#include "eal_filesystem.h"
#include <rte_devargs.h>
#include "eal_filesystem.h"
-#include "
eal_
private.h"
+#include "private.h"
/**
* @file
/**
* @file
@@
-323,7
+323,7
@@
pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
int ret;
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
int ret;
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
- ret = rte_
eal_compare_pci_addr
(&dev->addr, &dev2->addr);
+ ret = rte_
pci_addr_cmp
(&dev->addr, &dev2->addr);
if (ret > 0)
continue;
else if (ret < 0) {
if (ret > 0)
continue;
else if (ret < 0) {
@@
-368,7
+368,7
@@
rte_pci_scan(void)
};
/* for debug purposes, PCI can be disabled */
};
/* for debug purposes, PCI can be disabled */
- if (
internal_config.no_pci
)
+ if (
!rte_eal_has_pci()
)
return 0;
fd = open("/dev/pci", O_RDONLY);
return 0;
fd = open("/dev/pci", O_RDONLY);
@@
-403,6
+403,16
@@
error:
return -1;
}
return -1;
}
+/*
+ * Get iommu class of PCI devices on the bus.
+ */
+enum rte_iova_mode
+rte_pci_get_iommu_class(void)
+{
+ /* Supports only RTE_KDRV_NIC_UIO */
+ return RTE_IOVA_PA;
+}
+
int
pci_update_device(const struct rte_pci_addr *addr)
{
int
pci_update_device(const struct rte_pci_addr *addr)
{