Re: tc not taking stdin as input for creaing tc rules

Phil Sutter <[email protected]>
Newsgroups org.kernel.vger.lartc
Message-ID <[email protected]>
On Tue, Aug 22, 2017 at 09:59:30PM +0530, Akshat Kakkar wrote:
> On Tuesday, August 22, 2017, Phil Sutter <[email protected]> wrote:
> 
> > On Tue, Aug 22, 2017 at 03:01:10PM +0530, Akshat Kakkar wrote:
> > > Following command is not executing. It gives tc help output in reply.
> > >
> > > printf "class del dev eno2 parent 1: classid 1:1
> > > class del dev eno2 parent 1: classid 1:2
> > > class del dev eno2 parent 1: classid 1:3
> > > class del dev eno2 parent 1: classid 1:4
> > > class del dev eno2 parent 1: classid 1:5
> > > class del dev eno2 parent 1: classid 1:6
> > > class del dev eno2 parent 1: classid 1:7
> > > class add dev eno2 parent 1:  classid 1:1 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:2 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:3 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:4 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:5 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:6 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > class add dev eno2 parent 1:  classid 1:7 htb rate 100000000bit burst
> > > 10M ceil 100000000bit prio 1
> > > " | /usr/sbin/tc -force -b
> >
> > Option -b requires a parameter (batch file containing commands). Use '-'
> > to make tc read stdin.
> >
> > Cheers, Phil
> >
> 
> I found a patch of August, 2000 stating the same. However, what's strange
> is it was working like this for kernel 3.10 and also man page doesn't state
> about that extra hiphen .

Stephen Hemminger broke compatibility in commit a3aa47a559f3f ("Make tc
and ip batch mode consistent"). Obviously he forgot to update the man
page which still states that '-b' or '-batch' without filename parameter
were allowed.

Would you care to fix the docs and send a patch?

Cheers, Phil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.