Lines Matching refs:eth_dev

60 lio_send_rx_ctrl_cmd(struct rte_eth_dev *eth_dev, int start_stop)  in lio_send_rx_ctrl_cmd()  argument
62 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_send_rx_ctrl_cmd()
74 ctrl_cmd.eth_dev = eth_dev; in lio_send_rx_ctrl_cmd()
141 lio_dev_xstats_get(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *xstats, in lio_dev_xstats_get() argument
144 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_xstats_get()
216 lio_dev_xstats_get_names(struct rte_eth_dev *eth_dev, in lio_dev_xstats_get_names() argument
220 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_xstats_get_names()
244 lio_dev_xstats_reset(struct rte_eth_dev *eth_dev) in lio_dev_xstats_reset() argument
246 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_xstats_reset()
265 ctrl_cmd.eth_dev = eth_dev; in lio_dev_xstats_reset()
284 RTE_FUNC_PTR_OR_ERR_RET(*eth_dev->dev_ops->stats_reset, 0); in lio_dev_xstats_reset()
285 return (*eth_dev->dev_ops->stats_reset)(eth_dev); in lio_dev_xstats_reset()
290 lio_dev_stats_get(struct rte_eth_dev *eth_dev, in lio_dev_stats_get() argument
293 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_stats_get()
303 for (i = 0; i < eth_dev->data->nb_tx_queues; i++) { in lio_dev_stats_get()
322 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { in lio_dev_stats_get()
342 lio_dev_stats_reset(struct rte_eth_dev *eth_dev) in lio_dev_stats_reset() argument
344 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_stats_reset()
351 for (i = 0; i < eth_dev->data->nb_tx_queues; i++) { in lio_dev_stats_reset()
360 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { in lio_dev_stats_reset()
373 lio_dev_info_get(struct rte_eth_dev *eth_dev, in lio_dev_info_get() argument
376 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_info_get()
377 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in lio_dev_info_get()
434 lio_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu) in lio_dev_mtu_set() argument
436 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_mtu_set()
456 ctrl_cmd.eth_dev = eth_dev; in lio_dev_mtu_set()
477 lio_dev_rss_reta_update(struct rte_eth_dev *eth_dev, in lio_dev_rss_reta_update() argument
481 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rss_reta_update()
511 ctrl_cmd.eth_dev = eth_dev; in lio_dev_rss_reta_update()
550 lio_dev_rss_reta_query(struct rte_eth_dev *eth_dev, in lio_dev_rss_reta_query() argument
554 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rss_reta_query()
578 lio_dev_rss_hash_conf_get(struct rte_eth_dev *eth_dev, in lio_dev_rss_hash_conf_get() argument
581 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rss_hash_conf_get()
616 lio_dev_rss_hash_update(struct rte_eth_dev *eth_dev, in lio_dev_rss_hash_update() argument
619 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rss_hash_update()
641 ctrl_cmd.eth_dev = eth_dev; in lio_dev_rss_hash_update()
750 lio_dev_udp_tunnel_add(struct rte_eth_dev *eth_dev, in lio_dev_udp_tunnel_add() argument
753 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_udp_tunnel_add()
773 ctrl_cmd.eth_dev = eth_dev; in lio_dev_udp_tunnel_add()
807 lio_dev_udp_tunnel_del(struct rte_eth_dev *eth_dev, in lio_dev_udp_tunnel_del() argument
810 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_udp_tunnel_del()
830 ctrl_cmd.eth_dev = eth_dev; in lio_dev_udp_tunnel_del()
852 lio_dev_vlan_filter_set(struct rte_eth_dev *eth_dev, uint16_t vlan_id, int on) in lio_dev_vlan_filter_set() argument
854 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_vlan_filter_set()
869 ctrl_cmd.eth_dev = eth_dev; in lio_dev_vlan_filter_set()
907 lio_dev_link_update(struct rte_eth_dev *eth_dev, in lio_dev_link_update() argument
910 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_link_update()
923 return rte_eth_linkstatus_set(eth_dev, &link); in lio_dev_link_update()
940 return rte_eth_linkstatus_set(eth_dev, &link); in lio_dev_link_update()
952 lio_change_dev_flag(struct rte_eth_dev *eth_dev) in lio_change_dev_flag() argument
954 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_change_dev_flag()
966 ctrl_cmd.eth_dev = eth_dev; in lio_change_dev_flag()
988 lio_dev_promiscuous_enable(struct rte_eth_dev *eth_dev) in lio_dev_promiscuous_enable() argument
990 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_promiscuous_enable()
1005 return lio_change_dev_flag(eth_dev); in lio_dev_promiscuous_enable()
1009 lio_dev_promiscuous_disable(struct rte_eth_dev *eth_dev) in lio_dev_promiscuous_disable() argument
1011 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_promiscuous_disable()
1026 return lio_change_dev_flag(eth_dev); in lio_dev_promiscuous_disable()
1030 lio_dev_allmulticast_enable(struct rte_eth_dev *eth_dev) in lio_dev_allmulticast_enable() argument
1032 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_allmulticast_enable()
1041 return lio_change_dev_flag(eth_dev); in lio_dev_allmulticast_enable()
1045 lio_dev_allmulticast_disable(struct rte_eth_dev *eth_dev) in lio_dev_allmulticast_disable() argument
1047 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_allmulticast_disable()
1056 return lio_change_dev_flag(eth_dev); in lio_dev_allmulticast_disable()
1060 lio_dev_rss_configure(struct rte_eth_dev *eth_dev) in lio_dev_rss_configure() argument
1062 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rss_configure()
1071 rss_conf = eth_dev->data->dev_conf.rx_adv_conf.rss_conf; in lio_dev_rss_configure()
1074 lio_dev_rss_hash_update(eth_dev, &rss_conf); in lio_dev_rss_configure()
1081 lio_dev_rss_hash_update(eth_dev, &rss_conf); in lio_dev_rss_configure()
1087 q_idx = (uint8_t)((eth_dev->data->nb_rx_queues > 1) ? in lio_dev_rss_configure()
1088 i % eth_dev->data->nb_rx_queues : 0); in lio_dev_rss_configure()
1095 lio_dev_rss_reta_update(eth_dev, reta_conf, LIO_RSS_MAX_TABLE_SZ); in lio_dev_rss_configure()
1099 lio_dev_mq_rx_configure(struct rte_eth_dev *eth_dev) in lio_dev_mq_rx_configure() argument
1101 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_mq_rx_configure()
1105 switch (eth_dev->data->dev_conf.rxmode.mq_mode) { in lio_dev_mq_rx_configure()
1107 lio_dev_rss_configure(eth_dev); in lio_dev_mq_rx_configure()
1114 lio_dev_rss_hash_update(eth_dev, &rss_conf); in lio_dev_mq_rx_configure()
1143 lio_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no, in lio_dev_rx_queue_setup() argument
1148 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_rx_queue_setup()
1163 if (eth_dev->data->rx_queues[q_no] != NULL) { in lio_dev_rx_queue_setup()
1164 lio_dev_rx_queue_release(eth_dev, q_no); in lio_dev_rx_queue_setup()
1165 eth_dev->data->rx_queues[q_no] = NULL; in lio_dev_rx_queue_setup()
1177 eth_dev->data->rx_queues[q_no] = lio_dev->droq[fw_mapped_oq]; in lio_dev_rx_queue_setup()
1229 lio_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no, in lio_dev_tx_queue_setup() argument
1233 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_tx_queue_setup()
1245 if (eth_dev->data->tx_queues[q_no] != NULL) { in lio_dev_tx_queue_setup()
1246 lio_dev_tx_queue_release(eth_dev, q_no); in lio_dev_tx_queue_setup()
1247 eth_dev->data->tx_queues[q_no] = NULL; in lio_dev_tx_queue_setup()
1267 eth_dev->data->tx_queues[q_no] = lio_dev->instr_queue[fw_mapped_iq]; in lio_dev_tx_queue_setup()
1304 lio_dev_get_link_status(struct rte_eth_dev *eth_dev) in lio_dev_get_link_status() argument
1306 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_get_link_status()
1344 if (ls->s.mtu < eth_dev->data->mtu) { in lio_dev_get_link_status()
1347 eth_dev->data->mtu = ls->s.mtu; in lio_dev_get_link_status()
1350 lio_dev_link_update(eth_dev, 0); in lio_dev_get_link_status()
1365 lio_sync_link_state_check(void *eth_dev) in lio_sync_link_state_check() argument
1368 (((struct rte_eth_dev *)eth_dev)->data->dev_private); in lio_sync_link_state_check()
1371 lio_dev_get_link_status(eth_dev); in lio_sync_link_state_check()
1378 eth_dev); in lio_sync_link_state_check()
1382 lio_dev_start(struct rte_eth_dev *eth_dev) in lio_dev_start() argument
1384 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_start()
1388 lio_dev_info(lio_dev, "Starting port %d\n", eth_dev->data->port_id); in lio_dev_start()
1393 if (lio_send_rx_ctrl_cmd(eth_dev, 1)) in lio_dev_start()
1401 lio_dev_mq_rx_configure(eth_dev); in lio_dev_start()
1411 eth_dev); in lio_dev_start()
1426 ret = lio_dev_mtu_set(eth_dev, eth_dev->data->mtu); in lio_dev_start()
1433 rte_eal_alarm_cancel(lio_sync_link_state_check, eth_dev); in lio_dev_start()
1437 lio_send_rx_ctrl_cmd(eth_dev, 0); in lio_dev_start()
1444 lio_dev_stop(struct rte_eth_dev *eth_dev) in lio_dev_stop() argument
1446 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_stop()
1448 lio_dev_info(lio_dev, "Stopping port %d\n", eth_dev->data->port_id); in lio_dev_stop()
1449 eth_dev->data->dev_started = 0; in lio_dev_stop()
1454 rte_eal_alarm_cancel(lio_sync_link_state_check, eth_dev); in lio_dev_stop()
1456 lio_send_rx_ctrl_cmd(eth_dev, 0); in lio_dev_stop()
1467 lio_dev_set_link_up(struct rte_eth_dev *eth_dev) in lio_dev_set_link_up() argument
1469 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_set_link_up()
1481 if (lio_send_rx_ctrl_cmd(eth_dev, 1)) { in lio_dev_set_link_up()
1487 eth_dev->data->dev_link.link_status = RTE_ETH_LINK_UP; in lio_dev_set_link_up()
1493 lio_dev_set_link_down(struct rte_eth_dev *eth_dev) in lio_dev_set_link_down() argument
1495 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_set_link_down()
1508 eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN; in lio_dev_set_link_down()
1510 if (lio_send_rx_ctrl_cmd(eth_dev, 0)) { in lio_dev_set_link_down()
1512 eth_dev->data->dev_link.link_status = RTE_ETH_LINK_UP; in lio_dev_set_link_down()
1532 lio_dev_close(struct rte_eth_dev *eth_dev) in lio_dev_close() argument
1534 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_close()
1540 lio_dev_info(lio_dev, "closing port %d\n", eth_dev->data->port_id); in lio_dev_close()
1543 ret = lio_dev_stop(eth_dev); in lio_dev_close()
1565 lio_dev_clear_queues(eth_dev); in lio_dev_close()
1574 lio_enable_hw_tunnel_rx_checksum(struct rte_eth_dev *eth_dev) in lio_enable_hw_tunnel_rx_checksum() argument
1576 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_enable_hw_tunnel_rx_checksum()
1588 ctrl_cmd.eth_dev = eth_dev; in lio_enable_hw_tunnel_rx_checksum()
1608 lio_enable_hw_tunnel_tx_checksum(struct rte_eth_dev *eth_dev) in lio_enable_hw_tunnel_tx_checksum() argument
1610 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_enable_hw_tunnel_tx_checksum()
1622 ctrl_cmd.eth_dev = eth_dev; in lio_enable_hw_tunnel_tx_checksum()
1639 lio_send_queue_count_update(struct rte_eth_dev *eth_dev, int num_txq, in lio_send_queue_count_update() argument
1642 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_send_queue_count_update()
1660 ctrl_cmd.eth_dev = eth_dev; in lio_send_queue_count_update()
1682 lio_reconf_queues(struct rte_eth_dev *eth_dev, int num_txq, int num_rxq) in lio_reconf_queues() argument
1684 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_reconf_queues()
1689 if (lio_send_queue_count_update(eth_dev, num_txq, num_rxq)) in lio_reconf_queues()
1696 ret = lio_dev_stop(eth_dev); in lio_reconf_queues()
1711 lio_dev_configure(struct rte_eth_dev *eth_dev) in lio_dev_configure() argument
1713 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_dev_configure()
1724 if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) in lio_dev_configure()
1725 eth_dev->data->dev_conf.rxmode.offloads |= in lio_dev_configure()
1732 return lio_reconf_queues(eth_dev, in lio_dev_configure()
1733 eth_dev->data->nb_tx_queues, in lio_dev_configure()
1734 eth_dev->data->nb_rx_queues); in lio_dev_configure()
1736 lio_dev->nb_rx_queues = eth_dev->data->nb_rx_queues; in lio_dev_configure()
1737 lio_dev->nb_tx_queues = eth_dev->data->nb_tx_queues; in lio_dev_configure()
1740 lio_dev->max_rx_queues = eth_dev->data->nb_rx_queues; in lio_dev_configure()
1741 lio_dev->max_tx_queues = eth_dev->data->nb_tx_queues; in lio_dev_configure()
1809 eth_dev->data->port_id, in lio_dev_configure()
1844 &eth_dev->data->mac_addrs[0]); in lio_dev_configure()
1847 lio_enable_hw_tunnel_rx_checksum(eth_dev); in lio_dev_configure()
1848 lio_enable_hw_tunnel_tx_checksum(eth_dev); in lio_dev_configure()
1864 lio_dev_link_update(eth_dev, 0); in lio_dev_configure()
2041 lio_eth_dev_uninit(struct rte_eth_dev *eth_dev) in lio_eth_dev_uninit() argument
2043 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_eth_dev_uninit()
2057 lio_eth_dev_init(struct rte_eth_dev *eth_dev) in lio_eth_dev_init() argument
2059 struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(eth_dev); in lio_eth_dev_init()
2060 struct lio_device *lio_dev = LIO_DEV(eth_dev); in lio_eth_dev_init()
2064 eth_dev->rx_pkt_burst = &lio_dev_recv_pkts; in lio_eth_dev_init()
2065 eth_dev->tx_pkt_burst = &lio_dev_xmit_pkts; in lio_eth_dev_init()
2071 rte_eth_copy_pci_info(eth_dev, pdev); in lio_eth_dev_init()
2080 lio_dev->eth_dev = eth_dev; in lio_eth_dev_init()
2086 lio_dev->port_id = eth_dev->data->port_id; in lio_eth_dev_init()
2093 eth_dev->dev_ops = &liovf_eth_dev_ops; in lio_eth_dev_init()
2094 eth_dev->data->mac_addrs = rte_zmalloc("lio", RTE_ETHER_ADDR_LEN, 0); in lio_eth_dev_init()
2095 if (eth_dev->data->mac_addrs == NULL) { in lio_eth_dev_init()
2098 eth_dev->dev_ops = NULL; in lio_eth_dev_init()
2099 eth_dev->rx_pkt_burst = NULL; in lio_eth_dev_init()
2100 eth_dev->tx_pkt_burst = NULL; in lio_eth_dev_init()