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
Imported Upstream version 16.07-rc1
[deb_dpdk.git]
/
lib
/
librte_eal
/
bsdapp
/
eal
/
eal_pci.c
diff --git
a/lib/librte_eal/bsdapp/eal/eal_pci.c
b/lib/librte_eal/bsdapp/eal/eal_pci.c
index
2d16d78
..
374b68f
100644
(file)
--- a/
lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/
lib/librte_eal/bsdapp/eal/eal_pci.c
@@
-278,6
+278,11
@@
pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
/* get subsystem_device id */
dev->id.subsystem_device_id = conf->pc_subdevice;
/* get subsystem_device id */
dev->id.subsystem_device_id = conf->pc_subdevice;
+ /* get class id */
+ dev->id.class_id = (conf->pc_class << 16) |
+ (conf->pc_subclass << 8) |
+ (conf->pc_progif);
+
/* TODO: get max_vfs */
dev->max_vfs = 0;
/* TODO: get max_vfs */
dev->max_vfs = 0;
@@
-422,7
+427,7
@@
int rte_eal_pci_read_config(const struct rte_pci_device *dev,
goto error;
}
goto error;
}
- fd = open("/dev/pci", O_RD
ONLY
);
+ fd = open("/dev/pci", O_RD
WR
);
if (fd < 0) {
RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
goto error;
if (fd < 0) {
RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
goto error;
@@
-466,7
+471,7
@@
int rte_eal_pci_write_config(const struct rte_pci_device *dev,
memcpy(&pi.pi_data, buf, len);
memcpy(&pi.pi_data, buf, len);
- fd = open("/dev/pci", O_RD
ONLY
);
+ fd = open("/dev/pci", O_RD
WR
);
if (fd < 0) {
RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
goto error;
if (fd < 0) {
RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
goto error;