Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-563

Values of match fields for VLAN tag were wrong when using AD-SAL OF plugin.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • adsal
    • None
    • Operating System: Linux
      Platform: PC

    • 1212

    Description

      Values of match fields for VLAN tag was wrong when I used AD-SAL OF plugin and tried to create a flow entry whose matched packets without VLAN tags.

      I ran a controller with AD-SAL OF plugin, and used REST API of Flow Programmer service to install a flow entry which matched packets without VALN tag.
      And I got the flow entry from a switch by using REST API of Statistics service.
      However I saw the flow entry didn't have a match field for VLAN ID, but had a match field for VLAN PCP.

      What I used
      -----------
      The latest code of controller project on 19th June, 2014.

      $ git log -3 --oneline
      6c5efc6 Merge "Prepare for security-related catalina/tomcat version updates"
      1e672ce Prepare for security-related catalina/tomcat version updates
      0d34210 Merge "CONTROLLER-436 CONTROLLER-432 - Enhance Restconf Swagger Documentation"

      How to produce
      --------------

      1. Build a controller.
      $ git clone https://git.opendaylight.org/gerrit/p/controller.git
      $ cd controller
      $ mvn clean install -DskipTests

      2. Run the controller.
      $ cd opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage/opendaylight/
      $ ./run.sh

      3. Run a Mininet.
      $ sudo mn --controller=remote,192.168.60.180 --topo tree,1

      4. Install a flow entry.
      Use REST API of Flow Programmer service to install a flow entry which has DL_VLAN match field set to 0 which means that the flow entry matches packets without VLAN tag.

      $ curl --user "admin":"admin" -H "Accept: application/json" -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"}

      , "priority":"0", "vlanId":"0","actions":["DROP"]}'

      5. Check the flow entry in Mininet console.
      mininet> dpctl dump-flows

          • s1 ------------------------------------------------------------------------
            NXST_FLOW reply (xid=0x4):
            cookie=0x0, duration=8.121s, table=0, n_packets=0, n_bytes=0, idle_age=8, priority=0,vlan_tci=0x0000 actions=drop

      6. Get the flow entry from the Mininet.

      $ curl --user "admin":"admin" -H "Accept: application/json" -H \
      "Content-type: application/json" -X GET \
      http://localhost:8080/controller/nb/v2/statistics/default/flow

      This GET request must return the flow entry which has DL_VLAN match field set to 0.
      However, the flow entry I saw didn't have DL_VLAN field, but had DL_VLAN_PR field set to 0.

      {
      "flowStatistics": [
      {
      "flowStatistic": [
      {
      "byteCount": 0,
      "durationNanoseconds": 472000000,
      "durationSeconds": 29,
      "flow": {
      "actions": [

      { "type": "DROP" }

      ],
      "hardTimeout": 0,
      "id": 0,
      "idleTimeout": 0,
      "match": {
      "matchField": [

      { "type": "DL_VLAN_PR", <=== VLAN PCP incorrectly set. "value": "0" }

      ]
      },
      "priority": 0
      },
      "packetCount": 0,
      "tableId": 0
      }
      ],
      "node":

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

      }
      ]
      }

      Attachments

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

        Activity

          People

            Hideyuki1985 Hideyuki Tai
            Hideyuki1985 Hideyuki Tai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: