From owner-freebsd-net@FreeBSD.ORG Mon Mar 9 19:06:49 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7132983 for ; Mon, 9 Mar 2015 19:06:49 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFB899F for ; Mon, 9 Mar 2015 19:06:49 +0000 (UTC) Received: by iery20 with SMTP id y20so12913416ier.0 for ; Mon, 09 Mar 2015 12:06:49 -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:content-transfer-encoding; bh=1pamQ9sVp23F0VCCBymdDNImx6HRX2gJuqQjhI1tBl4=; b=KueNiYVcKfREs1sb0fHZD8RmbmRlKPyHJft9qnzbIzs+d1l2vCdyAKb/hKnLFZfCt+ uNjp6YFn2l71dpK4XCLNKHyy7JPyAtWOPGAZMsk7e6v99NXfvbHinnEU1lsqJMgdHyKe 42gQskvaM7C942vD4pglredlxcTHRHKdSWDPuPSf+kEvnlhzvx0G9+ywUuHEVFDL/Sk9 vweMY0Oz5Wf3qqEQJgnhZEmfEDvxO6VnQ4ykcD/Rvh6tt9GSW/I8zPv3eMD7G0eg/oNf MWN/S4Nkc2aB4aFe3ydpm4RsijIV+0CDCLEkiF5G7Hzkj+RTD0AnxkvyYDVGDRYFi5YB /qLg== MIME-Version: 1.0 X-Received: by 10.50.67.100 with SMTP id m4mr9878981igt.32.1425928008970; Mon, 09 Mar 2015 12:06:48 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.66 with HTTP; Mon, 9 Mar 2015 12:06:48 -0700 (PDT) In-Reply-To: <54FDE98B.8030309@yahoo.fr> References: <54FDE98B.8030309@yahoo.fr> Date: Mon, 9 Mar 2015 12:06:48 -0700 X-Google-Sender-Auth: WK7_U2xqyhyKxZWsTCor4xsZdKI Message-ID: Subject: Re: Looking for help with RSS IPv6 - need software hash code! From: Adrian Chadd To: mohamed chebbi Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2015 19:06:50 -0000 https://msdn.microsoft.com/en-us/library/windows/hardware/ff567236(v=3Dvs.8= 5).aspx https://technet.microsoft.com/en-us/library/hh997036.aspx -a On 9 March 2015 at 11:42, mohamed chebbi wrote: > Hi adrian > > can you please feed the link to the RSS specification. > > Le 23/02/2015 21:38, Adrian Chadd a =C3=A9crit : >> >> Hi! >> >> The last annoyingish bit for IPv6 RSS support is a full software hash >> routine to calculate an RSS hash based on the various fields in the >> IPv6 header. I'm unfortunately out of spare cycles to try and finish >> it so I'm asking for help. >> >> In order to support this in the kernel we need to not only know what >> to do with the hardware RSS, but also have a fallover path to software >> hashing if the NIC doesn't hash it for us, or doesn't hash it >> correctly. For example, if we get IPv4/IPv6 fragments (which yes, are >> a thing, don't tell me they're not), we need to reassemble the >> fragments into a single frame, and then re-calculate the RSS hash on >> the reassembled frame header to figure out where it would've gone. We >> have to do this because the RSS hash value is also used as an index >> into the PCBGROUP hash table array - so no matter whether packets in a >> flow are fragmented or not, they're correctly serialised into the same >> netisr queue and the PCB information for that flow is in the same >> PCBGROUP array bucket. >> >> For doing "correct" RSS, we need to have support for hashing various >> fields and this isn't just limited to 2-tuple / 4-tuple hashing. IPv6 >> has a bunch of mobility header options and RSS has support for these >> (the TCP_EX and UDP_EX fields.) >> >> I've done the software hashing path for IPv4, but I need someone to >> help me do the IPv6 RSS hash calculation for all the variations - IPv6 >> 2-tuple IPv6 TCP, IPv6 UDP, IPv6 TCP_EX (mobility), UDP_EX (mobility.) >> The microsoft RSS specification is online and freely available; it has >> all of these as examples. >> >> So, I'm asking for help. If you're able to help, please look at the >> code in -HEAD in sys/netinet/in_rss.c and sys/netinet6/in6_rss.c. >> You'll see what's missing. You don't need a NIC that has RSS enabled; >> if you enable RSS and PCBGROUPS in the kernel (and bump up the number >> of netisr queues; that still isn't auto-set at boot time) then you'll >> see that traffic will get distributed by software hashing of the >> packet headers. >> >> Thanks! >> >> >> >> >> -adrian >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"