MCPcopy Create free account
hub / github.com/F-Stack/f-stack / idxd_probe_dsa

Function idxd_probe_dsa

dpdk/drivers/dma/idxd/idxd_bus.c:217–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static int
218idxd_probe_dsa(struct rte_dsa_device *dev)
219{
220 struct idxd_dmadev idxd = {0};
221 int ret = 0;
222
223 IDXD_PMD_INFO("Probing device %s on numa node %d",
224 dev->wq_name, dev->device.numa_node);
225 if (read_wq_int(dev, "size", &ret) < 0)
226 return -1;
227 idxd.max_batches = ret;
228 if (read_wq_int(dev, "max_batch_size", &ret) < 0)
229 return -1;
230 idxd.max_batch_size = ret;
231 idxd.qid = dev->addr.wq_id;
232 idxd.u.bus.dsa_id = dev->addr.device_id;
233 idxd.sva_support = 1;
234
235 idxd.portal = idxd_bus_mmap_wq(dev);
236 if (idxd.portal == NULL) {
237 IDXD_PMD_ERR("WQ mmap failed");
238 return -ENOENT;
239 }
240
241 ret = idxd_dmadev_create(dev->wq_name, &dev->device, &idxd, &idxd_bus_ops);
242 if (ret) {
243 IDXD_PMD_ERR("Failed to create dmadev %s", dev->wq_name);
244 return ret;
245 }
246
247 return 0;
248}
249
250static int search_devargs(const char *name)
251{

Callers 1

dsa_probeFunction · 0.85

Calls 3

read_wq_intFunction · 0.85
idxd_bus_mmap_wqFunction · 0.85
idxd_dmadev_createFunction · 0.85

Tested by

no test coverage detected