xen-netfront: fix receiving TSO packets

Currently FreeBSD is not properly fetching the TSO information from the Xen
PV ring, and thus the received packets didn't have all the necessary
information, like the segment size or even the TSO flag set.

Sponsored by: Citrix Systems R&D
This commit is contained in:
Roger Pau Monné 2016-06-02 11:12:11 +00:00
parent 7b1d3a09e3
commit d9a66b6ded

View file

@ -1253,6 +1253,13 @@ xn_rxeof(struct netfront_rxq *rxq)
| CSUM_PSEUDO_HDR);
m->m_pkthdr.csum_data = 0xffff;
}
if ((rx->flags & NETRXF_extra_info) != 0 &&
(extras[XEN_NETIF_EXTRA_TYPE_GSO - 1].type ==
XEN_NETIF_EXTRA_TYPE_GSO)) {
m->m_pkthdr.tso_segsz =
extras[XEN_NETIF_EXTRA_TYPE_GSO - 1].u.gso.size;
m->m_pkthdr.csum_flags |= CSUM_TSO;
}
rxq->stats.rx_packets++;
rxq->stats.rx_bytes += m->m_pkthdr.len;