[ovs-discuss] Action "mod_nw_tos:<tos>" for OPENFLOW13

Vasu Dasari vdasari at gmail.com
Mon Jul 12 10:58:16 UTC 2021


I could get the command working for OpenFlow10 but not with OpenFlow13
---
$ ovs-ofctl add-flow -O OpenFlow10 br0
"in_port=2,reg2=0,actions=mod_nw_tos:64,load:55->NXM_NX_REG2[0..5],resubmit(,0)"
$
---
Probably you might have seen the ovs-actions documentation regarding
mod_nw_tos:
*------*

*The mod_nw_tos and mod_nw_ecn actions*
       *Syntax:*
              *mod_nw_tos:**tos*
              *mod_nw_ecn:**ecn*

       The *mod_nw_tos *action sets the DSCP bits in the IPv4 ToS/DSCP or
       IPv6 traffic class field to *tos*, which must be a multiple of 4
       between 0 and 255. This action does not modify the two least
       significant bits of the ToS field (the ECN bits).

       The *mod_nw_ecn *action sets the ECN bits in the IPv4 ToS or IPv6
       traffic class field to *ecn*, which must be a value between 0 and
       3, inclusive. This action does not modify the six most
       significant bits of the field (the DSCP bits).

       In OpenFlow 1.1 and later, consistency rules allow these actions
       only in a flow that matches only packets that contain an IPv4 or
       IPv6 header (or following an action that adds such a header). See
       ``Inconsistencies’’, above, for more information.

       *Conformance:*

       OpenFlow 1.0 has a *mod_nw_tos *action but not *mod_nw_ecn*. Open
       vSwitch implements the latter in OpenFlow 1.0 as an extension
       using *NXAST_REG_LOAD*. OpenFlow 1.1 has specialized actions for
       these purposes. OpenFlow 1.2 and later do not, so Open vSwitch
       translates them to appropriate *OFPAT_SET_FIELD *actions for those
       versions.

-----



*Vasu Dasari*


On Mon, Jul 12, 2021 at 3:13 AM LIU Yulong <liuyulong.xa at gmail.com> wrote:

> Hi there,
>
> Recently, I tested OpenStack Neutron with DSCP marking functions. But, I
> met some errors related to the action "mod_nw_tos:<tos>", the command line
> input is:
>
> """
> ovs-ofctl add-flow -O OpenFlow13 br-int
> "hard_timeout=0,idle_timeout=0,priority=65535,cookie=17142212024999476593,in_port=2,table=0,reg2=0,actions=mod_nw_tos:64,load:55->NXM_NX_REG2[0..5],resubmit(,0)"
> """
>
> The error output is:
> """
> ovs-ofctl: none of the usable flow formats (NXM+table_id) is among the
> allowed flow formats (OXM-OpenFlow13)
> """
> Action "mod_nw_tos:<tos>" is causing the error here.
>
> So, I would ask which action for OPENFLOW13 is to do same work of
> "mod_nw_tos:<tos>" for OPENFLOW10? These is no doc mentioned such action
> for OPENFLOW13.
>
>
> Regards,
> LIU Yulong
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210712/821e173a/attachment-0001.html>


More information about the discuss mailing list