From owner-svn-src-all@freebsd.org Tue Jan 19 20:42:07 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 D655DA89851; Tue, 19 Jan 2016 20:42:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 9C5F5184A; Tue, 19 Jan 2016 20:42:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C06931FE024; Tue, 19 Jan 2016 21:42:05 +0100 (CET) Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys To: Adrian Chadd References: <201601191533.u0JFXSxf037804@repo.freebsd.org> <569E6A38.8080108@selasky.org> <569E909B.60506@selasky.org> <569E9B66.1070200@selasky.org> Cc: Ryan Stone , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <569EA026.5020906@selasky.org> Date: Tue, 19 Jan 2016 21:44:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 19 Jan 2016 20:42:07 -0000 On 01/19/16 21:23, Adrian Chadd wrote: > On 19 January 2016 at 12:24, Hans Petter Selasky wrote: >> On 01/19/16 21:05, Adrian Chadd wrote: >>> >>> Erm, ok. So I'm confused about the state of how the streams are >>> tracked. So not all mbufs are in a stream, but they're in some single >>> LRO mbuf list? >>> >> >> Hi, >> >> The streams are typically tracked using the hardware generated Toeplitz hash >> value. The mbufs are sorted according to the hash value and the hash type. >> The list of mbufs is scanned, flushing the LRO entries every time we see a >> change in the hash value or hash type. OK? > Hi, > Sure, but TCP fragments and non-fragments can hash to different > values, so suddenly you get interleaved packets. Fragmented TCP packets should not be subject to LRO. Depending on the NIC we will get the same hash value or not. I think that's fine. If you want to use this feature the NIC should not hash the TCP port numbers when it sees a fragmented packet including the starting fragment. That will give the best result. What does the RSS code expect currently? > > You can't rely on the toeplitz hash 100% hashing /all packets in a > stream/ reliably, because it's highly dependent upon the NIC config. > This is why I did all that effort in the RSS code to handle things. --HPS