From owner-freebsd-net@FreeBSD.ORG Sun Sep 1 21:04:04 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D5531DB1; Sun, 1 Sep 2013 21:04:04 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96350257A; Sun, 1 Sep 2013 21:04:04 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1VGB3f-000L1c-63; Sun, 01 Sep 2013 21:03:27 +0400 Message-ID: <5223AB67.60207@ipfw.ru> Date: Mon, 02 Sep 2013 01:02:31 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130728 Thunderbird/17.0.7 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: Flow ID, LACP, and igb References: <5222F661.1090601@ipfw.ru> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jack F Vogel , "Justin T. Gibbs" , Alan Somers , "net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 21:04:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02.09.2013 00:45, Adrian Chadd wrote: > > > Not sure about igb, but ixgbe (according to advanced RX descriptor > format, 7.1.6.2 @ 82599 datasheet) can provide 'real' RSS value > which can be used in m_flowid instead of NIC queue id. > > (And, by the way, another RSS-related problem: there are cases when > setting flowid does more harm, for example - PPPoE frames always > being received at Q0. Partially this can be solved by analyzing RSS > type from the same RX descriptor format (e.g. don't set flowid for > RSS type 0x0), but there are other cases like GRE tunneling (where > you probably want to perform deeper inspection in SW). > > So, can we have some kind of per-NIC sysctl disabling setting > flowid on given port? > > (Yes, this should be in some kind of `ethtool` binary but we still > don't have it..) ) > > > What specifically are you asking for? Disabling the flowid tagging > of I'm talking about some small ixgbe (and maybe igb?) changes related to the generation of mbuf flowid. More specifically: 1) As far as I understand, ixgbe generates u16 hash which is then used to compute receive queue number. It seems that this value can be set by NIC in per-packet advanced RX descriptor, so it can be used as better flowid value (which should be optional). 2) There are cases when we shouldn't simply mark all packets as received by q0 (since NIC hash doesn't known how to hash them), so disabling setting m_flowid for given port can help a lot. > mbufs? Or changing the LACP hashing? It is not related to lagg directly. Actually, it is, but for the very special case like 'routing on the stick' when we're forwarding packets back to the same lagg interface. In this case, we can set (pre-computed) static RX queue flowids to force forwarder packet fall to the same NIC and the same TX queue id. This approach minimizes egress mutex contention (I forgot to mention patch implementing this stuff in my 'Network stack changes' letter). > > You can configure LACP to not use the flowid from the NIC and do > the hashing yourself. Yup, I'm aware of that :) > > > -adrian > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIjq2cACgkQwcJ4iSZ1q2ncAACfVmiVTtyno7hcxG59HZs8cSyq umwAnjQ6r4V3UCO8T0uE3gMZmeMveUMB =thS0 -----END PGP SIGNATURE-----