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

Function timvf_bar

dpdk/drivers/event/octeontx/timvf_probe.c:71–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void*
72timvf_bar(uint8_t vfid, uint8_t bar)
73{
74 uint16_t global_domain = octeontx_get_global_domain();
75 struct timvf_res *res = NULL;
76 int i;
77
78 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
79 return NULL;
80
81 for (i = 0; i < tdev.total_timvfs; i++) {
82 if (tdev.rings[i].domain != global_domain)
83 continue;
84 if (tdev.rings[i].vfid == vfid)
85 res = &tdev.rings[i];
86
87 }
88
89 if (res == NULL)
90 return NULL;
91
92 switch (bar) {
93 case 0:
94 return res->bar0;
95 case 4:
96 return res->bar4;
97 default:
98 return NULL;
99 }
100}
101
102static int
103timvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)

Callers 1

timvf_ring_createFunction · 0.85

Calls 2

rte_eal_process_typeFunction · 0.85

Tested by

no test coverage detected