From: Peter Oskolkov <posk@google.com>
To: stephen@networkplumber.org
Cc: davem@davemloft.net, netdev@vger.kernel.org,
posk.devel@gmail.com, Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] net: netem: use a list in addition to rbtree
Date: Tue, 4 Dec 2018 11:10:55 -0800 [thread overview]
Message-ID: <CAPNVh5eKjgKBinsVs=6SZ0uo9vacji5qztsazUodEnzppAD4pg@mail.gmail.com> (raw)
In-Reply-To: <20181204095649.29a52bc9@shemminger-XPS-13-9360>
Thanks, Stephen!
I don't care much about braces either. David, do you want me to send a
new patch with braces moved around?
On Tue, Dec 4, 2018 at 9:56 AM Stephen Hemminger
<stephen@networkplumber.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@networkplumber.org>
next prev parent reply other threads:[~2018-12-04 19:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 1:07 [PATCH net-next] net: netem: use a list in addition to rbtree Peter Oskolkov
2018-12-04 15:57 ` Eric Dumazet
2018-12-04 17:56 ` Stephen Hemminger
2018-12-04 19:10 ` Peter Oskolkov [this message]
2018-12-04 19:58 ` Peter Oskolkov
2018-12-04 20:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPNVh5eKjgKBinsVs=6SZ0uo9vacji5qztsazUodEnzppAD4pg@mail.gmail.com' \
--to=posk@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=posk.devel@gmail.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).