From patchwork Mon Sep 11 15:51:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kantecki, Tomasz" X-Patchwork-Id: 28597 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B6FE6D45; Mon, 11 Sep 2017 17:51:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DBBF96841 for ; Mon, 11 Sep 2017 17:51:21 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 11 Sep 2017 08:51:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,378,1500966000"; d="scan'208"; a="1193830828" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 11 Sep 2017 08:51:17 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.22]) by IRSMSX103.ger.corp.intel.com ([169.254.3.49]) with mapi id 14.03.0319.002; Mon, 11 Sep 2017 16:51:16 +0100 From: "Kantecki, Tomasz" To: "alangordondewar@gmail.com" CC: "dev@dpdk.org" , Alan Dewar Thread-Topic: [PATCH] sched: make RED scaling configurable Thread-Index: AQHTIygS4GukRywBr0Of/7Add+MgxqKv45Tg Date: Mon, 11 Sep 2017 15:51:16 +0000 Message-ID: References: <1504273290-5429-1-git-send-email-alan.dewar@att.com> In-Reply-To: <1504273290-5429-1-git-send-email-alan.dewar@att.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODIxNDVkMWEtY2FmYy00NDEyLWI1MTAtNjFjZmI4YTU0NmYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImJVTXNEbkZhNzdURG9YN3kxYTFDRzhWS3Bnb1haR0M0dHczMDVmZUxpVW89In0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] sched: make RED scaling configurable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Alan, This looks like a very good idea but I think the patch must also cover adequate changes of test/test/test_red.c file. What range of fraction/max_threshold values did you find to work correctly with no further code mods? Thanks, Tomasz -----Original Message----- From: alangordondewar@gmail.com [mailto:alangordondewar@gmail.com] Sent: Friday, September 1, 2017 2:42 PM To: Kantecki, Tomasz Cc: dev@dpdk.org; Alan Dewar Subject: [PATCH] sched: make RED scaling configurable From: Alan Dewar The RED code stores the maximum threshold is a 32-bit integer as a pseudo fixed-point floating number with 10 fractional bits. Twelve other bits are used to encode the filter weight, leaving just 10 bits for the queue length. This limits the maximum queue length supported by RED queues as 1024 packets. Move the "hard" definitions from red.h into config/common_base so that RED scaling can be configured during build. Signed-off-by: Alan Dewar --- config/common_base | 2 ++ lib/librte_sched/rte_red.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.1.4 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. diff --git a/config/common_base b/config/common_base index 5e97a08..5501dfe 100644 --- a/config/common_base +++ b/config/common_base @@ -666,6 +666,8 @@ CONFIG_RTE_SCHED_COLLECT_STATS=n CONFIG_RTE_SCHED_SUBPORT_TC_OV=n CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 CONFIG_RTE_SCHED_VECTOR=n +CONFIG_RTE_RED_SCALING=10 +CONFIG_RTE_RED_MAX_TH_MAX=1023 # # Compile the distributor library diff --git a/lib/librte_sched/rte_red.h b/lib/librte_sched/rte_red.h index ca12227..49d3379 100644 --- a/lib/librte_sched/rte_red.h +++ b/lib/librte_sched/rte_red.h @@ -51,10 +51,9 @@ extern "C" { #include #include #include +#include -#define RTE_RED_SCALING 10 /**< Fraction size for fixed-point */ #define RTE_RED_S (1 << 22) /**< Packet size multiplied by number of leaf queues */ -#define RTE_RED_MAX_TH_MAX 1023 /**< Max threshold limit in fixed point format */ #define RTE_RED_WQ_LOG2_MIN 1 /**< Min inverse filter weight value */ #define RTE_RED_WQ_LOG2_MAX 12 /**< Max inverse filter weight value */ #define RTE_RED_MAXP_INV_MIN 1 /**< Min inverse mark probability value */