Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105588236
D7515.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
D7515.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
@@ -902,20 +902,17 @@
hv_nv_on_receive_completion(struct vmbus_channel *chan, uint64_t tid,
uint32_t status)
{
- nvsp_msg rx_comp_msg;
+ struct hn_nvs_rndis_ack ack;
int retries = 0;
int ret = 0;
- rx_comp_msg.hdr.msg_type = nvsp_msg_1_type_send_rndis_pkt_complete;
-
- /* Pass in the status */
- rx_comp_msg.msgs.vers_1_msgs.send_rndis_pkt_complete.status =
- status;
+ ack.nvs_type = HN_NVS_TYPE_RNDIS_ACK;
+ ack.nvs_status = status;
retry_send_cmplt:
/* Send the completion */
- ret = vmbus_chan_send(chan, VMBUS_CHANPKT_TYPE_COMP, 0,
- &rx_comp_msg, sizeof(nvsp_msg), tid);
+ ret = vmbus_chan_send(chan, VMBUS_CHANPKT_TYPE_COMP,
+ VMBUS_CHANPKT_FLAG_NONE, &ack, sizeof(ack), tid);
if (ret == 0) {
/* success */
/* no-op */
Index: head/sys/dev/hyperv/netvsc/if_hnreg.h
===================================================================
--- head/sys/dev/hyperv/netvsc/if_hnreg.h
+++ head/sys/dev/hyperv/netvsc/if_hnreg.h
@@ -44,6 +44,7 @@
* NVS message transacion status codes.
*/
#define HN_NVS_STATUS_OK 1
+#define HN_NVS_STATUS_FAILED 2
/*
* NVS request/response message types.
@@ -58,6 +59,7 @@
#define HN_NVS_TYPE_CHIM_CONNRESP 105
#define HN_NVS_TYPE_CHIM_DISCONN 106
#define HN_NVS_TYPE_RNDIS 107
+#define HN_NVS_TYPE_RNDIS_ACK 108
#define HN_NVS_TYPE_NDIS_CONF 125
#define HN_NVS_TYPE_VFASSOC_NOTE 128 /* notification */
#define HN_NVS_TYPE_SET_DATAPATH 129
@@ -199,4 +201,11 @@
} __packed;
CTASSERT(sizeof(struct hn_nvs_rndis) >= HN_NVS_REQSIZE_MIN);
+struct hn_nvs_rndis_ack {
+ uint32_t nvs_type; /* HN_NVS_TYPE_RNDIS_ACK */
+ uint32_t nvs_status; /* HN_NVS_STATUS_ */
+ uint8_t nvs_rsvd[24];
+} __packed;
+CTASSERT(sizeof(struct hn_nvs_rndis_ack) >= HN_NVS_REQSIZE_MIN);
+
#endif /* !_IF_HNREG_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 12:28 AM (20 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15498099
Default Alt Text
D7515.diff (1 KB)
Attached To
Mode
D7515: hyperv/hn: Simplify RNDIS RX packets acknowledgement.
Attached
Detach File
Event Timeline
Log In to Comment