pci: fix namespace prefix of new functions
Some symbols were introduced with the wrong prefix. Add the usual "rte_" prefix when needed. Fixes: c752998b5e2e ("pci: introduce library and driver") Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
This commit is contained in:
parent
77dad68c20
commit
0e3ef055be
@ -324,7 +324,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
|
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
|
||||||
ret = pci_addr_cmp(&dev->addr, &dev2->addr);
|
ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
continue;
|
continue;
|
||||||
else if (ret < 0) {
|
else if (ret < 0) {
|
||||||
|
@ -366,7 +366,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
|
TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
|
||||||
ret = pci_addr_cmp(&dev->addr, &dev2->addr);
|
ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
|
|||||||
|
|
||||||
/* if we're in a secondary process, just find our tailq entry */
|
/* if we're in a secondary process, just find our tailq entry */
|
||||||
TAILQ_FOREACH(vfio_res, vfio_res_list, next) {
|
TAILQ_FOREACH(vfio_res, vfio_res_list, next) {
|
||||||
if (pci_addr_cmp(&vfio_res->pci_addr,
|
if (rte_pci_addr_cmp(&vfio_res->pci_addr,
|
||||||
&dev->addr))
|
&dev->addr))
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
@ -82,7 +82,7 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
|
|||||||
if (devargs->bus != pbus)
|
if (devargs->bus != pbus)
|
||||||
continue;
|
continue;
|
||||||
devargs->bus->parse(devargs->name, &addr);
|
devargs->bus->parse(devargs->name, &addr);
|
||||||
if (!pci_addr_cmp(&dev->addr, &addr))
|
if (!rte_pci_addr_cmp(&dev->addr, &addr))
|
||||||
return devargs;
|
return devargs;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -309,7 +309,7 @@ rte_pci_probe_one(const struct rte_pci_addr *addr)
|
|||||||
goto err_return;
|
goto err_return;
|
||||||
|
|
||||||
FOREACH_DEVICE_ON_PCIBUS(dev) {
|
FOREACH_DEVICE_ON_PCIBUS(dev) {
|
||||||
if (pci_addr_cmp(&dev->addr, addr))
|
if (rte_pci_addr_cmp(&dev->addr, addr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = pci_probe_all_drivers(dev);
|
ret = pci_probe_all_drivers(dev);
|
||||||
@ -339,7 +339,7 @@ rte_pci_detach(const struct rte_pci_addr *addr)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
FOREACH_DEVICE_ON_PCIBUS(dev) {
|
FOREACH_DEVICE_ON_PCIBUS(dev) {
|
||||||
if (pci_addr_cmp(&dev->addr, addr))
|
if (rte_pci_addr_cmp(&dev->addr, addr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = rte_pci_detach_dev(dev);
|
ret = rte_pci_detach_dev(dev);
|
||||||
@ -441,7 +441,7 @@ pci_parse(const char *name, void *addr)
|
|||||||
struct rte_pci_addr pci_addr;
|
struct rte_pci_addr pci_addr;
|
||||||
bool parse;
|
bool parse;
|
||||||
|
|
||||||
parse = (pci_addr_parse(name, &pci_addr) == 0);
|
parse = (rte_pci_addr_parse(name, &pci_addr) == 0);
|
||||||
if (parse && addr != NULL)
|
if (parse && addr != NULL)
|
||||||
*out = pci_addr;
|
*out = pci_addr;
|
||||||
return parse == false;
|
return parse == false;
|
||||||
|
@ -63,7 +63,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
|
|||||||
TAILQ_FOREACH(uio_res, uio_res_list, next) {
|
TAILQ_FOREACH(uio_res, uio_res_list, next) {
|
||||||
|
|
||||||
/* skip this element if it doesn't match our PCI address */
|
/* skip this element if it doesn't match our PCI address */
|
||||||
if (pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
|
if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (i = 0; i != uio_res->nb_maps; i++) {
|
for (i = 0; i != uio_res->nb_maps; i++) {
|
||||||
@ -189,7 +189,7 @@ pci_uio_find_resource(struct rte_pci_device *dev)
|
|||||||
TAILQ_FOREACH(uio_res, uio_res_list, next) {
|
TAILQ_FOREACH(uio_res, uio_res_list, next) {
|
||||||
|
|
||||||
/* skip this element if it doesn't match our PCI address */
|
/* skip this element if it doesn't match our PCI address */
|
||||||
if (!pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
|
if (!rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
|
||||||
return uio_res;
|
return uio_res;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -128,13 +128,6 @@ eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr)
|
|||||||
void
|
void
|
||||||
rte_pci_device_name(const struct rte_pci_addr *addr,
|
rte_pci_device_name(const struct rte_pci_addr *addr,
|
||||||
char *output, size_t size)
|
char *output, size_t size)
|
||||||
{
|
|
||||||
pci_device_name(addr, output, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
pci_device_name(const struct rte_pci_addr *addr,
|
|
||||||
char *output, size_t size)
|
|
||||||
{
|
{
|
||||||
RTE_VERIFY(size >= PCI_PRI_STR_SIZE);
|
RTE_VERIFY(size >= PCI_PRI_STR_SIZE);
|
||||||
RTE_VERIFY(snprintf(output, size, PCI_PRI_FMT,
|
RTE_VERIFY(snprintf(output, size, PCI_PRI_FMT,
|
||||||
@ -146,11 +139,11 @@ int
|
|||||||
rte_eal_compare_pci_addr(const struct rte_pci_addr *addr,
|
rte_eal_compare_pci_addr(const struct rte_pci_addr *addr,
|
||||||
const struct rte_pci_addr *addr2)
|
const struct rte_pci_addr *addr2)
|
||||||
{
|
{
|
||||||
return pci_addr_cmp(addr, addr2);
|
return rte_pci_addr_cmp(addr, addr2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_addr_cmp(const struct rte_pci_addr *addr,
|
rte_pci_addr_cmp(const struct rte_pci_addr *addr,
|
||||||
const struct rte_pci_addr *addr2)
|
const struct rte_pci_addr *addr2)
|
||||||
{
|
{
|
||||||
uint64_t dev_addr, dev_addr2;
|
uint64_t dev_addr, dev_addr2;
|
||||||
@ -172,7 +165,7 @@ pci_addr_cmp(const struct rte_pci_addr *addr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_addr_parse(const char *str, struct rte_pci_addr *addr)
|
rte_pci_addr_parse(const char *str, struct rte_pci_addr *addr)
|
||||||
{
|
{
|
||||||
if (pci_bdf_parse(str, addr) == 0 ||
|
if (pci_bdf_parse(str, addr) == 0 ||
|
||||||
pci_dbdf_parse(str, addr) == 0)
|
pci_dbdf_parse(str, addr) == 0)
|
||||||
|
@ -166,7 +166,6 @@ int eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr);
|
|||||||
int eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr);
|
int eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
|
||||||
* Utility function to write a pci device name, this device name can later be
|
* Utility function to write a pci device name, this device name can later be
|
||||||
* used to retrieve the corresponding rte_pci_addr using eal_parse_pci_*
|
* used to retrieve the corresponding rte_pci_addr using eal_parse_pci_*
|
||||||
* BDF helpers.
|
* BDF helpers.
|
||||||
@ -181,21 +180,6 @@ int eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr);
|
|||||||
void rte_pci_device_name(const struct rte_pci_addr *addr,
|
void rte_pci_device_name(const struct rte_pci_addr *addr,
|
||||||
char *output, size_t size);
|
char *output, size_t size);
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility function to write a pci device name, this device name can later be
|
|
||||||
* used to retrieve the corresponding rte_pci_addr using eal_parse_pci_*
|
|
||||||
* BDF helpers.
|
|
||||||
*
|
|
||||||
* @param addr
|
|
||||||
* The PCI Bus-Device-Function address
|
|
||||||
* @param output
|
|
||||||
* The output buffer string
|
|
||||||
* @param size
|
|
||||||
* The output buffer size
|
|
||||||
*/
|
|
||||||
void pci_device_name(const struct rte_pci_addr *addr,
|
|
||||||
char *output, size_t size);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* Utility function to compare two PCI device addresses.
|
* Utility function to compare two PCI device addresses.
|
||||||
@ -224,7 +208,7 @@ int rte_eal_compare_pci_addr(const struct rte_pci_addr *addr,
|
|||||||
* Positive on addr is greater than addr2.
|
* Positive on addr is greater than addr2.
|
||||||
* Negative on addr is less than addr2, or error.
|
* Negative on addr is less than addr2, or error.
|
||||||
*/
|
*/
|
||||||
int pci_addr_cmp(const struct rte_pci_addr *addr,
|
int rte_pci_addr_cmp(const struct rte_pci_addr *addr,
|
||||||
const struct rte_pci_addr *addr2);
|
const struct rte_pci_addr *addr2);
|
||||||
|
|
||||||
|
|
||||||
@ -240,7 +224,7 @@ int pci_addr_cmp(const struct rte_pci_addr *addr,
|
|||||||
* 0 on success
|
* 0 on success
|
||||||
* <0 otherwise
|
* <0 otherwise
|
||||||
*/
|
*/
|
||||||
int pci_addr_parse(const char *str, struct rte_pci_addr *addr);
|
int rte_pci_addr_parse(const char *str, struct rte_pci_addr *addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map a particular resource from a file.
|
* Map a particular resource from a file.
|
||||||
|
@ -3,9 +3,9 @@ DPDK_17.11 {
|
|||||||
|
|
||||||
eal_parse_pci_BDF;
|
eal_parse_pci_BDF;
|
||||||
eal_parse_pci_DomBDF;
|
eal_parse_pci_DomBDF;
|
||||||
pci_addr_cmp;
|
rte_pci_addr_cmp;
|
||||||
pci_addr_parse;
|
rte_pci_addr_parse;
|
||||||
pci_device_name;
|
rte_pci_device_name;
|
||||||
pci_map_resource;
|
pci_map_resource;
|
||||||
pci_unmap_resource;
|
pci_unmap_resource;
|
||||||
rte_eal_compare_pci_addr;
|
rte_eal_compare_pci_addr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user