[OPNFLWPLUG-267] The way of handling values for SET_NW_TOS action is wrong Created: 09/Sep/14 Updated: 27/Sep/21 Due: 15/Sep/14 Resolved: 19/Sep/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Hideyuki Tai | Assignee: | Ed Warnicke |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 1759 |
| Description |
|
The way of handling values for SET_NW_TOS action is wrong. I detected the issue with the latest Base Edition on 09/07/2014. 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 \ ,"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. 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 2 3 4 5 6 7
---- 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 \ ,"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
Thirdly, to set 63 into DSCP field, I set 252 (63 << 2) to a SetNwTos. $ curl --user "admin":"admin" -H "Content-type: application/json" -X PUT \ ,"ingressPort":"1","priority":"500","actions":["SET_NW_TOS=252"] }' The response message of the above request was: 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 |
| Comments |
| Comment by Hideyuki Tai [ 10/Sep/14 ] |
|
I've submitted a patch to controller project to fix the issue. I've tested the patch, and confirmed that the patch fixes the issue partially. It seems to me that the MD-SAL OF plugin uses TOS value for set-field(DSCP) action although it must use DSCP value for set-field(DSCP). |
| Comment by Michal Rehak [ 12/Sep/14 ] |
|
input flows (xml for MD-SAL, json for AD-SAL) containing 3 tests: TOS= {1, 4, 252} |
| Comment by Michal Rehak [ 12/Sep/14 ] |
|
Attachment bug-1795-inputFlows.tgz has been added with description: input flows |
| Comment by Michal Rehak [ 12/Sep/14 ] |
|
added fixes:
And I added etherType to AD-SAL inputs so that OF-1.3 wont reject those flows because of inconsistent match - see attachment. Results are the same through MD-SAL and AD-SAL: OF-1.3 accepts all 3 flows and reported DSCP values are: 0, 1, 63 |
| Comment by Hideyuki Tai [ 12/Sep/14 ] |
|
(In reply to michal rehak from comment #3) Thank you for submitting patches. I've tested the following two patches. https://git.opendaylight.org/gerrit/#/c/11114/1 I've confirmed that the MD-SAL OF plugin works fine for OF 1.3 switches and OF 1.0 switches, and the AD-SAL OF plugin works fine for OF 1.0. However, I've observed two issues. The first issue is that after a controller installs a flow entry containing an action "SET_NW_TOS=252", the following error message is output repeatedly. [Statistics Collector] ERROR o.o.controller.sal.action.Action - Invalid field value assignement. For type: setNwTos Expected: [0x0-0xff], Got: 0xfffffffc It happens only when I use the AD-SAL OF plugin. The second issue is that the MD-SAL OF plugin doesn't add SET_FIELD(ECN) action in flow entries. |
| Comment by Michal Rehak [ 13/Sep/14 ] |
|
https://git.opendaylight.org/gerrit/#/c/11132/ adapters now consider
Testing: OF-1.0 reports = {0, 4, 252} (ovs shows TOS) OF-1.3 reports = {0, 1, 63} (ovs shows DSCP) MD-SAL TOS input = {0, 1, 4, 252}OF-1.0 reports = {0, x, 4, 252} (ovs shows TOS) * (ovs shows DSCP) **
Now inputs for AD-SAL and MD-SAL are different because:
|
| Comment by Michal Rehak [ 16/Sep/14 ] |
|
Update: Changes are ready for merge: ofplugin (OF-1.3 TOS to DSCP fork): Please merge on sight. |
| Comment by Hideyuki Tai [ 16/Sep/14 ] |
|
Hi Michal and Ed, Thank you for submitting the patches. I've confirmed that these patches fix the issue when I uses the MD-SAL OF plugin. Please do not forget that the patches does not fix the issue when the AD-SAL OF plugin (the old OF plugin) is used. |
| Comment by Abhijit Kumbhare [ 18/Sep/14 ] |
|
Fixed for the OF 1.0/1.3 plugin. For OF 1.0 only plugin - please assign to the controller. |
| Comment by Hideyuki Tai [ 19/Sep/14 ] |
|
(In reply to Abhijit Kumbhare from comment #8) I've created a new bug report for the AD-SAL OF plugin (OF 1.0 only plugin). |