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

Function hn_attach

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

* Setup connection between PMD and kernel. */

Source from the content-addressed store, hash-verified

1080 * Setup connection between PMD and kernel.
1081 */
1082static int
1083hn_attach(struct hn_data *hv, unsigned int mtu)
1084{
1085 int error;
1086
1087 /* Attach NVS */
1088 error = hn_nvs_attach(hv, mtu);
1089 if (error)
1090 goto failed_nvs;
1091
1092 /* Attach RNDIS */
1093 error = hn_rndis_attach(hv);
1094 if (error)
1095 goto failed_rndis;
1096
1097 /*
1098 * NOTE:
1099 * Under certain conditions on certain versions of Hyper-V,
1100 * the RNDIS rxfilter is _not_ zero on the hypervisor side
1101 * after the successful RNDIS initialization.
1102 */
1103 hn_rndis_set_rxfilter(hv, NDIS_PACKET_TYPE_NONE);
1104 return 0;
1105failed_rndis:
1106 hn_nvs_detach(hv);
1107failed_nvs:
1108 return error;
1109}
1110
1111static void
1112hn_detach(struct hn_data *hv)

Callers 2

hn_reinitFunction · 0.85
eth_hn_dev_initFunction · 0.85

Calls 4

hn_nvs_attachFunction · 0.85
hn_rndis_attachFunction · 0.85
hn_rndis_set_rxfilterFunction · 0.85
hn_nvs_detachFunction · 0.85

Tested by

no test coverage detected