Lines Matching refs:eth_dev
114 int cxgbe_dev_info_get(struct rte_eth_dev *eth_dev, in cxgbe_dev_info_get() argument
117 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_info_get()
152 int cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev) in cxgbe_dev_promiscuous_enable() argument
154 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_promiscuous_enable()
161 int cxgbe_dev_promiscuous_disable(struct rte_eth_dev *eth_dev) in cxgbe_dev_promiscuous_disable() argument
163 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_promiscuous_disable()
170 int cxgbe_dev_allmulticast_enable(struct rte_eth_dev *eth_dev) in cxgbe_dev_allmulticast_enable() argument
172 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_allmulticast_enable()
181 int cxgbe_dev_allmulticast_disable(struct rte_eth_dev *eth_dev) in cxgbe_dev_allmulticast_disable() argument
183 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_allmulticast_disable()
192 int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev, in cxgbe_dev_link_update() argument
195 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_link_update()
225 return rte_eth_linkstatus_set(eth_dev, &new_link); in cxgbe_dev_link_update()
286 int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu) in cxgbe_dev_mtu_set() argument
288 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_mtu_set()
294 err = cxgbe_dev_info_get(eth_dev, &dev_info); in cxgbe_dev_mtu_set()
304 eth_dev->data->dev_conf.rxmode.offloads |= in cxgbe_dev_mtu_set()
307 eth_dev->data->dev_conf.rxmode.offloads &= in cxgbe_dev_mtu_set()
313 eth_dev->data->dev_conf.rxmode.max_rx_pkt_len = new_mtu; in cxgbe_dev_mtu_set()
321 int cxgbe_dev_close(struct rte_eth_dev *eth_dev) in cxgbe_dev_close() argument
323 struct port_info *temp_pi, *pi = eth_dev->data->dev_private; in cxgbe_dev_close()
361 int cxgbe_dev_start(struct rte_eth_dev *eth_dev) in cxgbe_dev_start() argument
363 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_start()
364 struct rte_eth_rxmode *rx_conf = ð_dev->data->dev_conf.rxmode; in cxgbe_dev_start()
386 eth_dev->data->scattered_rx = 1; in cxgbe_dev_start()
388 eth_dev->data->scattered_rx = 0; in cxgbe_dev_start()
397 err = cxgbe_dev_tx_queue_start(eth_dev, i); in cxgbe_dev_start()
403 err = cxgbe_dev_rx_queue_start(eth_dev, i); in cxgbe_dev_start()
419 int cxgbe_dev_stop(struct rte_eth_dev *eth_dev) in cxgbe_dev_stop() argument
421 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_stop()
436 eth_dev->data->scattered_rx = 0; in cxgbe_dev_stop()
441 int cxgbe_dev_configure(struct rte_eth_dev *eth_dev) in cxgbe_dev_configure() argument
443 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_configure()
449 if (eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) in cxgbe_dev_configure()
450 eth_dev->data->dev_conf.rxmode.offloads |= in cxgbe_dev_configure()
465 err = cxgbe_cfg_queue_count(eth_dev); in cxgbe_dev_configure()
472 int cxgbe_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) in cxgbe_dev_tx_queue_start() argument
476 (eth_dev->data->tx_queues[tx_queue_id]); in cxgbe_dev_tx_queue_start()
482 eth_dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; in cxgbe_dev_tx_queue_start()
487 int cxgbe_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) in cxgbe_dev_tx_queue_stop() argument
491 (eth_dev->data->tx_queues[tx_queue_id]); in cxgbe_dev_tx_queue_stop()
497 eth_dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; in cxgbe_dev_tx_queue_stop()
502 int cxgbe_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, in cxgbe_dev_tx_queue_setup() argument
507 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_tx_queue_setup()
516 __func__, eth_dev->data->nb_tx_queues, queue_idx, nb_desc, in cxgbe_dev_tx_queue_setup()
520 if (eth_dev->data->tx_queues[queue_idx]) { in cxgbe_dev_tx_queue_setup()
521 cxgbe_dev_tx_queue_release(eth_dev->data->tx_queues[queue_idx]); in cxgbe_dev_tx_queue_setup()
522 eth_dev->data->tx_queues[queue_idx] = NULL; in cxgbe_dev_tx_queue_setup()
525 eth_dev->data->tx_queues[queue_idx] = (void *)txq; in cxgbe_dev_tx_queue_setup()
546 err = t4_sge_alloc_eth_txq(adapter, txq, eth_dev, queue_idx, in cxgbe_dev_tx_queue_setup()
560 (txq->eth_dev->data->dev_private); in cxgbe_dev_tx_queue_release()
570 int cxgbe_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id) in cxgbe_dev_rx_queue_start() argument
572 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_rx_queue_start()
580 rxq = eth_dev->data->rx_queues[rx_queue_id]; in cxgbe_dev_rx_queue_start()
583 eth_dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; in cxgbe_dev_rx_queue_start()
588 int cxgbe_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id) in cxgbe_dev_rx_queue_stop() argument
590 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_rx_queue_stop()
598 rxq = eth_dev->data->rx_queues[rx_queue_id]; in cxgbe_dev_rx_queue_stop()
601 eth_dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; in cxgbe_dev_rx_queue_stop()
606 int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, in cxgbe_dev_rx_queue_setup() argument
612 unsigned int pkt_len = eth_dev->data->dev_conf.rxmode.max_rx_pkt_len; in cxgbe_dev_rx_queue_setup()
613 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_rx_queue_setup()
623 __func__, eth_dev->data->nb_rx_queues, queue_idx, nb_desc, in cxgbe_dev_rx_queue_setup()
626 err = cxgbe_dev_info_get(eth_dev, &dev_info); in cxgbe_dev_rx_queue_setup()
643 if (eth_dev->data->rx_queues[queue_idx]) { in cxgbe_dev_rx_queue_setup()
644 cxgbe_dev_rx_queue_release(eth_dev->data->rx_queues[queue_idx]); in cxgbe_dev_rx_queue_setup()
645 eth_dev->data->rx_queues[queue_idx] = NULL; in cxgbe_dev_rx_queue_setup()
648 eth_dev->data->rx_queues[queue_idx] = (void *)rxq; in cxgbe_dev_rx_queue_setup()
673 eth_dev->data->dev_conf.rxmode.offloads |= in cxgbe_dev_rx_queue_setup()
676 eth_dev->data->dev_conf.rxmode.offloads &= in cxgbe_dev_rx_queue_setup()
679 err = t4_sge_alloc_rxq(adapter, &rxq->rspq, false, eth_dev, msi_idx, in cxgbe_dev_rx_queue_setup()
697 (rxq->rspq.eth_dev->data->dev_private); in cxgbe_dev_rx_queue_release()
710 static int cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev, in cxgbe_dev_stats_get() argument
713 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_stats_get()
758 static int cxgbe_dev_stats_reset(struct rte_eth_dev *eth_dev) in cxgbe_dev_stats_reset() argument
760 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_dev_stats_reset()
785 static int cxgbe_flow_ctrl_get(struct rte_eth_dev *eth_dev, in cxgbe_flow_ctrl_get() argument
788 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_flow_ctrl_get()
807 static int cxgbe_flow_ctrl_set(struct rte_eth_dev *eth_dev, in cxgbe_flow_ctrl_set() argument
810 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_flow_ctrl_set()
838 cxgbe_dev_supported_ptypes_get(struct rte_eth_dev *eth_dev) in cxgbe_dev_supported_ptypes_get() argument
846 if (eth_dev->rx_pkt_burst == cxgbe_recv_pkts) in cxgbe_dev_supported_ptypes_get()
1135 static int cxgbe_get_regs_len(struct rte_eth_dev *eth_dev) in cxgbe_get_regs_len() argument
1137 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_get_regs_len()
1143 static int cxgbe_get_regs(struct rte_eth_dev *eth_dev, in cxgbe_get_regs() argument
1146 struct port_info *pi = eth_dev->data->dev_private; in cxgbe_get_regs()
1154 regs->length = cxgbe_get_regs_len(eth_dev); in cxgbe_get_regs()
1223 static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev) in eth_cxgbe_dev_init() argument
1226 struct port_info *pi = eth_dev->data->dev_private; in eth_cxgbe_dev_init()
1233 eth_dev->dev_ops = &cxgbe_eth_dev_ops; in eth_cxgbe_dev_init()
1234 eth_dev->rx_pkt_burst = &cxgbe_recv_pkts; in eth_cxgbe_dev_init()
1235 eth_dev->tx_pkt_burst = &cxgbe_xmit_pkts; in eth_cxgbe_dev_init()
1236 pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in eth_cxgbe_dev_init()
1254 eth_dev->dev_ops; in eth_cxgbe_dev_init()
1256 eth_dev->rx_pkt_burst; in eth_cxgbe_dev_init()
1258 eth_dev->tx_pkt_burst; in eth_cxgbe_dev_init()
1265 eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; in eth_cxgbe_dev_init()
1267 snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id); in eth_cxgbe_dev_init()
1280 adapter->eth_dev = eth_dev; in eth_cxgbe_dev_init()
1299 static int eth_cxgbe_dev_uninit(struct rte_eth_dev *eth_dev) in eth_cxgbe_dev_uninit() argument
1301 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in eth_cxgbe_dev_uninit()