From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [RFC PATCH] net: add a rate_limit attribute to netdev_queue and a rtnetlink Date: Sun, 14 Jul 2013 13:44:12 -0400 Message-ID: <51E2E36C.8030307@mojatatu.com> References: <20130710140409.6691.77084.stgit@nitbit.x32> <51DE220A.40505@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tom Herbert , John Fastabend , Stephen Hemminger , ben@decadent.org.uk, "Brandeburg, Jesse" , Linux Netdev List , Jeff Kirsher To: John Fastabend Return-path: Received: from mail-ie0-f179.google.com ([209.85.223.179]:33983 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267Ab3GNRoX (ORCPT ); Sun, 14 Jul 2013 13:44:23 -0400 Received: by mail-ie0-f179.google.com with SMTP id c10so24191355ieb.38 for ; Sun, 14 Jul 2013 10:44:23 -0700 (PDT) In-Reply-To: <51DE220A.40505@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: On 13-07-10 11:10 PM, John Fastabend wrote: > >> Will this be usable in the case that more than one queue shares a rate? > > Here I must not understand the question. Each queue has independent > rate limiters. At least in the hardware supported by ixgbe. Maybe > other hardware has a different implementation? > I think Tom might be alluding to scenarios where a rate (as a resource) is shared by multiple ingress as well as egress interfaces (in your case queues). This is a very popular use case with tc (in particular in conjunction with IFB). In such a case, the rate by itself would need to modeled as an indexable attribute. Some hardware (example modern broadcom switching chips, maybe yours) are not capable; So the index would have local semantics as in your case. But I know hardware that does support shared rates. Maybe you could come up with IFLA_QUEUE_RATE_LOCAL vs IFLA_QUEUE_RATE_GLOBAL which will encapsulate a global index for the shared rate. cheers, jamal