From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 0F4B33250 for ; Mon, 15 Jan 2018 17:52:57 +0100 (CET) Received: by mail-pf0-f177.google.com with SMTP id e11so8341980pff.6 for ; Mon, 15 Jan 2018 08:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K3ByxVEvVSMu9EoRWk0TCu+VEJkxstJTREaucZ941Bo=; b=gybRNoh/F0WJH07llke7BF1LT6tJZ/TwDlHwF8k7zp4MjxkwmIkMgcwhY4XY8RllyY 2TT26UuileoNhUAkKfe+oR6BQqu8wTQdWlz0uVtulE/ZXD5IfA1sDY1Iv+40HtpHMFK3 R9lcW59ouWTQwLelFBc816G8eWXrMD/Blw15hq7XiGZpJQjC05cCQnS7tSLiPYVhXdcA 60rHmLJOtd5i3LJnnI7K7jYGkm1gSB0+i8reekl+usbMaVM/JbSEKi6f1Bq9LKv8MAyt o4d7ZFNyPvYn3XovA5rcUbQV2JchgDGd06lHJj0E6ADx4PodhTFdZKcyoGbpstkouXDp IoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K3ByxVEvVSMu9EoRWk0TCu+VEJkxstJTREaucZ941Bo=; b=Wdy7hbFsPUpeFQiaU7SfVhd6R1HRN9XYhK+rvCCeYtIkHGQIj2mQpIC7y7eTuSrcHe rkvd2GBotR24kmpjLltdydbwrN8/8TT+Kv5JNV75SnPZEy1vdb0r43ATaU1Gr5Uej54T w/K2aORmLf+yxn2jFqVtCZSGbBhnhhT15bOAEsR5CzuxJbQ4JUjgg3PMP/xGYXe6aT/R 2hFUakm2V2qU+Zv5iI73lOsmomL49TL8QftHITBO4TpZ/7y0MM2ca5JxrkSwMT1045yw NMYY5Rpq39DLtNJVy1CcZDeCPDPqNa646IZhSpjnRO2KQl8iZDvoF82sDMZc00hjJd6J zyHQ== X-Gm-Message-State: AKGB3mIiKwToxvDe1qyqBxfMF0dMUHwzMlCZFihisljJIqL6ObKBU2ue epxbOkypmuc+8EXXhxkwU/BraA== X-Google-Smtp-Source: ACJfBotQagPU8Kv9AVoEbM1VOrGTtlRDsLKKQgHcEcvsaKshp9bR1T96xfOFbzyuGoZvum5zWAYhBg== X-Received: by 10.99.96.23 with SMTP id u23mr26939346pgb.355.1516035176156; Mon, 15 Jan 2018 08:52:56 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id g7sm97618pfm.76.2018.01.15.08.52.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jan 2018 08:52:55 -0800 (PST) Date: Mon, 15 Jan 2018 08:52:52 -0800 From: Stephen Hemminger To: alangordondewar@gmail.com Cc: cristian.dumitrescu@intel.com, tomasz.kantecki@intel.com, jasvinder.singh@intel.com, dev@dpdk.org, Alan Dewar Message-ID: <20180115085252.1ea5d456@xeon-e3> In-Reply-To: <1516032969-23894-1-git-send-email-alan.dewar@att.com> References: <1515425232-18888-1-git-send-email-alan.dewar@att.com> <1516032969-23894-1-git-send-email-alan.dewar@att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6] 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: , X-List-Received-Date: Mon, 15 Jan 2018 16:52:57 -0000 On Mon, 15 Jan 2018 16:16:09 +0000 alangordondewar@gmail.com wrote: Looks like a good idea, minor editing feedback. > - red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + RTE_RED_SCALING); > - red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + RTE_RED_SCALING); > - red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) << RTE_RED_SCALING; > + red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + rte_red_scaling); > + red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + rte_red_scaling); While you are at it remove unnecessary parenthesis here. > + red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) << > + rte_red_scaling; It reads easier if the the shift operator on the next line red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) << rte_red_scaling; Why do functional tests have to be in same file and clutter the code?