From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v1 1/1] tc: Add support for configuring the taprio scheduler Date: Thu, 04 Oct 2018 13:52:45 -0700 (PDT) Message-ID: <20181004.135245.1546656082346761382.davem@davemloft.net> References: <20180929005943.12928-1-vinicius.gomes@intel.com> <20180929005943.12928-2-vinicius.gomes@intel.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jesus.sanchez-palencia@intel.com, henrik@austad.us, richardcochran@gmail.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, ilias.apalodimas@linaro.org, simon.fok@baesystems.com To: vinicius.gomes@intel.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:55888 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727536AbeJEDrr (ORCPT ); Thu, 4 Oct 2018 23:47:47 -0400 In-Reply-To: <20180929005943.12928-2-vinicius.gomes@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vinicius Costa Gomes Date: Fri, 28 Sep 2018 17:59:43 -0700 > This traffic scheduler allows traffic classes states (transmission > allowed/not allowed, in the simplest case) to be scheduled, according > to a pre-generated time sequence. This is the basis of the IEEE > 802.1Qbv specification. > > Example configuration: > > tc qdisc replace dev enp3s0 parent root handle 100 taprio \ > num_tc 3 \ > map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ > queues 1@0 1@1 2@2 \ > base-time 1528743495910289987 \ > sched-entry S 01 300000 \ > sched-entry S 02 300000 \ > sched-entry S 04 300000 \ > clockid CLOCK_TAI > > The configuration format is similar to mqprio. The main difference is > the presence of a schedule, built by multiple "sched-entry" > definitions, each entry has the following format: > > sched-entry > > The only supported is "S", which means "SetGateStates", > following the IEEE 802.1Qbv-2015 definition (Table 8-6). > is a bitmask where each bit is a associated with a traffic class, so > bit 0 (the least significant bit) being "on" means that traffic class > 0 is "active" for that schedule entry. is a time duration > in nanoseconds that specifies for how long that state defined by > and should be held before moving to the next entry. > > This schedule is circular, that is, after the last entry is executed > it starts from the first one, indefinitely. > > The other parameters can be defined as follows: > > - base-time: specifies the instant when the schedule starts, if > 'base-time' is a time in the past, the schedule will start at > > base-time + (N * cycle-time) > > where N is the smallest integer so the resulting time is greater > than "now", and "cycle-time" is the sum of all the intervals of the > entries in the schedule; > > - clockid: specifies the reference clock to be used; > > The parameters should be similar to what the IEEE 802.1Q family of > specification defines. > > Signed-off-by: Vinicius Costa Gomes Applied.