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

Function ionic_lif_init

dpdk/drivers/net/ionic/ionic_lif.c:1718–1785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716}
1717
1718int
1719ionic_lif_init(struct ionic_lif *lif)
1720{
1721 struct ionic_dev *idev = &lif->adapter->idev;
1722 struct ionic_lif_init_comp comp;
1723 uint32_t retries = 5;
1724 int err;
1725
1726 memset(&lif->stats_base, 0, sizeof(lif->stats_base));
1727
1728retry_lif_init:
1729 ionic_dev_cmd_lif_init(idev, lif->info_pa);
1730 err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
1731 if (err == -EAGAIN && retries > 0) {
1732 retries--;
1733 rte_delay_us_block(IONIC_DEVCMD_RETRY_WAIT_US);
1734 goto retry_lif_init;
1735 }
1736 if (err)
1737 return err;
1738
1739 ionic_dev_cmd_comp(idev, &comp);
1740
1741 lif->hw_index = rte_cpu_to_le_16(comp.hw_index);
1742
1743 err = ionic_lif_adminq_init(lif);
1744 if (err)
1745 return err;
1746
1747 err = ionic_lif_notifyq_init(lif);
1748 if (err)
1749 goto err_out_adminq_deinit;
1750
1751 /*
1752 * Configure initial feature set
1753 * This will be updated later by the dev_configure() step
1754 */
1755 lif->features = IONIC_ETH_HW_RX_HASH | IONIC_ETH_HW_VLAN_RX_FILTER;
1756
1757 err = ionic_lif_set_features(lif);
1758 if (err)
1759 goto err_out_notifyq_deinit;
1760
1761 err = ionic_rx_filters_init(lif);
1762 if (err)
1763 goto err_out_notifyq_deinit;
1764
1765 err = ionic_station_set(lif);
1766 if (err)
1767 goto err_out_rx_filter_deinit;
1768
1769 ionic_lif_set_name(lif);
1770
1771 lif->state |= IONIC_LIF_F_INITED;
1772
1773 return 0;
1774
1775err_out_rx_filter_deinit:

Callers 1

eth_ionic_dev_initFunction · 0.85

Calls 14

memsetFunction · 0.85
ionic_dev_cmd_lif_initFunction · 0.85
ionic_dev_cmd_wait_checkFunction · 0.85
rte_delay_us_blockFunction · 0.85
ionic_dev_cmd_compFunction · 0.85
ionic_lif_adminq_initFunction · 0.85
ionic_lif_notifyq_initFunction · 0.85
ionic_lif_set_featuresFunction · 0.85
ionic_rx_filters_initFunction · 0.85
ionic_station_setFunction · 0.85
ionic_lif_set_nameFunction · 0.85
ionic_rx_filters_deinitFunction · 0.85

Tested by

no test coverage detected