Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161233114
D7578.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7578.diff
View Options
Index: head/sys/dev/hyperv/netvsc/hv_net_vsc.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_net_vsc.c
+++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c
@@ -126,6 +126,14 @@
return (vmbus_xact_wait(xact, resp_len));
}
+static __inline int
+hn_nvs_req_send(struct hn_softc *sc, void *req, int reqlen)
+{
+
+ return (hn_nvs_send(sc->hn_prichan, VMBUS_CHANPKT_FLAG_NONE,
+ req, reqlen, &hn_send_ctx_none));
+}
+
/*
* Net VSC initialize receive buffer with net VSP
*
@@ -342,8 +350,7 @@
disconn.nvs_sig = HN_NVS_RXBUF_SIG;
/* NOTE: No response. */
- ret = hn_nvs_send(sc->hn_prichan, VMBUS_CHANPKT_FLAG_NONE,
- &disconn, sizeof(disconn), &hn_send_ctx_none);
+ ret = hn_nvs_req_send(sc, &disconn, sizeof(disconn));
if (ret != 0) {
if_printf(sc->hn_ifp,
"send rxbuf disconn failed: %d\n", ret);
@@ -387,8 +394,7 @@
disconn.nvs_sig = HN_NVS_CHIM_SIG;
/* NOTE: No response. */
- ret = hn_nvs_send(sc->hn_prichan, VMBUS_CHANPKT_FLAG_NONE,
- &disconn, sizeof(disconn), &hn_send_ctx_none);
+ ret = hn_nvs_req_send(sc, &disconn, sizeof(disconn));
if (ret != 0) {
if_printf(sc->hn_ifp,
"send chim disconn failed: %d\n", ret);
@@ -485,8 +491,7 @@
conf.nvs_caps = HN_NVS_NDIS_CONF_VLAN;
/* NOTE: No response. */
- error = hn_nvs_send(sc->hn_prichan, VMBUS_CHANPKT_FLAG_NONE,
- &conf, sizeof(conf), &hn_send_ctx_none);
+ error = hn_nvs_req_send(sc, &conf, sizeof(conf));
if (error)
if_printf(sc->hn_ifp, "send nvs ndis conf failed: %d\n", error);
return (error);
@@ -551,8 +556,7 @@
ndis.nvs_ndis_minor = NDIS_VERSION_MINOR_30;
/* NOTE: No response. */
- ret = hn_nvs_send(sc->hn_prichan, VMBUS_CHANPKT_FLAG_NONE,
- &ndis, sizeof(ndis), &hn_send_ctx_none);
+ ret = hn_nvs_req_send(sc, &ndis, sizeof(ndis));
if (ret != 0) {
if_printf(sc->hn_ifp, "send nvs ndis init failed: %d\n", ret);
goto cleanup;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 2, 11:32 PM (13 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34605603
Default Alt Text
D7578.diff (1 KB)
Attached To
Mode
D7578: hyperv/hn: Factor out function to simplify NVS request sending
Attached
Detach File
Event Timeline
Log In to Comment