Lines Matching refs:eth_dev
117 struct rte_eth_dev *eth_dev; member
513 internal = list->eth_dev->data->dev_private; in find_internal_resource()
529 eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx) in eth_vhost_update_intr() argument
531 struct rte_intr_handle *handle = eth_dev->intr_handle; in eth_vhost_update_intr()
753 queue_setup(struct rte_eth_dev *eth_dev, struct pmd_internal *internal) in queue_setup() argument
758 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { in queue_setup()
759 vq = eth_dev->data->rx_queues[i]; in queue_setup()
764 vq->port = eth_dev->data->port_id; in queue_setup()
766 for (i = 0; i < eth_dev->data->nb_tx_queues; i++) { in queue_setup()
767 vq = eth_dev->data->tx_queues[i]; in queue_setup()
772 vq->port = eth_dev->data->port_id; in queue_setup()
779 struct rte_eth_dev *eth_dev; in new_device() local
796 eth_dev = list->eth_dev; in new_device()
797 internal = eth_dev->data->dev_private; in new_device()
798 dev_conf = ð_dev->data->dev_conf; in new_device()
803 eth_dev->data->numa_node = newnode; in new_device()
808 queue_setup(eth_dev, internal); in new_device()
811 if (eth_vhost_install_intr(eth_dev) < 0) { in new_device()
824 rte_vhost_get_mtu(vid, ð_dev->data->mtu); in new_device()
826 eth_dev->data->dev_link.link_status = ETH_LINK_UP; in new_device()
829 update_queuing_status(eth_dev); in new_device()
833 rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL); in new_device()
841 struct rte_eth_dev *eth_dev; in destroy_device() local
855 eth_dev = list->eth_dev; in destroy_device()
856 internal = eth_dev->data->dev_private; in destroy_device()
859 update_queuing_status(eth_dev); in destroy_device()
861 eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; in destroy_device()
863 if (eth_dev->data->rx_queues && eth_dev->data->tx_queues) { in destroy_device()
864 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { in destroy_device()
865 vq = eth_dev->data->rx_queues[i]; in destroy_device()
870 for (i = 0; i < eth_dev->data->nb_tx_queues; i++) { in destroy_device()
871 vq = eth_dev->data->tx_queues[i]; in destroy_device()
878 state = vring_states[eth_dev->data->port_id]; in destroy_device()
888 eth_vhost_uninstall_intr(eth_dev); in destroy_device()
890 rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL); in destroy_device()
894 vring_conf_update(int vid, struct rte_eth_dev *eth_dev, uint16_t vring_id) in vring_conf_update() argument
896 struct rte_eth_conf *dev_conf = ð_dev->data->dev_conf; in vring_conf_update()
897 struct pmd_internal *internal = eth_dev->data->dev_private; in vring_conf_update()
907 if (rx_idx >= 0 && rx_idx < eth_dev->data->nb_rx_queues && in vring_conf_update()
917 eth_dev->intr_handle->efds[rx_idx] = vring.kickfd; in vring_conf_update()
919 vq = eth_dev->data->rx_queues[rx_idx]; in vring_conf_update()
927 ret = eth_vhost_update_intr(eth_dev, rx_idx); in vring_conf_update()
938 struct rte_eth_dev *eth_dev; in vring_state_changed() local
949 eth_dev = list->eth_dev; in vring_state_changed()
951 state = vring_states[eth_dev->data->port_id]; in vring_state_changed()
953 if (enable && vring_conf_update(vid, eth_dev, vring)) in vring_state_changed()
969 rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL); in vring_state_changed()
981 vhost_driver_setup(struct rte_eth_dev *eth_dev) in vhost_driver_setup() argument
983 struct pmd_internal *internal = eth_dev->data->dev_private; in vhost_driver_setup()
986 unsigned int numa_node = eth_dev->device->numa_node; in vhost_driver_setup()
987 const char *name = eth_dev->device->name; in vhost_driver_setup()
1003 list->eth_dev = eth_dev; in vhost_driver_setup()
1009 vring_states[eth_dev->data->port_id] = vring_state; in vhost_driver_setup()
1037 vring_states[eth_dev->data->port_id] = NULL; in vhost_driver_setup()
1089 struct rte_eth_dev *eth_dev; in rte_eth_vhost_get_vid_from_port_id() local
1099 eth_dev = list->eth_dev; in rte_eth_vhost_get_vid_from_port_id()
1100 if (eth_dev->data->port_id == port_id) { in rte_eth_vhost_get_vid_from_port_id()
1101 vq = eth_dev->data->rx_queues[0]; in rte_eth_vhost_get_vid_from_port_id()
1133 eth_dev_start(struct rte_eth_dev *eth_dev) in eth_dev_start() argument
1135 struct pmd_internal *internal = eth_dev->data->dev_private; in eth_dev_start()
1136 struct rte_eth_conf *dev_conf = ð_dev->data->dev_conf; in eth_dev_start()
1138 queue_setup(eth_dev, internal); in eth_dev_start()
1142 if (eth_vhost_install_intr(eth_dev) < 0) { in eth_dev_start()
1151 update_queuing_status(eth_dev); in eth_dev_start()
1412 struct rte_eth_dev *eth_dev = NULL; in eth_dev_vhost_create() local
1419 eth_dev = rte_eth_vdev_allocate(dev, sizeof(*internal)); in eth_dev_vhost_create()
1420 if (eth_dev == NULL) in eth_dev_vhost_create()
1422 data = eth_dev->data; in eth_dev_vhost_create()
1429 eth_addr->addr_bytes[5] = eth_dev->data->port_id; in eth_dev_vhost_create()
1436 internal = eth_dev->data->dev_private; in eth_dev_vhost_create()
1455 eth_dev->dev_ops = &ops; in eth_dev_vhost_create()
1456 eth_dev->rx_queue_count = eth_rx_queue_count; in eth_dev_vhost_create()
1459 eth_dev->rx_pkt_burst = eth_vhost_rx; in eth_dev_vhost_create()
1460 eth_dev->tx_pkt_burst = eth_vhost_tx; in eth_dev_vhost_create()
1462 rte_eth_dev_probing_finish(eth_dev); in eth_dev_vhost_create()
1468 rte_eth_dev_release_port(eth_dev); in eth_dev_vhost_create()
1516 struct rte_eth_dev *eth_dev; in rte_pmd_vhost_probe() local
1522 eth_dev = rte_eth_dev_attach_secondary(name); in rte_pmd_vhost_probe()
1523 if (!eth_dev) { in rte_pmd_vhost_probe()
1527 eth_dev->rx_pkt_burst = eth_vhost_rx; in rte_pmd_vhost_probe()
1528 eth_dev->tx_pkt_burst = eth_vhost_tx; in rte_pmd_vhost_probe()
1529 eth_dev->dev_ops = &ops; in rte_pmd_vhost_probe()
1532 eth_dev->device = &dev->device; in rte_pmd_vhost_probe()
1533 rte_eth_dev_probing_finish(eth_dev); in rte_pmd_vhost_probe()
1642 struct rte_eth_dev *eth_dev = NULL; in rte_pmd_vhost_remove() local
1648 eth_dev = rte_eth_dev_allocated(name); in rte_pmd_vhost_remove()
1649 if (eth_dev == NULL) in rte_pmd_vhost_remove()
1652 eth_dev_close(eth_dev); in rte_pmd_vhost_remove()
1653 rte_eth_dev_release_port(eth_dev); in rte_pmd_vhost_remove()