[ovs-dev] [PATCH] Add a tutorial for advanced Open vSwitch features.
Ben Pfaff
blp at nicira.com
Fri Apr 19 23:24:03 UTC 2013
On Thu, Apr 18, 2013 at 03:13:27PM -0700, Gurucharan Shetty wrote:
> On Wed, Apr 17, 2013 at 4:03 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > +You can use "ovs-sandbox" three ways:
> > +
> > + * If you have already installed Open vSwitch on your system, then
> > + you should be able to just run "ovs-sandbox" without any
> > + options.
> >
> Reading the above statement made me believe that a "make install" would put
> ovs-sandbox in the $PATH. But it does not.
Good point.
Maybe it makes sense to install ovs-sandbox, but that was not my
intent. For now, I've edited this paragraph to say
* If you have already installed Open vSwitch on your system, then
you should be able to just run "ovs-sandbox" from this directory
without any options.
> > + * If you have not installed Open vSwitch (and you do not want to
> > + install it), then you can build Open vSwitch according to the
> > + instructions in INSTALL, without installing it. Then run
> > + "ovs-sandbox -b DIRECTORY", substituting the Open vSwitch build
> > + directory for DIRECTORY.
> >
> Same as above.
I made the same change here.
> > +Datapath actions: push_vlan(vid=30,pcp=0),1
> >
> Did you mean to have the above line?
Oops, no, that line is just wrong.
I changed it to the correct output:
we can see that the result is no longer a flood but to the specified
learned destination port p4:
Datapath actions: pop_vlan,4
> > + --)
> > + dashdash=yes ;;
> > + -h|--help)
> > + cat <<EOF
> > +ovs-shell, for starting a sandboxed dummy Open vSwitch environment
> >
> s/ovs-shell/ovs-sandbox ; Same thing below.
Oh, thanks. ovs-shell was the original name but ovs-sandbox seemed
better.
> > + --sr*=*)
> > + srcdir=$optarg
> > + built=:
> >
> I think built=: should not be set. If you set this, "tutorial/ovs-sandbox
> -s ." will fail and not use the default build directory.
Oops, I changed this to built=false.
> > + ;;
> > + -s|--sr*)
> > + prev=srcdir
> > + built=:
> >
> Same here
Same change, thanks again.
> > + ;;
> > + -i|--installed)
> > + installed=:
> > + ;;
> > + --sc*=*)
> > + schema=$optarg
> > + installed=:
> > + ;;
> > + -S|--sc*)
> > + prev=schema
> > + installed=:
> > + ;;
> > + -*)
>
> Spaces here. tabs before. Alignment is a little wonky.
Oops. I've now run untabify on the whole file.
> > --- /dev/null
> > +++ b/tutorial/t-stage4
> > @@ -0,0 +1,15 @@
> > +#! /bin/sh -ve
> > +
> > +ovs-ofctl add-flow br0 "table=4 reg0=1 actions=1"
> > +
> > +ovs-ofctl add-flows br0 - <<'EOF'
> > + table=4 reg0=2 actions=strip_vlan,2
> > + table=4 reg0=3 actions=strip_vlan,3
> > + table=4 reg0=4 actions=strip_vlan,4
> > +EOF
> > +
> > +ovs-ofctl add-flows br0 - <<'EOF'
> > + table=4 reg0=0 priority=99 dl_vlan=20 actions=1,strip_vlan,2
> > + table=4 reg0=0 priority=99 dl_vlan=30 actions=1,strip_vlan,3,4
> > + table=4 reg0=0 priority=50 actions=1
> > +EOF
> >
>
> Couple of white spaces. Otherwise looks good and very helpful.
Thanks.
More information about the dev
mailing list