Lines Matching refs:eth_dev
36 struct rte_eth_dev *eth_dev);
299 avp_dev_ctrl_set_link_state(struct rte_eth_dev *eth_dev, unsigned int state) in avp_dev_ctrl_set_link_state() argument
301 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_ctrl_set_link_state()
316 avp_dev_ctrl_set_config(struct rte_eth_dev *eth_dev, in avp_dev_ctrl_set_config() argument
319 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_ctrl_set_config()
334 avp_dev_ctrl_shutdown(struct rte_eth_dev *eth_dev) in avp_dev_ctrl_shutdown() argument
336 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_ctrl_shutdown()
360 avp_dev_translate_address(struct rte_eth_dev *eth_dev, in avp_dev_translate_address() argument
363 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_translate_address()
414 avp_dev_check_regions(struct rte_eth_dev *eth_dev) in avp_dev_check_regions() argument
416 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_check_regions()
474 avp_dev_detach(struct rte_eth_dev *eth_dev) in avp_dev_detach() argument
476 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_detach()
480 eth_dev->data->port_id, avp->device_id); in avp_dev_detach()
486 eth_dev->data->port_id); in avp_dev_detach()
492 ret = avp_dev_ctrl_shutdown(eth_dev); in avp_dev_detach()
514 _avp_set_rx_queue_mappings(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id) in _avp_set_rx_queue_mappings() argument
517 AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in _avp_set_rx_queue_mappings()
522 rxq = (struct avp_queue *)eth_dev->data->rx_queues[rx_queue_id]; in _avp_set_rx_queue_mappings()
530 queue_count = avp->num_rx_queues / eth_dev->data->nb_rx_queues; in _avp_set_rx_queue_mappings()
531 remainder = avp->num_rx_queues % eth_dev->data->nb_rx_queues; in _avp_set_rx_queue_mappings()
550 _avp_set_queue_counts(struct rte_eth_dev *eth_dev) in _avp_set_queue_counts() argument
552 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in _avp_set_queue_counts()
553 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in _avp_set_queue_counts()
565 avp->num_tx_queues = eth_dev->data->nb_tx_queues; in _avp_set_queue_counts()
575 eth_dev->data->nb_rx_queues); in _avp_set_queue_counts()
582 avp_dev_attach(struct rte_eth_dev *eth_dev) in avp_dev_attach() argument
584 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_attach()
590 eth_dev->data->port_id, avp->device_id); in avp_dev_attach()
596 eth_dev->data->port_id); in avp_dev_attach()
612 ret = avp_dev_create(RTE_ETH_DEV_TO_PCI(eth_dev), eth_dev); in avp_dev_attach()
627 _avp_set_queue_counts(eth_dev); in avp_dev_attach()
628 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) in avp_dev_attach()
629 _avp_set_rx_queue_mappings(eth_dev, i); in avp_dev_attach()
644 ret = avp_dev_ctrl_set_config(eth_dev, &config); in avp_dev_attach()
665 struct rte_eth_dev *eth_dev = data; in avp_dev_interrupt_handler() local
666 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_interrupt_handler()
689 ret = avp_dev_detach(eth_dev); in avp_dev_interrupt_handler()
692 ret = avp_dev_attach(eth_dev); in avp_dev_interrupt_handler()
723 avp_dev_enable_interrupts(struct rte_eth_dev *eth_dev) in avp_dev_enable_interrupts() argument
725 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_enable_interrupts()
748 avp_dev_disable_interrupts(struct rte_eth_dev *eth_dev) in avp_dev_disable_interrupts() argument
750 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_disable_interrupts()
773 avp_dev_setup_interrupts(struct rte_eth_dev *eth_dev) in avp_dev_setup_interrupts() argument
775 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_setup_interrupts()
781 (void *)eth_dev); in avp_dev_setup_interrupts()
789 return avp_dev_enable_interrupts(eth_dev); in avp_dev_setup_interrupts()
793 avp_dev_migration_pending(struct rte_eth_dev *eth_dev) in avp_dev_migration_pending() argument
795 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_migration_pending()
820 struct rte_eth_dev *eth_dev) in avp_dev_create() argument
822 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_create()
862 avp->dev_data = eth_dev->data; in avp_dev_create()
863 avp->port_id = eth_dev->data->port_id; in avp_dev_create()
894 avp->tx_q[i] = avp_dev_translate_address(eth_dev, in avp_dev_create()
897 avp->alloc_q[i] = avp_dev_translate_address(eth_dev, in avp_dev_create()
906 avp->rx_q[i] = avp_dev_translate_address(eth_dev, in avp_dev_create()
908 avp->free_q[i] = avp_dev_translate_address(eth_dev, in avp_dev_create()
920 avp->req_q = avp_dev_translate_address(eth_dev, host_info->req_phys); in avp_dev_create()
921 avp->resp_q = avp_dev_translate_address(eth_dev, host_info->resp_phys); in avp_dev_create()
923 avp_dev_translate_address(eth_dev, host_info->sync_phys); in avp_dev_create()
925 avp_dev_translate_address(eth_dev, host_info->mbuf_phys); in avp_dev_create()
949 eth_avp_dev_init(struct rte_eth_dev *eth_dev) in eth_avp_dev_init() argument
952 AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in eth_avp_dev_init()
956 pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in eth_avp_dev_init()
957 eth_dev->dev_ops = &avp_eth_dev_ops; in eth_avp_dev_init()
958 eth_dev->rx_pkt_burst = &avp_recv_pkts; in eth_avp_dev_init()
959 eth_dev->tx_pkt_burst = &avp_xmit_pkts; in eth_avp_dev_init()
968 if (eth_dev->data->scattered_rx) { in eth_avp_dev_init()
970 eth_dev->rx_pkt_burst = avp_recv_scattered_pkts; in eth_avp_dev_init()
971 eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts; in eth_avp_dev_init()
976 rte_eth_copy_pci_info(eth_dev, pci_dev); in eth_avp_dev_init()
977 eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; in eth_avp_dev_init()
980 if (avp_dev_migration_pending(eth_dev)) { in eth_avp_dev_init()
986 ret = avp_dev_check_regions(eth_dev); in eth_avp_dev_init()
994 ret = avp_dev_setup_interrupts(eth_dev); in eth_avp_dev_init()
1001 ret = avp_dev_create(pci_dev, eth_dev); in eth_avp_dev_init()
1008 eth_dev->data->mac_addrs = rte_zmalloc("avp_ethdev", in eth_avp_dev_init()
1010 if (eth_dev->data->mac_addrs == NULL) { in eth_avp_dev_init()
1017 rte_ether_addr_copy(&avp->ethaddr, ð_dev->data->mac_addrs[0]); in eth_avp_dev_init()
1023 eth_avp_dev_uninit(struct rte_eth_dev *eth_dev) in eth_avp_dev_uninit() argument
1028 if (eth_dev->data == NULL) in eth_avp_dev_uninit()
1031 avp_dev_close(eth_dev); in eth_avp_dev_uninit()
1059 avp_dev_enable_scattered(struct rte_eth_dev *eth_dev, in avp_dev_enable_scattered() argument
1064 max_rx_pkt_len = eth_dev->data->dev_conf.rxmode.max_rx_pkt_len; in avp_dev_enable_scattered()
1091 avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, in avp_dev_rx_queue_setup() argument
1098 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_rx_queue_setup()
1102 if (rx_queue_id >= eth_dev->data->nb_rx_queues) { in avp_dev_rx_queue_setup()
1104 rx_queue_id, eth_dev->data->nb_rx_queues); in avp_dev_rx_queue_setup()
1116 if (avp_dev_enable_scattered(eth_dev, avp)) { in avp_dev_rx_queue_setup()
1117 if (!eth_dev->data->scattered_rx) { in avp_dev_rx_queue_setup()
1119 eth_dev->data->scattered_rx = 1; in avp_dev_rx_queue_setup()
1120 eth_dev->rx_pkt_burst = avp_recv_scattered_pkts; in avp_dev_rx_queue_setup()
1121 eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts; in avp_dev_rx_queue_setup()
1127 eth_dev->data->dev_conf.rxmode.max_rx_pkt_len, in avp_dev_rx_queue_setup()
1141 rxq->dev_data = eth_dev->data; in avp_dev_rx_queue_setup()
1142 eth_dev->data->rx_queues[rx_queue_id] = (void *)rxq; in avp_dev_rx_queue_setup()
1145 _avp_set_rx_queue_mappings(eth_dev, rx_queue_id); in avp_dev_rx_queue_setup()
1155 avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, in avp_dev_tx_queue_setup() argument
1161 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_tx_queue_setup()
1164 if (tx_queue_id >= eth_dev->data->nb_tx_queues) { in avp_dev_tx_queue_setup()
1166 tx_queue_id, eth_dev->data->nb_tx_queues); in avp_dev_tx_queue_setup()
1185 txq->dev_data = eth_dev->data; in avp_dev_tx_queue_setup()
1186 eth_dev->data->tx_queues[tx_queue_id] = (void *)txq; in avp_dev_tx_queue_setup()
1945 avp_dev_rx_queue_release_all(struct rte_eth_dev *eth_dev) in avp_dev_rx_queue_release_all() argument
1947 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_rx_queue_release_all()
1976 avp_dev_tx_queue_release_all(struct rte_eth_dev *eth_dev) in avp_dev_tx_queue_release_all() argument
1978 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_tx_queue_release_all()
1991 avp_dev_configure(struct rte_eth_dev *eth_dev) in avp_dev_configure() argument
1993 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in avp_dev_configure()
1994 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_configure()
2012 _avp_set_queue_counts(eth_dev); in avp_dev_configure()
2017 ret = avp_vlan_offload_set(eth_dev, mask); in avp_dev_configure()
2033 ret = avp_dev_ctrl_set_config(eth_dev, &config); in avp_dev_configure()
2049 avp_dev_start(struct rte_eth_dev *eth_dev) in avp_dev_start() argument
2051 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_start()
2062 ret = avp_dev_ctrl_set_link_state(eth_dev, 1); in avp_dev_start()
2080 avp_dev_stop(struct rte_eth_dev *eth_dev) in avp_dev_stop() argument
2082 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_stop()
2096 ret = avp_dev_ctrl_set_link_state(eth_dev, 0); in avp_dev_stop()
2108 avp_dev_close(struct rte_eth_dev *eth_dev) in avp_dev_close() argument
2110 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_close()
2126 ret = avp_dev_disable_interrupts(eth_dev); in avp_dev_close()
2133 ret = avp_dev_ctrl_shutdown(eth_dev); in avp_dev_close()
2141 avp_dev_rx_queue_release_all(eth_dev); in avp_dev_close()
2142 avp_dev_tx_queue_release_all(eth_dev); in avp_dev_close()
2150 avp_dev_link_update(struct rte_eth_dev *eth_dev, in avp_dev_link_update() argument
2153 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_link_update()
2154 struct rte_eth_link *link = ð_dev->data->dev_link; in avp_dev_link_update()
2164 avp_dev_promiscuous_enable(struct rte_eth_dev *eth_dev) in avp_dev_promiscuous_enable() argument
2166 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_promiscuous_enable()
2172 eth_dev->data->port_id); in avp_dev_promiscuous_enable()
2180 avp_dev_promiscuous_disable(struct rte_eth_dev *eth_dev) in avp_dev_promiscuous_disable() argument
2182 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_promiscuous_disable()
2188 eth_dev->data->port_id); in avp_dev_promiscuous_disable()
2196 avp_dev_info_get(struct rte_eth_dev *eth_dev, in avp_dev_info_get() argument
2199 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_info_get()
2215 avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask) in avp_vlan_offload_set() argument
2217 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_vlan_offload_set()
2218 struct rte_eth_conf *dev_conf = ð_dev->data->dev_conf; in avp_vlan_offload_set()
2246 avp_dev_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats) in avp_dev_stats_get() argument
2248 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_stats_get()
2282 avp_dev_stats_reset(struct rte_eth_dev *eth_dev) in avp_dev_stats_reset() argument
2284 struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); in avp_dev_stats_reset()