Author: royger
Date: Thu Jun  2 11:12:11 2016
New Revision: 301196
URL: https://svnweb.freebsd.org/changeset/base/301196

Log:
  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

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c        Thu Jun  2 07:45:01 2016        
(r301195)
+++ head/sys/dev/xen/netfront/netfront.c        Thu Jun  2 11:12:11 2016        
(r301196)
@@ -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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to