hyperv/hn: Fix VLAN tag setup for outgoing VLAN packets.
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7785
This commit is contained in:
parent
b349357819
commit
14ee29ba93
@ -903,8 +903,10 @@ hn_encap(struct hn_tx_ring *txr, struct hn_txdesc *txd, struct mbuf **m_head0)
|
||||
|
||||
rppi_vlan_info = (ndis_8021q_info *)((uint8_t *)rppi +
|
||||
rppi->per_packet_info_offset);
|
||||
rppi_vlan_info->u1.s1.vlan_id =
|
||||
m_head->m_pkthdr.ether_vtag & 0xfff;
|
||||
rppi_vlan_info->u1.value = NDIS_VLAN_INFO_MAKE(
|
||||
EVL_VLANOFTAG(m_head->m_pkthdr.ether_vtag),
|
||||
EVL_PRIOFTAG(m_head->m_pkthdr.ether_vtag),
|
||||
EVL_CFIOFTAG(m_head->m_pkthdr.ether_vtag));
|
||||
}
|
||||
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_TSO) {
|
||||
|
@ -213,7 +213,7 @@ struct ndis_rssprm_toeplitz {
|
||||
#define NDIS_VLAN_INFO_CFI_MASK 0x0008
|
||||
#define NDIS_VLAN_INFO_ID_MASK 0xfff0
|
||||
#define NDIS_VLAN_INFO_MAKE(id, pri, cfi) \
|
||||
(((pri) & NVIS_VLAN_INFO_PRI_MASK) | \
|
||||
(((pri) & NDIS_VLAN_INFO_PRI_MASK) | \
|
||||
(((cfi) & 0x1) << 3) | (((id) & 0xfff) << 4))
|
||||
#define NDIS_VLAN_INFO_ID(inf) (((inf) & NDIS_VLAN_INFO_ID_MASK) >> 4)
|
||||
#define NDIS_VLAN_INFO_CFI(inf) (((inf) & NDIS_VLAN_INFO_CFI_MASK) >> 3)
|
||||
|
Loading…
Reference in New Issue
Block a user