Lines Matching refs:eth_dev

33 dev_num_vf(struct rte_eth_dev *eth_dev)  in dev_num_vf()  argument
35 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); in dev_num_vf()
67 int txgbe_pf_host_init(struct rte_eth_dev *eth_dev) in txgbe_pf_host_init() argument
69 struct txgbe_vf_info **vfinfo = TXGBE_DEV_VFDATA(eth_dev); in txgbe_pf_host_init()
70 struct txgbe_mirror_info *mirror_info = TXGBE_DEV_MR_INFO(eth_dev); in txgbe_pf_host_init()
71 struct txgbe_uta_info *uta_info = TXGBE_DEV_UTA_INFO(eth_dev); in txgbe_pf_host_init()
72 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_pf_host_init()
79 RTE_ETH_DEV_SRIOV(eth_dev).active = 0; in txgbe_pf_host_init()
80 vf_num = dev_num_vf(eth_dev); in txgbe_pf_host_init()
107 RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_64_POOLS; in txgbe_pf_host_init()
110 RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_32_POOLS; in txgbe_pf_host_init()
113 RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_16_POOLS; in txgbe_pf_host_init()
116 RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = nb_queue; in txgbe_pf_host_init()
117 RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = vf_num; in txgbe_pf_host_init()
118 RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = in txgbe_pf_host_init()
121 txgbe_vf_perm_addr_gen(eth_dev, vf_num); in txgbe_pf_host_init()
127 txgbe_mb_intr_setup(eth_dev); in txgbe_pf_host_init()
132 void txgbe_pf_host_uninit(struct rte_eth_dev *eth_dev) in txgbe_pf_host_uninit() argument
140 RTE_ETH_DEV_SRIOV(eth_dev).active = 0; in txgbe_pf_host_uninit()
141 RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = 0; in txgbe_pf_host_uninit()
142 RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = 0; in txgbe_pf_host_uninit()
143 RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = 0; in txgbe_pf_host_uninit()
145 vf_num = dev_num_vf(eth_dev); in txgbe_pf_host_uninit()
149 vfinfo = TXGBE_DEV_VFDATA(eth_dev); in txgbe_pf_host_uninit()
162 txgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev) in txgbe_add_tx_flow_control_drop_filter() argument
164 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_add_tx_flow_control_drop_filter()
165 struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(eth_dev); in txgbe_add_tx_flow_control_drop_filter()
200 vf_num = dev_num_vf(eth_dev); in txgbe_add_tx_flow_control_drop_filter()
205 int txgbe_pf_host_configure(struct rte_eth_dev *eth_dev) in txgbe_pf_host_configure() argument
212 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_pf_host_configure()
218 vf_num = dev_num_vf(eth_dev); in txgbe_pf_host_configure()
225 vtctl |= TXGBE_POOLCTL_DEFPL(RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx); in txgbe_pf_host_configure()
249 hw->mac.set_vmdq(hw, 0, RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx); in txgbe_pf_host_configure()
259 switch (RTE_ETH_DEV_SRIOV(eth_dev).active) { in txgbe_pf_host_configure()
295 txgbe_add_tx_flow_control_drop_filter(eth_dev); in txgbe_pf_host_configure()
301 txgbe_set_rx_mode(struct rte_eth_dev *eth_dev) in txgbe_set_rx_mode() argument
303 struct rte_eth_dev_data *dev_data = eth_dev->data; in txgbe_set_rx_mode()
304 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_set_rx_mode()
306 uint16_t vfn = dev_num_vf(eth_dev); in txgbe_set_rx_mode()
343 txgbe_vlan_hw_strip_config(eth_dev); in txgbe_set_rx_mode()
347 txgbe_vf_reset_event(struct rte_eth_dev *eth_dev, uint16_t vf) in txgbe_vf_reset_event() argument
349 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_reset_event()
350 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_vf_reset_event()
364 txgbe_set_rx_mode(eth_dev); in txgbe_vf_reset_event()
370 txgbe_vf_reset_msg(struct rte_eth_dev *eth_dev, uint16_t vf) in txgbe_vf_reset_msg() argument
372 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_reset_msg()
389 nb_q_per_pool = RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool; in txgbe_vf_reset_msg()
401 txgbe_vf_reset_event(eth_dev, vf); in txgbe_vf_reset_msg()
405 txgbe_disable_vf_mc_promisc(struct rte_eth_dev *eth_dev, uint32_t vf) in txgbe_disable_vf_mc_promisc() argument
407 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_disable_vf_mc_promisc()
422 txgbe_vf_reset(struct rte_eth_dev *eth_dev, uint16_t vf, uint32_t *msgbuf) in txgbe_vf_reset() argument
424 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_reset()
425 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_vf_reset()
430 txgbe_vf_reset_msg(eth_dev, vf); in txgbe_vf_reset()
435 txgbe_disable_vf_mc_promisc(eth_dev, vf); in txgbe_vf_reset()
451 txgbe_vf_set_mac_addr(struct rte_eth_dev *eth_dev, in txgbe_vf_set_mac_addr() argument
454 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_set_mac_addr()
455 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_vf_set_mac_addr()
468 txgbe_vf_set_multicast(struct rte_eth_dev *eth_dev, in txgbe_vf_set_multicast() argument
471 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_set_multicast()
472 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_vf_set_multicast()
486 txgbe_disable_vf_mc_promisc(eth_dev, vf); in txgbe_vf_set_multicast()
518 txgbe_vf_set_vlan(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf) in txgbe_vf_set_vlan() argument
521 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_vf_set_vlan()
522 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_vf_set_vlan()
536 txgbe_set_vf_lpe(struct rte_eth_dev *eth_dev, in txgbe_set_vf_lpe() argument
539 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_set_vf_lpe()
557 txgbe_negotiate_vf_api(struct rte_eth_dev *eth_dev, in txgbe_negotiate_vf_api() argument
561 struct txgbe_vf_info *vfinfo = *TXGBE_DEV_VFDATA(eth_dev); in txgbe_negotiate_vf_api()
581 txgbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf) in txgbe_get_vf_queues() argument
583 struct txgbe_vf_info *vfinfo = *TXGBE_DEV_VFDATA(eth_dev); in txgbe_get_vf_queues()
584 uint32_t default_q = vf * RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool; in txgbe_get_vf_queues()
606 msgbuf[TXGBE_VF_RX_QUEUES] = RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool; in txgbe_get_vf_queues()
607 msgbuf[TXGBE_VF_TX_QUEUES] = RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool; in txgbe_get_vf_queues()
613 eth_conf = &eth_dev->data->dev_conf; in txgbe_get_vf_queues()
638 hw = TXGBE_DEV_HW(eth_dev); in txgbe_get_vf_queues()
662 txgbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev, in txgbe_set_vf_mc_promisc() argument
665 struct txgbe_vf_info *vfinfo = *(TXGBE_DEV_VFDATA(eth_dev)); in txgbe_set_vf_mc_promisc()
666 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_set_vf_mc_promisc()
763 txgbe_rcv_msg_from_vf(struct rte_eth_dev *eth_dev, uint16_t vf) in txgbe_rcv_msg_from_vf() argument
769 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_rcv_msg_from_vf()
770 struct txgbe_vf_info *vfinfo = *TXGBE_DEV_VFDATA(eth_dev); in txgbe_rcv_msg_from_vf()
797 int ret = txgbe_vf_reset(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
802 rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_VF_MBOX, in txgbe_rcv_msg_from_vf()
814 rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_VF_MBOX, in txgbe_rcv_msg_from_vf()
823 retval = txgbe_vf_set_mac_addr(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
827 retval = txgbe_vf_set_multicast(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
831 retval = txgbe_set_vf_lpe(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
835 retval = txgbe_vf_set_vlan(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
838 retval = txgbe_negotiate_vf_api(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
841 retval = txgbe_get_vf_queues(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
846 retval = txgbe_set_vf_mc_promisc(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
850 retval = txgbe_set_vf_macvlan_msg(eth_dev, vf, msgbuf); in txgbe_rcv_msg_from_vf()
872 txgbe_rcv_ack_from_vf(struct rte_eth_dev *eth_dev, uint16_t vf) in txgbe_rcv_ack_from_vf() argument
875 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_rcv_ack_from_vf()
876 struct txgbe_vf_info *vfinfo = *TXGBE_DEV_VFDATA(eth_dev); in txgbe_rcv_ack_from_vf()
882 void txgbe_pf_mbx_process(struct rte_eth_dev *eth_dev) in txgbe_pf_mbx_process() argument
885 struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); in txgbe_pf_mbx_process()
887 for (vf = 0; vf < dev_num_vf(eth_dev); vf++) { in txgbe_pf_mbx_process()
890 txgbe_vf_reset_event(eth_dev, vf); in txgbe_pf_mbx_process()
894 txgbe_rcv_msg_from_vf(eth_dev, vf); in txgbe_pf_mbx_process()
898 txgbe_rcv_ack_from_vf(eth_dev, vf); in txgbe_pf_mbx_process()