aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Hu <whu@FreeBSD.org>2021-03-15 10:20:52 +0000
committerWei Hu <whu@FreeBSD.org>2021-03-29 10:21:30 +0000
commit2fbdbfaa0c4407547060f8a0ca4d0d04bbf09f9e (patch)
tree7b06a851530388caf3a86ff1903af2aec14164b8
parentcdc59163ff8e8f2a98ef8ca02773d1d2047e3aae (diff)
downloadsrc-2fbdbfaa0c4407547060f8a0ca4d0d04bbf09f9e.tar.gz
src-2fbdbfaa0c4407547060f8a0ca4d0d04bbf09f9e.zip
Hyper-V: hn: Initialize the internal field of per packet info on tx path
The RSC support feature introduced a bit field "rm_internal" in struct rndis_pktinfo with total size unchanged. The guest does not use this field in the tx path. However we need to initialize it to zero in case older hosts which are not aware of this field. Fixes: a491581f ("Hyper-V: hn: Enable vSwitch RSC support") MFC after: 2 weeks Sponsored by: Microsoft (cherry picked from commit 805dbff6c36a6cd84491aa53a02315fa025734cc)
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index f4bdbb1ee788..cd0b5a5fa8b9 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -2932,6 +2932,7 @@ hn_rndis_pktinfo_append(struct rndis_packet_msg *pkt, size_t pktsize,
pi->rm_size = pi_size;
pi->rm_type = pi_type;
+ pi->rm_internal = 0;
pi->rm_pktinfooffset = RNDIS_PKTINFO_OFFSET;
return (pi->rm_data);