[ovs-dev] [PATCH] ovs-ofctl:To set importance of a rule for eviction(OF14)

Rishi Bamba rishi.bamba at tcs.com
Tue Nov 11 06:38:42 UTC 2014


Hi Ben,

> > > +dnl Replace some flows in the bridge.
> > > +for i in {1..8..2}; do echo "dl_vlan=$i,importance=`expr $i +
> > > 10`,actions=drop"; done > replace-flows.txt
> > > +AT_CHECK([ovs-ofctl -O OpenFlow14 replace-flows br0
> > > replace-flows.txt])
> > > +
> > > +dnl Dump them and compare the dump flows output against the
> > > expected output.
> > > +for i in `seq 1 8`; do if [[ `expr $i % 2` -eq 1 ]]; then
> > > importance=`expr $i + 10`; else importance=$i; fi; echo "
> > > importance=$importance, dl_vlan=$i actions=drop"; done | sort >
> > > expout
> > > +AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip |
> > > sed '/OFPST_FLOW/d' | sort],
> > > +  [0], [expout])
> > 
> > what would {1..8} and {1..8..2} expand to?
> > 
> > i guess they are bash dialects but my copy of
> > bash doesn't seem to expand the latter.
> > 
> >     bash-3.2$ echo {1..8}
> >     1 2 3 4 5 6 7 8
> >     bash-3.2$ echo {1..8..2}
> >     {1..8..2}
> >     bash-3.2$
> 
> On my bash, I get 1 3 5 7 for the latter.
> 
> This is my fault because I did not read the tests in this patch
> carefully.  If I had, I would have replaced both of these nonportable
> constructs (which I hadn't even heard of before).  Anyway, I sent out
> a
> fix:
>         http://openvswitch.org/pipermail/dev/2014-November/048512.html

Thanks for the fix.

Thanks & Regards
Rishi Bamba
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




More information about the dev mailing list