netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: Patrick McHardy <kaber@trash.net>,
	Stephen Hemminger <shemminger@osdl.org>,
	netdev@oss.sgi.com, Werner Almesberger <werner@almesberger.net>
Subject: Re: [RFC] batched tc to improve change throughput
Date: Tue, 18 Jan 2005 15:58:30 +0100	[thread overview]
Message-ID: <20050118145830.GS26856@postel.suug.ch> (raw)
In-Reply-To: <1106058592.1035.95.camel@jzny.localdomain>

* jamal <1106058592.1035.95.camel@jzny.localdomain> 2005-01-18 09:29
> On Tue, 2005-01-18 at 08:44, Thomas Graf wrote:
> > I'm not sure if
> > entering/leaving subsystem features makes any sense. I find a context
> > help by pressing '?' and normal completion most useful. It's not
> > that I dislike your idea but I think it's not worth it.
> 
> What doesnt make sense or is not worth it?

My very personal opinion is that it's not worth it.

> a) usability. 
> i) I dont need to remember how the parse tree looks like or where i am
> on the parse tree.
> I go:
> tc <enter>
> tc> ?
> i get some help on the next levels.
> ii) I should be able to ssh to this thing from some remote location.
> This way i can write some scripts to automate things
> 
> b) extrenous typing on command line.
> I go to the filter level
> 
> u32> ?
> gives me help
> u32> context
> filter dev lo parent ffff: protocol ip prio 10
> u32> add 
> u32> match ip src 10.0.0.21/32 flowid 1:16 action drop
> u32> match ip src 0/0 flowid 1:16 action ok
> u32> commit
> filters submitted ..

What do you if there is an error? To what kind of context do you
go? Let's say the kernel reports -EINVAL.


> u32> .. //takes you up one
> u32> ls
> listing here of filter dev lo parent ffff: protocol ip prio 10
> ..
> ..
> u32> /qdisc/dev/eth0
> now into the qdisc level context for eth0

That's what I have:

tgr:axs ~/dev/netconfig/src ./netconfig
...
axs# ?
  Next level commands:
      link ...                       Link (interface) configuration
      neighbour ...                  Neighbour (ARP) configuration
      warranty                       Show warranty
      exit                           Quit application
axs# n?
  Backtrace:
      ->neighbour - Neighbour (ARP) configuration

  Description:
    Module to view and modify the neighbour tables.

    The neighbour table establishes bindings between protocol
    addresses and link layer addresses for hosts sharing the same
    physical link. This module allows you to view the content of
    these tables and to manipulate their content.

  Next level commands:
      add <ADDR> ...                 Add a neighbour
      modify <ADDR> ...              Modify a neighbour
      delete <ADDR> ...              Delete a neighbour
      list ...                       List neighbour attributes
axs# neighbour l?
  Backtrace:
      ->neighbour - Neighbour (ARP) configuration
        ->list - List neighbour attributes

  Next level commands:
      <cr>                           Command can be executed at this point.
      stats ...                      Verbose listing (all attributes/statistics)
      where ...                      Only dump neighbours matching a filter
axs# neighbour list w?
  Backtrace:
      ->neighbour - Neighbour (ARP) configuration
        ->list - List neighbour attributes
          ->where - Only dump neighbours matching a filter

  Attributes of this node:
      lladdr <LLADDR>                Link layer address
      dst <ADDR>                     Destination address
      dev <DEV>                      Link the neighbour is on

  Next level commands:
      <cr>                           Command can be executed at this point.
      flags ...                      
axs# ...

Again, It's not that I dislike contexts but in the end it all
gets down to make error correction as easy as possible. Everytime
you request a completion or context help the command will get
parsed and a very verbose message including the possibilities you
have will be printed and you can correct your error.

It's more typing work I know, but usually one only types the first
1..3 chars of the commands.

I think something like this should be the base and contextes can
be build upon it.

> >  - call over arguments
> 
> Dont understand this.

The way it is now, configuration over program arguments.

> > It includes a quite easy to use API to define the grammar which
> > can be used by readline to do the completion and print context
> > aware help. 
> 
> what does readline provide you again?

It basically takes over the reading of a line and allows manipulation
of the input buffer. It implements all the useful line editing like
in bash and helps with completion. You can bind the '?' key to a
help function so that '?' will not be printed on the screen but instead
the help text is printed and you get back your original line untouched.
It also gives the user a chance to bind keys to certain actions so
everyone can keep the bindings they like with the additional
possibilities to export functions so one could for example bind C-N
to "list-neighbours".

> I think iproute2 should stay as is - dont wanna break someones scripts
> or make it fatter than it is already. Any app to provide the above
> should be standalone.

Well, you mean like generating iproute2 input? This means we'd have to
reimplement the logic twice and handling errors from iproute2 gets
really hard. It's not a problem to keep the old way of iproute2 as-is.

  parent reply	other threads:[~2005-01-18 14:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 15:23 [RFC] batched tc to improve change throughput Thomas Graf
2005-01-17 15:45 ` jamal
2005-01-17 16:05   ` Thomas Graf
2005-01-17 16:36     ` jamal
2005-01-17 16:56       ` Thomas Graf
2005-01-17 22:49         ` jamal
2005-01-18 13:44           ` Thomas Graf
2005-01-18 14:29             ` jamal
2005-01-18 14:36               ` Lennert Buytenhek
2005-01-18 14:43                 ` jamal
2005-01-18 15:07                   ` Thomas Graf
2005-01-18 15:20                   ` Lennert Buytenhek
2005-01-19 14:24                     ` jamal
2005-01-18 14:58               ` Thomas Graf [this message]
2005-01-18 15:23                 ` Lennert Buytenhek
2005-01-19 14:13                 ` jamal
2005-01-19 14:36                   ` Thomas Graf
2005-01-19 16:45                   ` Werner Almesberger
2005-01-19 16:54                   ` Thomas Graf
2005-01-20 14:42                     ` jamal
2005-01-20 15:35                       ` Thomas Graf
2005-01-20 17:06                         ` Stephen Hemminger
2005-01-20 17:19                           ` Thomas Graf
2005-01-24 14:13                         ` jamal
2005-01-24 15:06                           ` Thomas Graf
2005-01-26 13:48                             ` jamal
2005-01-26 14:35                               ` Thomas Graf
2005-02-11 15:07                               ` Dan Siemon
2005-02-12 13:45                                 ` jamal
2005-02-12 14:29                                   ` Thomas Graf
2005-02-12 22:07                                   ` Dan Siemon
2005-02-12 22:32                                     ` Thomas Graf
2005-02-14  0:23                                       ` Dan Siemon
2005-02-14 14:27                                         ` Thomas Graf
2005-02-15 20:28                                           ` Dan Siemon
2005-02-15 20:47                                             ` Thomas Graf
2005-02-22 21:40                                               ` Dan Siemon
2005-02-22 23:15                                                 ` Thomas Graf
2005-01-18 15:07               ` Werner Almesberger
2005-01-19 14:08                 ` Thomas Graf
2005-01-19 16:33                   ` Werner Almesberger
2005-01-19 17:22                     ` Thomas Graf
2005-01-17 18:00 ` Stephen Hemminger
2005-01-17 18:02 ` 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=20050118145830.GS26856@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=hadi@cyberus.ca \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.org \
    --cc=werner@almesberger.net \
    /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).