[OPNFLWPLUG-167] OF13 TunnelID Match Failures Created: 20/May/14 Updated: 27/Sep/21 Resolved: 12/Aug/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Brent Salisbury | Assignee: | Brent Salisbury |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 1035 |
| Description |
|
Flowmods in the Neutron plugin have been failing recently. TunnelID matches are failing in OpenflowpluginTestCommandProvider. I narrowed this one down to the mask causing issues. OSGI output from HEAD When I comment out the mask the flowmod succeeds: // Commented out ; match.setTunnel(tunnel.build()); OSGI output with a successful flowmod after commenting out the mask: ], _barrier=false, _cookieMask=FlowCookie [_value=10], _flags=FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=true], _flowName=FooXf77, _installHw=false, _instructions=Instructions [_instruction=[Instruction [_order=0, _key=InstructionKey [_order=0], _instruction=ApplyActionsCase [_applyActions=ApplyActions [_action=[Action [_order=0, _key=ActionKey [_order=0], _action=SetFieldCase [_setField=SetField [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], _strict=false, _cookie=FlowCookie [_value=10], _hardTimeout=0, _idleTimeout=0, _priority=2, _tableId=2, _transactionId=TransactionId [_value=26], augmentation=[]] ], _barrier=false, _cookieMask=FlowCookie [_value=10], _flags=FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=true], _flowName=FooXf77, _installHw=false, _instructions=Instructions [_instruction=[Instruction [_order=0, _key=InstructionKey [_order=0], _instruction=ApplyActionsCase [_applyActions=ApplyActions [_action=[Action [_order=0, _key=ActionKey [_order=0], _action=SetFieldCase [_setField=SetField [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], _strict=false, _cookie=FlowCookie [_value=10], _hardTimeout=0, _idleTimeout=0, _priority=2, _tableId=2, _transactionId=TransactionId [_value=26], augmentation=[]] ], _barrier=false, _cookieMask=FlowCookie [_value=10], _flags=FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=true], _flowName=FooXf77, _installHw=false, _instructions=Instructions [_instruction=[Instruction [_order=0, _key=InstructionKey [_order=0], _instruction=ApplyActionsCase [_applyActions=ApplyActions [_action=[Action [_order=0, _key=ActionKey [_order=0], _action=SetFieldCase [_setField=SetField [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_tunnel=Tunnel [_tunnelId=10668, augmentation=[]], augmentation=[]], _strict=false, _cookie=FlowCookie [_value=10], _hardTimeout=0, _idleTimeout=0, _priority=2, _tableId=2, _transactionId=TransactionId [_value=26], augmentation=[]] OVS flowmod instantiated w/o mask in the method I can help debugging the root this week if it isn't obvious to you guys. I need to go through all of the flowmods as this was the first one I started with. Thanks! |
| Comments |
| Comment by Zoltan Lajos Kis [ 20/May/14 ] |
|
The problem is that BigInteger uses two's complement, so it will interpret the first bit set as the negative sign. Could you check what happens if you add an extra zero to the front of the byte array? byte[] mask = new byte[] { 0, (byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1 }; |
| Comment by Michal Polkorab [ 20/May/14 ] |
|
Another observation: I have checked the opendaylight-match-types.yang and found this definition: container "tunnel" { leaf tunnel-mask { type uint64; }} So based on this definition, you should use BigInteger as mask type. It should be enough to use new BigInteger(1, "your byte[]") I would say that the mask should be modeled as binary type. But that's a question for someone who created this model - why he created it this way. Regards |
| Comment by Abhijit Kumbhare [ 22/May/14 ] |
|
Brent, Is this still happening? Thanks, |
| Comment by Brent Salisbury [ 25/May/14 ] |
|
(In reply to Zoltan Lajos Kis from comment #1) ; That did it! Appreciate it Zoltan. Cheers, |
| Comment by Debolina Bandyopadhyay [ 03/Jun/14 ] |
|
hello, Is this bug fixed? If yes, I would really appreciate whoever pushed the change also takes over the bug (assign it yourself) Thanks, |
| Comment by Kamal Rameshan [ 23/Jun/14 ] |
|
Checked the history of OpenflowpluginTestCommandProvider and saw a change from Brent for this bug. Brent: can you please mark it resolved. |
| Comment by Abhijit Kumbhare [ 12/Aug/14 ] |
|
Looks like this is fixed as per Kamal's comment. Brent - if this is not - feel free to reopen it. |