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

Function ice_dcf_dev_init

dpdk/drivers/net/ice/ice_dcf_ethdev.c:1936–1971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1934};
1935
1936static int
1937ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
1938{
1939 struct ice_dcf_adapter *adapter = eth_dev->data->dev_private;
1940 struct ice_adapter *parent_adapter = &adapter->parent;
1941
1942 eth_dev->dev_ops = &ice_dcf_eth_dev_ops;
1943 eth_dev->rx_pkt_burst = ice_dcf_recv_pkts;
1944 eth_dev->tx_pkt_burst = ice_dcf_xmit_pkts;
1945
1946 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
1947 return 0;
1948
1949 adapter->real_hw.vc_event_msg_cb = ice_dcf_handle_pf_event_msg;
1950 if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) != 0) {
1951 PMD_INIT_LOG(ERR, "Failed to init DCF hardware");
1952 __atomic_store_n(&parent_adapter->dcf_state_on, false,
1953 __ATOMIC_RELAXED);
1954 return -1;
1955 }
1956
1957 __atomic_store_n(&parent_adapter->dcf_state_on, true, __ATOMIC_RELAXED);
1958
1959 if (ice_dcf_init_parent_adapter(eth_dev) != 0) {
1960 PMD_INIT_LOG(ERR, "Failed to init DCF parent adapter");
1961 ice_dcf_uninit_hw(eth_dev, &adapter->real_hw);
1962 return -1;
1963 }
1964
1965 ice_dcf_stats_reset(eth_dev);
1966
1967 dcf_config_promisc(adapter, false, false);
1968 ice_dcf_vf_repr_notify_all(adapter, true);
1969
1970 return 0;
1971}
1972
1973static int
1974ice_dcf_dev_uninit(struct rte_eth_dev *eth_dev)

Callers 1

ice_dcf_dev_resetFunction · 0.85

Calls 7

rte_eal_process_typeFunction · 0.85
ice_dcf_init_hwFunction · 0.85
ice_dcf_uninit_hwFunction · 0.85
ice_dcf_stats_resetFunction · 0.85
dcf_config_promiscFunction · 0.85

Tested by

no test coverage detected