Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146344998
D9713.id25506.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
D9713.id25506.diff
View Options
Index: sys/dev/hyperv/netvsc/hn_rndis.c
===================================================================
--- sys/dev/hyperv/netvsc/hn_rndis.c
+++ sys/dev/hyperv/netvsc/hn_rndis.c
@@ -841,9 +841,22 @@
sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt;
sc->hn_rndis_agg_align = 1U << comp->rm_align;
+ if (sc->hn_rndis_agg_align < sizeof(uint32_t)) {
+ /*
+ * The RNDIS packet messsage encap assumes that the RNDIS
+ * packet message is at least 4 bytes aligned. Fix up the
+ * alignment here, if the remote side sets the alignment
+ * too low.
+ */
+ if_printf(sc->hn_ifp, "fixup RNDIS aggpkt align: %u -> %zu\n",
+ sc->hn_rndis_agg_align, sizeof(uint32_t));
+ sc->hn_rndis_agg_align = sizeof(uint32_t);
+ }
+
if (bootverbose) {
- if_printf(sc->hn_ifp, "RNDIS ver %u.%u, pktsz %u, pktcnt %u, "
- "align %u\n", comp->rm_ver_major, comp->rm_ver_minor,
+ if_printf(sc->hn_ifp, "RNDIS ver %u.%u, "
+ "aggpkt size %u, aggpkt cnt %u, aggpkt align %u\n",
+ comp->rm_ver_major, comp->rm_ver_minor,
sc->hn_rndis_agg_size, sc->hn_rndis_agg_pkts,
sc->hn_rndis_agg_align);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 2, 10:35 PM (2 m, 20 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29146069
Default Alt Text
D9713.id25506.diff (1 KB)
Attached To
Mode
D9713: hyperv/hn: Make sure that RNDIS packet message is at least 4B aligned.
Attached
Detach File
Event Timeline
Log In to Comment