Message ID | 20160610082913.4878ab77@miho (mailing list archive) |
---|---|
State | Rejected, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A0B832BA6; Fri, 10 Jun 2016 08:29:22 +0200 (CEST) Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id CCFF72BA2 for <dev@dpdk.org>; Fri, 10 Jun 2016 08:29:20 +0200 (CEST) Received: from miho (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id <B0033756820@ernst.netinsight.se>; Fri, 10 Jun 2016 08:29:48 +0200 Date: Fri, 10 Jun 2016 08:29:13 +0200 From: Simon Kagstrom <simon.kagstrom@netinsight.net> To: cristian.dumitrescu@intel.com, stephen@networkplumber.org, dev@dpdk.org, thomas.monjalon@6wind.com Message-ID: <20160610082913.4878ab77@miho> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.27; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH / RFC] sched: Correct subport calcuation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Simon Kagstrom
June 10, 2016, 6:29 a.m. UTC
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
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(-)
Comments
Hi again! Any news about this patch? I'm off for parental leave starting next week (until january), so any comments (or simply dropping it!) would be good to have before that :-) // Simon On 2016-06-10 08:29, Simon Kagstrom wrote: > Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> > --- > 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; >
Hi Simon, I am going to take a look at it this week and come back to you. Thanks, Cristian > -----Original Message----- > From: Simon Kågström [mailto:simon.kagstrom@netinsight.net] > Sent: Tuesday, June 21, 2016 7:41 AM > To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; > stephen@networkplumber.org; dev@dpdk.org; > thomas.monjalon@6wind.com > Subject: Re: [dpdk-dev] [PATCH / RFC] sched: Correct subport calcuation > > Hi again! > > Any news about this patch? I'm off for parental leave starting next week > (until january), so any comments (or simply dropping it!) would be good > to have before that :-) > > // Simon > > On 2016-06-10 08:29, Simon Kagstrom wrote: > > Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> > > --- > > 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; > >
> -----Original Message----- > From: Simon Kagstrom [mailto:simon.kagstrom@netinsight.net] > Sent: Friday, June 10, 2016 7:29 AM > To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; > stephen@networkplumber.org; dev@dpdk.org; > thomas.monjalon@6wind.com > Subject: [PATCH / RFC] sched: Correct subport calcuation > > Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> > --- > 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 Hi Simon, NACK. Each port has an array of queues (size is port->n_queues_per_port), which are organized into equal size groups associated with pipes and subports: - Each pipe is assigned the next group of RTE_SCHED_QUEUES_PER_PIPE (i.e. 16) queues in ascending order; - Each subport is assigned the next group of port->n_pipes_per_subport pipes (congurable parameter). The following is true: n_queues_per_port = RTE_SCHED_QUEUES_PER_PIPE * n_pipes_per_subport * n_subports_per_port Given a queue index (pipe_qindex), the following are true: - Pipe index: pindex = pipe_qindex >> 4; - Subport index (let's call it sindex): sindex = pindex / n_pipes_per_subport, right? I don't know why you get crashes in your application, but what I do know is that your proposed method to compute sindex is not correct :) Regards, Cristian
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;