<snip>
+static void *
+idxd_vdev_mmap_wq(struct rte_dsa_device *dev)
Some inconsistent naming between vdev and bus in some of these functions
the above should be idxd_bus_mmap_wq for example.
+{
+ void *addr;
+ char path[PATH_MAX];
+ int fd;
+
+ snprintf(path, sizeof(path), "%s/%s", dsa_get_dev_path(), dev->wq_name);
+ fd = open(path, O_RDWR);
+ if (fd < 0) {
+ IDXD_PMD_ERR("Failed to open device path: %s", path);
+ return NULL;
+ }
+
+ addr = mmap(NULL, 0x1000, PROT_WRITE, MAP_SHARED, fd, 0);
+ close(fd);
+ if (addr == MAP_FAILED) {
+ IDXD_PMD_ERR("Failed to mmap device %s", path);
+ return NULL;
+ }
+
+ return addr;
+}
Reviewed-by: Conor Walsh <[email protected]>