From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Kagstrom Subject: [PATCH / RFC] sched: Correct subport calcuation Date: Fri, 10 Jun 2016 08:29:13 +0200 Message-ID: <20160610082913.4878ab77@miho> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: cristian.dumitrescu@intel.com, stephen@networkplumber.org, dev@dpdk.org, thomas.monjalon@6wind.com Return-path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id CCFF72BA2 for ; Fri, 10 Jun 2016 08:29:20 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Simon Kagstrom --- I'm a total newbie to the rte_sched design and implementation, so I've added the RFC. We get crashes (at other places in the scheduler) without this code. lib/librte_sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 1609ea8..b46ecfb 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -1869,7 +1869,7 @@ grinder_next_pipe(struct rte_sched_port *port, uint32_t pos) /* Install new pipe in the grinder */ grinder->pindex = pipe_qindex >> 4; - grinder->subport = port->subport + (grinder->pindex / port->n_pipes_per_subport); + grinder->subport = port->subport + (grinder->pindex / port->n_subports_per_port); grinder->pipe = port->pipe + grinder->pindex; grinder->pipe_params = NULL; /* to be set after the pipe structure is prefetched */ grinder->productive = 0; -- 1.9.1