Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-267

The way of handling values for SET_NW_TOS action is wrong

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 1759

    Description

      The way of handling values for SET_NW_TOS action is wrong.
      Consequently, I cannot set some values for SET_NW_TOS action.

      I detected the issue with the latest Base Edition on 09/07/2014.
      And I've found out that the issue occurs with bout the MD-SAL OpenFlow plugin and the AD-SAL OpenFlow plugin.

      First of all, it was failed to create a flow entry which had a SetNwTos action to set 1 into DSCP field.

      $ curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \
      http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/staticFlow/flow1 \
      -d '{ "installInHw":"true", "name":"flow1", "node":

      {"id":"00:00:00:00:00:00:00:01","type":"OF"}

      ,"ingressPort":"1","priority":"500","actions":["SET_NW_TOS=1"] }'

      Even after I executed the above curl command, the flow entry was not installed into the switch.
      I observed that the controller sent a FLOW_MOD message to the switch, and the switch sent a ERROR message to the controller.

      It seemed to me that the AD-SAL used the passed value "1" for the nw_tos field for OFPAT_SET_NW_TOS in FLOW_MOD messages.
      "1" in TOS field means DSCP=0 and ECP=1, altought OpenFlow controllers can set a value only in DSCP field.

      1 2 3 4 5 6 7
      -----------------------

      DSCP field ECP field

      -----------------------

      Next, to set 1 into DSCP field, I set 4 (1 << 2) to a SET_NW_TOS.

      $ curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \
      http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/staticFlow/flow1 \
      -d '{ "installInHw":"true", "name":"flow1", "node":

      {"id":"00:00:00:00:00:00:00:01","type":"OF"}

      ,"ingressPort":"1","priority":"500","actions":["SET_NW_TOS=4"] }'

      I saw the flow entry which contained the action which set 4 into TOS field. (It meant to set 1 into DSCP field.)

      mininet> dpctl dump-flows

          • s1 ------------------------------------------------------------------------
            NXST_FLOW reply (xid=0x4):
            cookie=0xa, duration=3727.481s, table=0, n_packets=0, n_bytes=0, idle_age=3727, priority=0 actions=CONTROLLER:65535
            cookie=0x0, duration=2.677s, table=0, n_packets=0, n_bytes=0, idle_age=2, priority=500,in_port=1 actions=mod_nw_tos:4

      Thirdly, to set 63 into DSCP field, I set 252 (63 << 2) to a SetNwTos.
      However, it was also failed.

      $ curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \
      http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/staticFlow/flow1 \
      -d '{ "installInHw":"true", "name":"flow1", "node":

      {"id":"00:00:00:00:00:00:00:01","type":"OF"}

      ,"ingressPort":"1","priority":"500","actions":["SET_NW_TOS=252"] }'

      The response message of the above request was:
      Invalid Configuration (IP ToS bits 252 is not in the range 0 - 63)

      I saw the following output in the OSGi console of the controller.

      2014-09-05 19:54:47.069 EDT [http-bio-8080-exec-4] WARN o.o.c.f.i.ForwardingRulesManager - Invalid Configuration for flow FlowConfig [dynamic=false, status=Invalid Configuration (IP ToS bits 252 is not in the range 0 - 63), installInHw=true, name=flow1, switchId=OF|00:00:00:00:00:00:00:01, ingressPort=1, portGroup=null, etherType=null, priority=500, vlanId=null, vlanPriority=null, dlSrc=null, dlDst=null, nwSrc=null, nwDst=null, protocol=null, tosBits=null, tpSrc=null, tpDst=null, cookie=null, idleTimeout=null, hardTimeout=null, actions=[SET_NW_TOS=252]]. The failure is IP ToS bits 252 is not in the range 0 - 63

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hagbard Ed Warnicke
            Hideyuki1985 Hideyuki Tai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: