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

Function pci_bdf_parse

dpdk/lib/pci/rte_pci.c:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static int
43pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr)
44{
45 const char *in = input;
46
47 dev_addr->domain = 0;
48 in = get_u8_pciaddr_field(in, &dev_addr->bus, ':');
49 if (in == NULL)
50 return -EINVAL;
51 in = get_u8_pciaddr_field(in, &dev_addr->devid, '.');
52 if (in == NULL)
53 return -EINVAL;
54 in = get_u8_pciaddr_field(in, &dev_addr->function, '\0');
55 if (in == NULL)
56 return -EINVAL;
57 return 0;
58}
59
60static int
61pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr)

Callers 1

rte_pci_addr_parseFunction · 0.85

Calls 1

get_u8_pciaddr_fieldFunction · 0.85

Tested by

no test coverage detected