[dpdk-dev] [PATCH v9 13/14] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-19 Thread Tetsuya Mukawa
On 2015/02/19 22:30, Tetsuya Mukawa wrote: > On 2015/02/19 21:10, Thomas Monjalon wrote: >> 2015-02-19 11:49, Tetsuya Mukawa: >>> +/* attach the new virtual device, then store port_id of the device */ >>> +static int >>> +rte_eal_dev_attach_vdev(const char *vdevargs, uint8_t *port_id) >>> +{ >>> +

[dpdk-dev] [PATCH v9 13/14] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-19 Thread Thomas Monjalon
2015-02-19 11:49, Tetsuya Mukawa: > +/* attach the new virtual device, then store port_id of the device */ > +static int > +rte_eal_dev_attach_vdev(const char *vdevargs, uint8_t *port_id) > +{ > + char *args; > + uint8_t new_port_id; > + struct rte_eth_dev devs[RTE_MAX_ETHPORTS]; > + >

[dpdk-dev] [PATCH v9 13/14] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-19 Thread Tetsuya Mukawa
These functions are used for attaching or detaching a port. When rte_eal_dev_attach() is called, the function tries to realize the device name as pci address. If this is done successfully, rte_eal_dev_attach() will attach physical device port. If not, attaches virtual devive port. When