[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWakUAx8aLiSg23h4dZHuGxw5DdNacFg3AF944-Q4PzHw@mail.gmail.com>
Date: Thu, 12 Jul 2018 23:05:45 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc: Michel Machado <michel@...irati.com.br>,
Nishanth Devarajan <ndev2021@...il.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>,
David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Cody Doucette <doucette@...edu>
Subject: Re: [PATCH v3 net-next] net/sched: add skbprio scheduler
On Wed, Jul 11, 2018 at 12:33 PM Marcelo Ricardo Leitner
<marcelo.leitner@...il.com> wrote:
>
> On Tue, Jul 10, 2018 at 07:25:53PM -0700, Cong Wang wrote:
> > On Mon, Jul 9, 2018 at 2:40 PM Marcelo Ricardo Leitner
> > <marcelo.leitner@...il.com> wrote:
> > >
> > > On Mon, Jul 09, 2018 at 05:03:31PM -0400, Michel Machado wrote:
> > > > Changing TC_PRIO_MAX from 15 to 63 risks breaking backward compatibility
> > > > with applications.
> > >
> > > If done, it needs to be done carefully, indeed. I don't know if it's
> > > doable, neither I know how hard is your requirement for 64 different
> > > priorities.
> >
> > struct tc_prio_qopt {
> > int bands; /* Number of bands */
> > __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
> > };
> >
> > How would you do it carefully?
>
> quick shot, multiplex v1 and v2 formats based on bands and sizeof():
>
> #define TCQ_PRIO_BANDS_V1 16
> #define TCQ_PRIO_BANDS_V2 64
> #define TC_PRIO_MAX_V2 64
>
> struct tc_prio_qopt_v2 {
> int bands; /* Number of bands */
> __u8 priomap[TC_PRIO_MAX_V2+1]; /* Map: logical priority -> PRIO band */
> };
>
Good try, but:
1. You don't take padding into account, although the difference
between 16 and 64 is big here. If it were 16 and 20, almost certainly
wouldn't work.
2. What if I compile a new iproute2 on an old kernel? The iproute2
will use V2, while old kernel has no knowledge of V2, so it only
copies a part of V2 in the end....
Powered by blists - more mailing lists