From owner-freebsd-current@FreeBSD.ORG Wed Nov 19 19:23:31 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBDD546B; Wed, 19 Nov 2014 19:23:31 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (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 6C5117B3; Wed, 19 Nov 2014 19:23:31 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id ex7so6485990wid.3 for ; Wed, 19 Nov 2014 11:23:30 -0800 (PST) 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=NeEkqzSpI5ao993Sk/HEJFskSWAIOt2f28GDHw8r+0s=; b=p6a5MO+u81CFVbIg0ZWgCXtpjFQSqJ0p23oA6cetuSRt9jtfeIjwI6kgB92NNzqbvF rr6nE98yLUR2GVXPXERwN7LL74SLnr+MqjpAr2xcKIk9PhurFS/2/iAz485Bq0Fur0hi UMXTaoH/oLTJHag3cmPmzGOcYDKjsA+u7sC+7QO3urk9ukspVY6LkUXHQgh62e2hZtHu eAVBkoyMsgAZu1PfGuAyDNk0Fyr8Tn+UhD1kmpjpWKP5nMlRfjw7+16nC1gHJ81CvnCS yvFWxFPNfcJM8QtEYSeeyPEo27cvpjvkn5hBksb9MnpbxlA50mHPNOOZ4SLpLQJzty0j 29rA== MIME-Version: 1.0 X-Received: by 10.194.47.226 with SMTP id g2mr60171005wjn.68.1416425009945; Wed, 19 Nov 2014 11:23:29 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Wed, 19 Nov 2014 11:23:29 -0800 (PST) In-Reply-To: <546CE948.2070105@selasky.org> References: <546CE948.2070105@selasky.org> Date: Wed, 19 Nov 2014 11:23:29 -0800 X-Google-Sender-Auth: 5m9os84WzKkSgQNPm2I1gIamQAY Message-ID: Subject: Re: [RFC] Removal of M_FLOWID flag from m_flags [WAS: Add support for hardware transmit rate limiting queues] From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Lawrence Stewart , FreeBSD Current , Luigi Rizzo , Navdeep Parhar 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:23:31 -0000 Hm, how are we going to have the RSS stuff work at the same time as the hardware flow steering stuff you're prototyping? -adrian On 19 November 2014 11:02, Hans Petter Selasky wrote: > 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