[ovs-discuss] mod_nw_tos: not a valid TOS

Murphy McCauley murphy.mccauley at gmail.com
Fri Mar 15 12:27:32 UTC 2013


On Mar 15, 2013, at 2:22 AM, NGUYEN Xuan Nam wrote:

> However I cannot insert a flow entry with mod_nw_tos:
> 
> root at namnx-HP-Z400-Workstation:/home/namnx# ovs-ofctl add-flow system at s1 priority=65535,idle_timeout=50000,dl_type=0x0800,nw_proto=17,in_port=1,actions=mod_nw_tos:10,output:2
> ovs-ofctl: 10: not a valid TOS
> root at namnx-HP-Z400-Workstation:/home/namnx# ovs-ofctl add-flow system at s1 priority=65535,idle_timeout=50000,dl_type=0x0800,nw_proto=17,in_port=1,actions=mod_nw_tos:2,output:2
> ovs-ofctl: 2: not a valid TOS
> root at namnx-HP-Z400-Workstation:/home/namnx# ovs-ofctl add-flow system at s1 priority=65535,idle_timeout=50000,dl_type=0x0800,nw_proto=17,in_port=1,actions=mod_nw_tos:3,output:2
> ovs-ofctl: 3: not a valid TOS
> 
> 
> In doc file, I see that ToS are between 0 and 255,.
> What did I forget ?


The ovs-ofctl man page does say that, but it also mentions that the bottom two bits are reserved.  The way it says it sort of makes it sound like they will be ignored (which I believe used to be the case), but it actually gives you the error you see.

So this is pretty much the same issue you had two weeks ago when Jesse pointed out that you couldn't use a ToS of 1 because it is an ECN bit.  If you read the OpenFlow spec, you'll see that the mod_nw_tos action is really meant for modifying the DSCP field, which is only the upper six bits of the former ToS field.  The bottom two bits are used for ECN, and OpenFlow 1.0 specifies no way to modify these.  The values you are trying here -- 10, 2, and 3 -- all use at least one of those bottom two (ECN) bits.

Short version: Instead of using a number between 0 and 255, try using any number between 0 and 63 and then multiplying it by 4.

-- Murphy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20130315/c25769f2/attachment.html>


More information about the discuss mailing list