[OPNFLWPLUG-17] Attempt to use the 'metadata-mask' match in Flow Programming does not work Created: 09/Jan/14 Updated: 27/Sep/21 Due: 24/Jan/14 Resolved: 19/Feb/16 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jan Medved | Assignee: | Vaclav Demcak |
| 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: | 277 |
| Priority: | High |
| Description |
|
When attempting to use both metadata and metadata-mask matches from restconf, the flow is not programmed on the switch. Using just the metadata match works well. The flow programming XML with the the defective metadata-mask match is as follows: <?xml version="1.0" encoding="UTF-8" standalone="no"?> When reading the flow back from the controller's config space, i get the following (2 flows were programmed, so I got 2 flows back): GET http://192.168.4.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/ <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| Comments |
| Comment by Martin Sunal [ 10/Jan/14 ] |
|
All values are put into a transaction correctly including both metadata and metadata-mask matches. |
| Comment by Tony Tkacik [ 21/Jan/14 ] |
|
Metadata mask was not lost in MD-SAL as per output: [_metadata=12345, _metadataMask=[-1, -15, 69], Run against foo:node:1 (Which prints out RPCs from MD-SAL and NSF). 2014-01-21 12:06:01.768 CET [md-sal-binding-commit-3] INFO o.o.o.t.OpenflowpluginTestServiceProvider - addFlow - AddFlowInput [_flowRef=FlowRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=foo:node:1]]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table[key=TableKey [_id=0]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow[key=FlowKey [_id=Uri [_value=134]]]]]], _flowTable=FlowTableRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=foo:node:1]]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table[key=TableKey [_id=0]]]]], _barrier=null, _bufferId=null, _containerName=null, _cookieMask=255, _flags=null, _flowName=FooXf20, _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=DecNwTtlCase [_decNwTtl=org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.nw.ttl._case.DecNwTtlBuilder$DecNwTtlImpl@1f, augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_ethernetMatch=null, _icmpv4Match=null, _icmpv6Match=null, _inPhyPort=null, _inPort=null, _ipMatch=null, _layer3Match=null, _layer4Match=null, _metadata=Metadata [_metadata=12345, _metadataMask=[-1, -15, 69], augmentation=[]], _protocolMatchFields=null, _tunnel=null, _vlanMatch=null, augmentation=[]], _outGroup=null, _outPort=null, _strict=false, _cookie=20, _hardTimeout=1200, _idleTimeout=3400, _priority=2, _tableId=2, _node=NodeRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=foo:node:1]]]]]], _transactionUri=Uri [_value=BA-12], augmentation=[]] |
| Comment by Michal Polkorab [ 22/Jan/14 ] |
|
After debugging: 2014-01-22 16:45:53.446 CET [nioEventLoopGroup-9-1] WARN o.o.o.p.impl.util.MatchSerializer - WRONG MASK LENGTH - expected: 8 actual: 3 OF Plugin: Byte array (mask) passed to the library is of incorrect length. It should be wrapped into correct length mask. Michal |
| Comment by Vaclav Demcak [ 25/Jan/14 ] |
|
2014-01-25 16:22:17 CET [com.sun.jersey.spi.container.ContainerResponse] SEVERE com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException The RuntimeException could not be mapped to a response, re-throwing to the HTTP container 2014-01-25 16:22:17 CET [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/restconf].[JAXRSRestconf]] SEVERE org.apache.catalina.core.StandardWrapperValve invoke Servlet.service() for servlet [JAXRSRestconf] in context with path [/restconf] threw exception |
| Comment by Deepthi V V [ 25/Jan/14 ] |
|
Datatype for metadata mask was changed from binary to uint64. The data "//FF" is incorrect and hence exception is thrown. |
| Comment by Vaclav Demcak [ 26/Jan/14 ] |
|
tested and it seems like ok. |