[OPNFLWPLUG-229] OF plugin does not handle SET_TP_SRC/SET_TP_DST actions. Created: 05/Aug/14 Updated: 27/Sep/21 Resolved: 01/Nov/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Hideyuki Tai | Assignee: | Hideyuki Tai |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 1491 | ||||||||
| Description |
|
The MD-SAL OpenFlow plugin does not handle SET_TP_SRC/SET_TP_DST actions for OF 1.3 switches. This problem is discussed on the openflowplugin-dev ML. VTN project is planning to use these actions in Helium. |
| Comments |
| Comment by Hideyuki Tai [ 13/Aug/14 ] |
|
I think this bug ( The "Product" of On the other hand, the "Product" of this bug report ( Can I revert the status of this bug report back to CONFIRMED? |
| Comment by Michal Rehak [ 14/Aug/14 ] |
|
Hi Hideyuki, One is of-1.0 way: direct action on packetOut And you are trying to use the of-1.0 simple way while talking to of-1.3 device. I guess we need decision here. In md-sal there should not exist 2 ways to the same goal and app should not be forced to distill protocol version of particular device and choose the right way depending on that version. Having 2 sources for the same action is definitely a bad idea. I guess we should change md-sal models so that only one way of packetOut actions is supported where possible (presuming that most of of-1.0 features are supported in higher versions). But this would break API towards app now. Now - do you think that there is possibility for VTN to change packetOut actions adding code? We can definitely write hotfix for helium so that if only one of mentioned actions is provided then it would be propagated. But this is not the way to a good maintainable code. |
| Comment by Hideyuki Tai [ 15/Aug/14 ] |
|
(In reply to michal rehak from comment #4) Hi Michal, That makes sense to me. Though VTN Project plans to use SET_TP_SRC/SET_TP_DST actions (or SET_FIELD action) for FLOW_MOD messages, but not for PACKET_OUT messages. Anyway, our answer is Yes, we plan to change code to handle this problem. However, VTN Manager is a AD-SAL application, and it does not use the OF plugin directly. |
| Comment by Abhijit Kumbhare [ 18/Aug/14 ] |
|
Status in the Aug 15 IRC daily meeting: ACTION: |
| Comment by Timotej Kubas [ 20/Aug/14 ] |
| Comment by Abhijit Kumbhare [ 20/Aug/14 ] |
|
Merged. |
| Comment by Hideyuki Tai [ 12/Sep/14 ] |
|
Thank you for submitting the patch for However, we've found out that it is failed to install flow entries which change UDP port and ICMP type/code for OF 1.3 switches. When we try to install such flow entries, the OF plugin incorrectly creates flow entries which change TCP port even though the flow entries match UDP or ICMP packets, and consequently OF switches reject FLOW_MOD messages for such flow entries due to MATCH_INCONSISTENT. We've reviewed the following patch. We've found out that this patch always converts SET_TP_SRC/SET_TP_DST actions to SET_FIELD(TCP_SRC/TCP_DST) for OF 1.3 switches, though it should convert them to SET_FIELD(UDP_SRC/UDP_DSP) or SET_FIELD(ICMP_TYPE/ICMPV4_CODE) depending on match condition. |
| Comment by Michal Rehak [ 12/Sep/14 ] |
|
Hideyuki, Thank you. |
| Comment by Hideyuki Tai [ 13/Sep/14 ] |
|
(In reply to michal rehak from comment #10) Hi Micahl, Test Case #1: TCP (protocol = 6) curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \ ,"ingressPort":"1", "protocol":"6", "priority":"500","actions":["SET_TP_DST=1", "SET_TP_SRC=5"], "etherType":"2048" }' ==> That's OK. Test Case #2: UDP (protocol = 17) curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \ ,"ingressPort":"1", "protocol":"17", "priority":"500","actions":["SET_TP_DST=1", "SET_TP_SRC=5"], "etherType":"2048" }' ==> That's NG. OpenFlow switches return a ERROR message (CODE: OFPBAC_MATCH_INCONSISTENT) Test curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \ ,"ingressPort":"1", "protocol":"1", "priority":"500","actions":["SET_TP_DST=1", "SET_TP_SRC=5"], "etherType":"2048" }' ==> That's NG. OpenFlow switches return a ERROR message (CODE: OFPBAC_MATCH_INCONSISTENT) |
| Comment by Timotej Kubas [ 21/Sep/14 ] |
|
We made hotfix for this and now we can handle UDP and TCP protocols in right way. But we are still dealing with ICMP protocol, where after submitting the ICMP flow we get this error on controller: 2014-09-21 19:40:14.828 CEST [md-sal-binding-notification-313] ERROR o.o.o.t.NodeErrorListenerLoggingImpl - Error notification ----[Type=BadAction, Code=15, Xid =51] Message caught by wireshark looks proper. |
| Comment by Timotej Kubas [ 22/Sep/14 ] |
|
We still get the error notification "BadAction" but it occurs on virtual device, not in controller. |
| Comment by Hideyuki Tai [ 30/Sep/14 ] |
|
(In reply to Timotej Kubas from comment #13) I've tested the patch, and confirmed that the patch fixes the bug partially. With this patch, I've successfully installed a flow entry to change UDP port. |
| Comment by Michal Rehak [ 15/Oct/14 ] |
|
I tested icmpv4 against cpqd virtual switch and it accepted the flow. |
| Comment by Hideyuki Tai [ 23/Oct/14 ] |
|
(In reply to Hideyuki Tai from comment #14) It seems that the current Open vSwitch does not support ICMP type/code for SET_FIELD actions. |
| Comment by Michal Rehak [ 23/Oct/14 ] |
|
merged |
| Comment by Hideyuki Tai [ 23/Oct/14 ] |
|
Thank you for creating and merging the patch (Gerrit 11371). Since the current Open vSwitch does not support SET_FIELD(ICMP type/code) actions, I could not confirm if the patch correctly works on SET_FIELD(ICMP type/code) actions on OF 1.3 switches. But, I captured a FLOW_MOD message which had SET_FIELD(ICMP type) and SET_FIELD(ICMP code) sent by a controller on which the patch (Gerrit 11371) was merged, and I thought that the values in the action fields was correct. It seems that Lagopus switch support SET_FIELD(ICMP type/code) actions, I'll test on that switch at some time. |
| Comment by Hideyuki Tai [ 24/Oct/14 ] |
|
Finally, I've confirmed that the bug is fixed. I've installed Lagopus switch, and successfully installed a flow entry which has SET_FIELD(ICMP type/code)actions into the Lagopus switch. |
| Comment by Hideyuki Tai [ 28/Oct/14 ] |
|
Could you someone cherry pick the patch to the stable/helium branch? |
| Comment by Michal Rehak [ 01/Nov/14 ] |
|
done |