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

Function hn_dev_close

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

Source from the content-addressed store, hash-verified

1051}
1052
1053static int
1054hn_dev_close(struct rte_eth_dev *dev)
1055{
1056 int ret;
1057 struct hn_data *hv = dev->data->dev_private;
1058 struct hv_hotadd_context *hot_ctx;
1059
1060 PMD_INIT_FUNC_TRACE();
1061 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
1062 return 0;
1063
1064 rte_spinlock_lock(&hv->hotadd_lock);
1065 while (!LIST_EMPTY(&hv->hotadd_list)) {
1066 hot_ctx = LIST_FIRST(&hv->hotadd_list);
1067 rte_eal_alarm_cancel(netvsc_hotplug_retry, hot_ctx);
1068 LIST_REMOVE(hot_ctx, list);
1069 rte_free(hot_ctx);
1070 }
1071 rte_spinlock_unlock(&hv->hotadd_lock);
1072
1073 ret = hn_vf_close(dev);
1074 hn_dev_free_queues(dev);
1075
1076 return ret;
1077}
1078
1079/*
1080 * Setup connection between PMD and kernel.

Callers 1

eth_hn_dev_uninitFunction · 0.85

Calls 7

rte_eal_process_typeFunction · 0.85
rte_freeFunction · 0.85
hn_vf_closeFunction · 0.85
hn_dev_free_queuesFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_eal_alarm_cancelFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected