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

Function hn_dev_start

dpdk/drivers/net/netvsc/hn_ethdev.c:993–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

991}
992
993static int
994hn_dev_start(struct rte_eth_dev *dev)
995{
996 struct hn_data *hv = dev->data->dev_private;
997 int i, error;
998
999 PMD_INIT_FUNC_TRACE();
1000
1001 /* Register to monitor hot plug events */
1002 error = rte_dev_event_callback_register(NULL, netvsc_hotadd_callback,
1003 hv);
1004 if (error) {
1005 PMD_DRV_LOG(ERR, "failed to register device event callback");
1006 return error;
1007 }
1008
1009 error = hn_rndis_set_rxfilter(hv,
1010 NDIS_PACKET_TYPE_BROADCAST |
1011 NDIS_PACKET_TYPE_ALL_MULTICAST |
1012 NDIS_PACKET_TYPE_DIRECTED);
1013 if (error)
1014 return error;
1015
1016 error = hn_vf_start(dev);
1017 if (error)
1018 hn_rndis_set_rxfilter(hv, 0);
1019
1020 /* Initialize Link state */
1021 if (error == 0)
1022 hn_dev_link_update(dev, 0);
1023
1024 for (i = 0; i < hv->num_queues; i++) {
1025 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
1026 dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
1027 }
1028
1029 return error;
1030}
1031
1032static int
1033hn_dev_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 4

hn_rndis_set_rxfilterFunction · 0.85
hn_vf_startFunction · 0.85
hn_dev_link_updateFunction · 0.85

Tested by

no test coverage detected