From owner-freebsd-net@FreeBSD.ORG Wed Jul 16 01:41:35 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD6961AB; Wed, 16 Jul 2014 01:41:35 +0000 (UTC) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE4F2C28; Wed, 16 Jul 2014 01:41:35 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id l6so184643qcy.31 for ; Tue, 15 Jul 2014 18:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=qVdL5AYYcrH6sI1Xlk8UYZfFh/iXccnGKUmLW64pG+M=; b=Aw0zb2pE8IN+wuCSGYcCZZFztuIUW1XAz+qPs2KybgCVMkRoYuDHepUwprmENRaE1j DXDHaqW4TlmlDi7yCGwknpFJ36gPfVLcVwXvp36y4x22q8zTFH0DCPavgQMTkXWazEZn SaToyq3eh9zk1GcmqnY10O1MpmKjlAqswVFdzhxgsX4DHZ0Mw4eIt0xElzb1Xb+sPV5W bkAnMlMIEhU/JaWFuMnLoHYKX/swnwt/5Wj8U2mgL/yW95CRZ1pTW54ZcLSWW26NwQWE ialSTViF299gRp0A7qquTJi5x2yE2ApIeLcJH3KjHTr6k4Sv1nQd3K4X/fuGmlMryoJ7 vgpw== MIME-Version: 1.0 X-Received: by 10.140.88.243 with SMTP id t106mr24164894qgd.12.1405474894742; Tue, 15 Jul 2014 18:41:34 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.202.193 with HTTP; Tue, 15 Jul 2014 18:41:34 -0700 (PDT) In-Reply-To: <2A35EA60C3C77D438915767F458D65687E8FC789@ORSMSX111.amr.corp.intel.com> References: <53C4EE00.5090705@gmail.com> <2A35EA60C3C77D438915767F458D65687E8FC789@ORSMSX111.amr.corp.intel.com> Date: Tue, 15 Jul 2014 18:41:34 -0700 X-Google-Sender-Auth: BA0wfbTNtPsFAkkl6s4E4QBbpkk Message-ID: Subject: Re: UDP/TCP versus IP frames - subtle out of order packets with hardware hashing From: Adrian Chadd To: "Pieper, Jeffrey E" Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Net , Hooman Fazaeli , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 01:41:36 -0000 On 15 July 2014 18:01, Pieper, Jeffrey E wrote: > I believe the Linux driver DOES however support UDP RSS port hash. It is used for environments where you can ensure there is no fragmentation. In such use cases, this allows for a significant performance benefit. > Right. For my RSS hacking, I've added a new in_rss.c function that returns the currently supported hashes, so it'll be possible for an administrator to define whether to support UDP hashing on 4-tuple or 2-tuple. I plan on adding a software hash calculation function to optionally calculate the 2-tuple or 4-tuple RSS hash as appropriately required so it can be run after IP reassembly if it's required. So, if the admin wants a 4-tuple UDP hash and it receives fragmented UDP, then it will re-assemble, calculate 4-tuple and kick it up. If they want 2-tuple, then it'll only calculate a software hash if it wasn't given one by the driver. Argh, so many weird corner cases to handle and I haven't even started hacking on the memcached/varnish stuff :( Thanks! -a