mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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:
parent
7b1d3a09e3
commit
d9a66b6ded
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue