From owner-svn-src-all@freebsd.org Thu Jun 2 11:12:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35B88B641DE; Thu, 2 Jun 2016 11:12:12 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0839613D0; Thu, 2 Jun 2016 11:12:11 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u52BCBwB045097; Thu, 2 Jun 2016 11:12:11 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u52BCBmJ045096; Thu, 2 Jun 2016 11:12:11 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201606021112.u52BCBmJ045096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 2 Jun 2016 11:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301196 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2016 11:12:12 -0000 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;