[ovs-discuss] OpenVSwitch - No error is received for operation on non-exists queue (OFPQOFC_BAD_QUEUE ) or non-exists port (OFPQOFC_BAD_PORT )

Prabina Pattnaik Prabina.Pattnaik at nechclst.in
Fri Jun 1 05:42:11 UTC 2012


Hi,
 I have found following issue while working on OVS 1.2.2
Bug Description
As per openflow 1.0 spec, OFPET_QUEUE_OP_FAILED code has OFPQOFC_BAD_PORT / OFPQOFC_BAD_QUEUE error type but in OVS 1.2.2, no error is received for operation on non-existing queue or non-existing port. When switch received any "action" with invalid queue then OFPET_BAD_ACTION error code with OFPBAC_BAD_QUEUE type is also not handled.
Raising this issue for making switch more functional and informative to controller
* What you did that make the problem appear?
 1. We made following bridge.
------------------------------------
e999897a-932f-4a57-81ce-252adc12cce9
    Bridge "br0"
       Controller "ptcp:6633"
        fail_mode: secure
        Port "br0"
            Interface "br0"
                type: internal
        Port "em1"
            Interface "em1"
        Port "vnet0"
            Interface "vnet0"

    2. We have executed following commands for verifying the error:-
1)  queue-stats with port and/queue does not exists
2)  add-flow with non-exists or invalid port and/or queue
3) Modify-flow with non- exists or invalid port and/or queue

* What you expected to happen?

1.      When taking queue-stats for non-existing port following error should generate from switch

ovs-ofctl queue-stats tcp:<switch_ip>:6633 25 1
OFPQOFC_BAD_PORT  (port does not exists) with OFPET_QUEUE_OP_FAILED error code.

2.      When taking queue-stats for non-existing queue following error should generate from switch

ovs-ofctl queue-stats tcp:10.0.1.1:6633 2 4967
OFPQOFC_BAD_QUEUE (queue does not exists) with OFPET_QUEUE_OP_FAILED error code.

3.      When taking queue-stats for non-existing port and queue both, following error should generate from switch

ovs-ofctl queue-stats tcp:<switch_ip>:6633 25 4967
OFPQOFC_BAD_PORT  (port does not exists) with OFPET_QUEUE_OP_FAILED error code.

4.      When executed the command add-flow with enqueue action for non-existing queue or out of range queue or invalid queue.

ovs-ofctl add-flow tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2:23"

ovs-ofctl add-flow tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2: 42949672999"

 Entry should not be added and OFPBAC_BAD_QUEUE with OFPET_BAD_ACTION error code should be generated by switch.



5.      When executed the command mod-flow with enqueue action for non-existing queue or out of range queue or invalid queue

ovs-ofctl mod-flows tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2:23"

ovs-ofctl mod-flows tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2: 42949672999"

Entry should not be modified and OFPBAC_BAD_QUEUE with OFPET_BAD_ACTION error code should be generated by switch.


* What actually happened.
Following are the result of above 5 points respectively:-

1.       ovs-ofctl queue-stats tcp:<switch_ip>:6633 25 1

OFPST_QUEUE reply (xid=0x1): 0 queues



2.      ovs-ofctl queue-stats tcp:10.0.1.1:6633 2 4967

 OFPST_QUEUE reply (xid=0x1): 0 queues



3.      ovs-ofctl queue-stats tcp:10.0.1.1:6633 1000 4967

 OFPST_QUEUE reply (xid=0x1): 0 queues



4.      ovs-ofctl add-flow tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2:23"
            Entry added successfully.

ovs-ofctl add-flow tcp:<switch_ip>:6633 " dl_type=0x0800 action=enqueue:2: 42949672999"
            Entry added successfully.

5.      ovs-ofctl mod-flows tcp:10.0.1.1:6633 "dl_type=0x0800,dl_src=11:22:33:44:55:66 actions=enqueue:2:25"
            Entry added (entry not exist in a flow table) or modified successfully.

ovs-ofctl mod-flows tcp:10.0.1.1:6633 "dl_type=0x0800,dl_src=11:22:33:44:55:66 actions=enqueue:2: 42949672999"
            Entry added (entry not exist in a flow table) or modified successfully.
* The Open vSwitch version number (as output by "ovs-vswitchd    --version").
------------------------
# ovs-vswitchd --version
ovs-vswitchd (Open vSwitch) 1.2.2
Compiled May 21 2012 11:23:22
OpenFlow versions 0x1:0x1
--------------------------------
* The Git commit number (as output by "git rev-parse HEAD"),
   if you built from a Git snapshot.
   Not from git.
 * Any local patches or changes you have applied (if any).
   No patches are applied.

 * The kernel version on which Open vSwitch is running (from
   /proc/version) and the distribution and version number of
   your OS (e.g. "Centos 5.0").
   Distribution is Fedora 15.
   kernel is:
   Linux version 2.6.38.6-26.rc1.fc15.x86_64 (mockbuild at x86-04.phx2.fedoraproject.org<mailto:mockbuild at x86-04.phx2.fedoraproject.org>) (gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC) ) #1 SMP Mon May 9 20:45:15 UTC 2011

* The output of "ovs-dpctl show"
system at br0:
                lookups: frags:0, hit:8653, missed:3144, lost:0
                port 0: br0 (internal)
                port 1: em1
                port 3: vent0

* If you have Open vSwitch configured to connect to an
   OpenFlow controller, the output of "ovs-ofctl show <bridge>"
   for each <bridge> configured in the vswitchd configuration
   database.

# ovs-ofctl show br0
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:00002c27d71aec58
n_tables:1, n_buffers:256
features: capabilities:0x87, actions:0xfff
 1(em1): addr:2c:27:d7:1a:ec:58
     config:     0
     state:      0
     current:    100MB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
 3(vnet0): addr:fe:54:00:a1:59:5f
     config:     0
     state:      0
     current:    10MB-FD COPPER
 LOCAL(br0): addr:2c:27:d7:1a:ec:58
     config:     0
     state:      0
OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0

* Any other information that you think might be relevant
Same issue has been found on latest release OVS 1.4.1.
Regards,
Prabina



DISCLAIMER:

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

The contents of this e-mail and any attachment(s) are confidential and
intended

for the named recipient(s) only. 

It shall not attach any liability on the originator or NECHCL or its

affiliates. Any views or opinions presented in 

this email are solely those of the author and may not necessarily reflect the

opinions of NECHCL or its affiliates. 

Any form of reproduction, dissemination, copying, disclosure, modification,

distribution and / or publication of 

this message without the prior written consent of the author of this e-mail is

strictly prohibited. If you have 

received this email in error please delete it and notify the sender

immediately. .

-----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20120601/224f11fc/attachment.html>


More information about the discuss mailing list