netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dave Taht <dave.taht@gmail.com>
Cc: mcroce@redhat.com,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2] ip link: don't stop batch processing
Date: Wed, 8 Aug 2018 09:26:46 -0700	[thread overview]
Message-ID: <20180808092646.47535f43@xeon-e3> (raw)
In-Reply-To: <CAA93jw7+A2Fp+vsra1=cT+cP6BnvpNiiCJqhtqZZBkRzVdZB6w@mail.gmail.com>

On Fri, 3 Aug 2018 11:08:58 -0700
Dave Taht <dave.taht@gmail.com> wrote:

> On Fri, Aug 3, 2018 at 10:50 AM Matteo Croce <mcroce@redhat.com> wrote:
> >
> > When 'ip link show dev DEVICE' is processed in a batch mode, ip exits
> > and stop processing further commands.
> > This because ipaddr_list_flush_or_save() calls exit() to avoid printing
> > the link information twice.
> > Replace the exit with a classic goto out instruction.
> >
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>  
> 
> one thing I noticed in iproute2-next last week is that
> 
> ( echo qdisc show dev eno1; sleep 5; echo qdisc show dev eno1; ) | tc -b -
> 
> batches the whole thing up to emerge on exit, only.
> 
> It didn't used to do that, the output of every command came out as it
> completed. I used to use that to timestamp and save the overhead of
> invoking the tc utility on openwrt while monitoring qdisc stats in
> https://github.com/tohojo/flent/blob/master/misc/tc_iterate.c

There used to be lots of fflush(stdout) in each sub command but lots of these
got dropped in JSON updates.

I just added one back in after each batch command that should fix what you are seeing.

  reply	other threads:[~2018-08-08 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 17:49 [PATCH iproute2] ip link: don't stop batch processing Matteo Croce
2018-08-03 18:08 ` Dave Taht
2018-08-08 16:26   ` Stephen Hemminger [this message]
2018-08-08 16:27 ` Stephen Hemminger

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=20180808092646.47535f43@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dave.taht@gmail.com \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.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).