From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by dpdk.org (Postfix) with ESMTP id 353171B1AF for ; Fri, 16 Feb 2018 21:10:59 +0100 (CET) Received: by mail-pg0-f42.google.com with SMTP id o1so3256844pgn.4 for ; Fri, 16 Feb 2018 12:10:59 -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=72b5t/k73Nd+3x96tlRaDV/+eQ3mhqazk7nklR+WdN8=; b=Rv9w0baRoJ4VwgiDDcoYv0QiXyzylzKDSOVu+vBLnVel1FsbCophd1Flqa72gN/Pk7 9xppkAy98obI/dPOTzNu4wtgMHj3z0SIfnHW+atov8ms1x9gIZDJXRwPexy4LhRJCNsN so94qjJCyN9l09RVkzqR62o3qbcf6NNDCSinQuUqCwzBEhMt2xAkpMB11dL10UwOkCiM gHbp0ae8SuLq5ao3n+JPpNO/IWEWNpwjbQaXgzOB/MEKW/rmdKm+plH2C65wcrXATKrm 0TcVPDSKHSRTV41P7KMZIjqwLvWukjfDCVj0+j+3v93NMNg91BT0xG9fyV5vonj3uyrc 6acw== 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=72b5t/k73Nd+3x96tlRaDV/+eQ3mhqazk7nklR+WdN8=; b=Niy8WqiHNIWu4auQlLuorJZmORWbDitN4evt77AN1YKJQw1Dy3UGeWYQEsK+aPSjQT a6xa8P4qZ584wCXIKLnCL62dgsKwph1h3aEv/UG42DQDopFPXIoLmTghi4TwpDN7nCCn 0PBlH4N6jkElPj32Ym5UXmvLoQWdgOWLkml4T8UIS1BOLYZjg/mD7IT29ehIS9SxR9bj mU2ilrSWB/IQbuqqXbwoVEM8gAEI5izYRff7F3vFuLv4LhMxGoWC07NKDK4YThSlL57f 3fHhBpaKIJUnCsnSD+ymMgaf+sSTWc0SDoDnSBBN6+oq05LtEn7iu/tgG/dFaNyihR21 UhTA== X-Gm-Message-State: APf1xPBXUrwZ7qjewu5J7IXlg1ir/sK2HYyF/Udf7mtHrVN/ajxY1vI4 qLUJaebUk01P9gTwAytbwWkmXA== X-Google-Smtp-Source: AH8x227vjPsQgo4U1+ZiDzQNQjOOGdnc3mt6fYmqxQT6sCz1B+Zl2XxosfEGFg6QKlctVh8dMUJLQg== X-Received: by 10.98.59.151 with SMTP id w23mr3281484pfj.82.1518811858360; Fri, 16 Feb 2018 12:10:58 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id g186sm15414839pfb.168.2018.02.16.12.10.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 12:10:58 -0800 (PST) Date: Fri, 16 Feb 2018 12:10:56 -0800 From: Stephen Hemminger To: alangordondewar@gmail.com Cc: cristian.dumitrescu@intel.com, dev@dpdk.org, Alan Dewar Message-ID: <20180216121056.76d34cc7@xeon-e3> In-Reply-To: <1518795853-7726-1-git-send-email-alan.dewar@att.com> References: <1507195258-14766-1-git-send-email-alan.dewar@att.com> <1518795853-7726-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] [RFC v2] sched: parameterize QoS traffic-classes and queues 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: Fri, 16 Feb 2018 20:10:59 -0000 On Fri, 16 Feb 2018 15:44:13 +0000 alangordondewar@gmail.com wrote: > - qindex = tc_index * 4; > - > - pipe->wrr_tokens[qindex] = (grinder->wrr_tokens[0] & grinder->wrr_mask[0]) > - >> RTE_SCHED_WRR_SHIFT; > - pipe->wrr_tokens[qindex + 1] = (grinder->wrr_tokens[1] & grinder->wrr_mask[1]) > - >> RTE_SCHED_WRR_SHIFT; > - pipe->wrr_tokens[qindex + 2] = (grinder->wrr_tokens[2] & grinder->wrr_mask[2]) > - >> RTE_SCHED_WRR_SHIFT; > - pipe->wrr_tokens[qindex + 3] = (grinder->wrr_tokens[3] & grinder->wrr_mask[3]) > - >> RTE_SCHED_WRR_SHIFT; > + uint32_t q; > + uint8_t tokens; > + > + qindex = tc_index * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS; > + for (q = 0; q < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS; q++) { > + tokens = (grinder->wrr_tokens[q] & grinder->wrr_mask[q]) >> > + RTE_SCHED_WRR_SHIFT; > + pipe->wrr_tokens[qindex + q] = tokens; You could use #pragma to tell compiler to unroll the loop which would make it as fast as the original.