[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181204095649.29a52bc9@shemminger-XPS-13-9360>
Date: Tue, 4 Dec 2018 09:56:49 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Peter Oskolkov <posk@...gle.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
Peter Oskolkov <posk.devel@...il.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next] net: netem: use a list in addition to rbtree
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