MCPcopy Create free account
hub / github.com/F-Stack/f-stack / eth_ixgbevf_dev_init

Function eth_ixgbevf_dev_init

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:1588–1746  ·  view source on GitHub ↗

* Virtual Function device init */

Source from the content-addressed store, hash-verified

1586 * Virtual Function device init
1587 */
1588static int
1589eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
1590{
1591 int diag;
1592 uint32_t tc, tcs;
1593 struct ixgbe_adapter *ad = eth_dev->data->dev_private;
1594 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
1595 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
1596 struct ixgbe_hw *hw =
1597 IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
1598 struct ixgbe_vfta *shadow_vfta =
1599 IXGBE_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
1600 struct ixgbe_hwstrip *hwstrip =
1601 IXGBE_DEV_PRIVATE_TO_HWSTRIP_BITMAP(eth_dev->data->dev_private);
1602 struct rte_ether_addr *perm_addr =
1603 (struct rte_ether_addr *)hw->mac.perm_addr;
1604
1605 PMD_INIT_FUNC_TRACE();
1606
1607 eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
1608 eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
1609 eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
1610 eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
1611 eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
1612
1613 /* for secondary processes, we don't initialise any further as primary
1614 * has already done this work. Only check we don't need a different
1615 * RX function
1616 */
1617 if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
1618 struct ixgbe_tx_queue *txq;
1619 /* TX queue function in primary, set by last queue initialized
1620 * Tx queue may not initialized by primary process
1621 */
1622 if (eth_dev->data->tx_queues) {
1623 txq = eth_dev->data->tx_queues[eth_dev->data->nb_tx_queues - 1];
1624 ixgbe_set_tx_function(eth_dev, txq);
1625 } else {
1626 /* Use default TX function if we get here */
1627 PMD_INIT_LOG(NOTICE,
1628 "No TX queues configured yet. Using default TX function.");
1629 }
1630
1631 ixgbe_set_rx_function(eth_dev);
1632
1633 return 0;
1634 }
1635
1636 /* NOTE: review for potential ordering optimization */
1637 __atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
1638 ixgbevf_parse_devargs(eth_dev->data->dev_private,
1639 pci_dev->device.devargs);
1640
1641 rte_eth_copy_pci_info(eth_dev, pci_dev);
1642 eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
1643
1644 hw->device_id = pci_dev->id.device_id;
1645 hw->vendor_id = pci_dev->id.vendor_id;

Callers 1

ixgbevf_dev_resetFunction · 0.85

Calls 15

rte_eal_process_typeFunction · 0.85
ixgbe_set_rx_functionFunction · 0.85
ixgbevf_parse_devargsFunction · 0.85
rte_eth_copy_pci_infoFunction · 0.85
memsetFunction · 0.85
ixgbe_init_shared_codeFunction · 0.85
ixgbevf_dev_stats_resetFunction · 0.85
ixgbevf_intr_disableFunction · 0.85
ixgbevf_negotiate_apiFunction · 0.85
ixgbevf_get_queuesFunction · 0.85
rte_zmallocFunction · 0.85
rte_is_zero_ether_addrFunction · 0.85

Tested by

no test coverage detected