{
int ret;
- if ((name == NULL) || (pci_dev == NULL))
- return -EINVAL;
-
ret = snprintf(name, size, "%d:%d.%d",
pci_dev->addr.bus, pci_dev->addr.devid,
pci_dev->addr.function);
static int
rte_eth_dev_attach_pdev(struct rte_pci_addr *addr, uint8_t *port_id)
{
- if ((addr == NULL) || (port_id == NULL))
- goto err;
-
/* re-construct pci_device_list */
if (rte_eal_pci_scan())
goto err;
struct rte_pci_addr freed_addr;
struct rte_pci_addr vp;
- if (addr == NULL)
- goto err;
-
/* check whether the driver supports detach feature, or not */
if (rte_eth_dev_is_detachable(port_id))
goto err;
char *name = NULL, *args = NULL;
int ret = -1;
- if ((vdevargs == NULL) || (port_id == NULL))
- goto end;
-
/* parse vdevargs, then retrieve device name and args */
if (rte_eal_parse_devargs_str(vdevargs, &name, &args))
goto end;
{
char name[RTE_ETH_NAME_MAX_LEN];
- if (vdevname == NULL)
- goto err;
-
/* check whether the driver supports detach feature, or not */
if (rte_eth_dev_is_detachable(port_id))
goto err;