[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGx-UoC2Bz6hXaoCHtHdbXe+kN0NSyD9TS8WnLMvn+qWGOaWTg@mail.gmail.com>
Date: Tue, 4 Dec 2018 11:58:22 -0800
From: Peter Oskolkov <posk.devel@...il.com>
To: Peter Oskolkov <posk@...gle.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>,
davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH net-next] net: netem: use a list in addition to rbtree
On Tue, Dec 4, 2018 at 11:11 AM Peter Oskolkov <posk@...gle.com> wrote:
>
> Thanks, Stephen!
>
> I don't care much about braces either. David, do you want me to send a
> new patch with braces moved around?
Sent a v2 with style fixes, just in case.
>
> On Tue, Dec 4, 2018 at 9:56 AM Stephen Hemminger
> <stephen@...workplumber.org> wrote:
> >
> > I like this, it makes a lot of sense since packets are almost
> > always queued in order.
> >
> > Minor style stuff you might want to fix (but don't have to).
> >
> > > + if (!last ||
> > > + t_last->time_to_send > last->time_to_send) {
> > > + last = t_last;
> > > + }
> >
> > I don't think you need braces here for single assignment.
> >
> > > +static void netem_erase_head(struct netem_sched_data *q, struct sk_buff *skb)
> > > +{
> > > + if (skb == q->t_head) {
> > > + q->t_head = skb->next;
> > > + if (!q->t_head)
> > > + q->t_tail = NULL;
> > > + } else
> > > + rb_erase(&skb->rbnode, &q->t_root);
> >
> > Checkpatch wants both sides of if/else to have brackets.
> > Personally, don't care.
> >
> > Reviewed-by: Stephen Hemminger <stephen@...workplumber.org>
Powered by blists - more mailing lists