From owner-freebsd-current@FreeBSD.ORG Wed Nov 19 19:02:14 2014 Return-Path: Delivered-To: freebsd-current@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 1AD8441E; Wed, 19 Nov 2014 19:02:14 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 D019C2DB; Wed, 19 Nov 2014 19:02:13 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (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 C88151FE022; Wed, 19 Nov 2014 20:02:09 +0100 (CET) Message-ID: <546CE948.2070105@selasky.org> Date: Wed, 19 Nov 2014 20:02:32 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: FreeBSD Current , np@freebsd.org, Lawrence Stewart , Luigi Rizzo , Adrian Chadd Subject: [RFC] Removal of M_FLOWID flag from m_flags [WAS: Add support for hardware transmit rate limiting queues] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 19:02:14 -0000 Hi, The M_FLOWID flag is marked as deprecated in the FreeBSD kernel code and the patch below completely removes it. I suggest we will now be using the "m_pkthdr.rsstype" also known as "M_HASHTYPE" to decide if the flowid value is valid or not. When the "rsstype" is set to "M_HASHTYPE_NONE" the "m_pkthdr.flowid" field is not valid. Else this field contains valid data for both TX and RX direction. Background: =========== The network drivers today use the "rsstype" field only when receiving traffic. After my patch it is also used when sending traffic, and probably we should rename it. The reason for using the rsstype field for transmit, is to avoid introducing another field in the MBUF's packet header in order to steer outgoing traffic into special multiple purpose hardware FIFOs. This new feature should coexist with the existing flowid mechanism, and this is achieved by introducing a new hash type which I've named "M_HASHTYPE_HWRING" in my patch. This type can be selected by upper layers when generating traffic for lower layers, to indicate that the traffic is of a special kind and should have special treatment by the hardware, like rate-limiting. Hardware which doesn't support M_HASHTYPE_HWRING will send out the packets like usual. Patch is available from here: ============================= http://home.selasky.org:8192/m_flowid_removal.diff Comments are appreciated! --HPS