Date: Thu, 2 Jun 2016 11:12:11 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301196 - head/sys/dev/xen/netfront Message-ID: <201606021112.u52BCBmJ045096@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606021112.u52BCBmJ045096>