Hi Tomas,

        I’m not expert in Open Flow(I’m learning as I go) but I have asked our 
expert guy and it did not know the concept of extension of match field. What is 
the difference between an extension and an experimenter? I’m pretty sure what 
I’m doing is an experimenter (it is what I did in ONOS for my match) anyway (I 
have based my code on the Nicira one and I think they did extension. It is 
where I mixed both, I think, in my understanding). I’ll extend the 
MatchEntryDeserializerKey class and set the ExperimenterID to see if it works.

        I’ll not be able to test it before 1-2 weeks. I have an emergency to 
take care at the office since today.

        I really appreciate your help.

Thanks,
Yann

> Le 2 mai 2017 à 03:40, Tomáš Slušný <[email protected]> a écrit :
> 
> Hi Yann,
> 
> it seems that you are trying to register your deserializer as experimenter 
> deserializer and not as extension deserializer, so when deserializing it is 
> also trying to read experimenterId and sets it to key, and then because your 
> key now also have experimenterId, finding deserializer for this in registry 
> fails. And if you intended to use your code as experimenter deserializer, you 
> should also use .setExperimenterId method on deserializer key to set the id 
> for it when registering deserializer. So, try to change 
> OxmMatchConstants.EXPERIMENTER_CLASS to OxmMatchConstants.NXM_0_CLASS and see 
> if it helps or set that experimenter id if it is experimenter.
> 
> Regards,
> Tomas
> 
> Od: yann bourdeau <[email protected] 
> <mailto:[email protected]>>
> Odoslané: utorok, 2. mája 2017 0:48
> Komu: [email protected] 
> <mailto:[email protected]>
> Kópia: Arun Paneri (NoviFlow)
> Predmet: [openflowplugin-dev] Problem on experimenters match field.
>  
> Hi!
> 
> Now, I’m trying to implement the match field after doing the actions. I have 
> done all the actions and they work greats. However, for the match field I got 
> an issue. The flow got installed on the switch but the deserialization from 
> the stats of the match fields fails. It does not find the key of the 
> deserializer. Does someone have any idea?
> 
> Here is the REST request:
> VERB: PUT
> URL: 
> http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/1234
>  
> <http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/1234>
> BODY:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow
>  xmlns="urn:opendaylight:flow:inventory"> <barrier>false</barrier> 
> <cookie>10</cookie> <cookie_mask>10</cookie_mask> 
> <flags>SEND_FLOW_REM</flags> <flow-name>FooXf1</flow-name> 
> <hard-timeout>0</hard-timeout> <id>1234</id> <idle-timeout>0</idle-timeout> 
> <installHw>false</installHw>
>  <match> <extension-list 
> xmlns="urn:opendaylight:openflowplugin:extension:general"> <extension-key 
> xmlns:nxNB="urn:opendaylight:openflowplugin:extension:noviflow:match">nxNB:nxm-nfx-match-ip-payload-key
>  </extension-key> <extension> <nxm-nfx-match-ip-payload
>  xmlns="urn:opendaylight:openflowplugin:extension:noviflow:match"> 
> <payload>11</payload> <mask>11</mask> </nxm-nfx-match-ip-payload> 
> </extension> </extension-list> </match> <instructions> <instruction> 
> <apply-actions> <action> <order>0</order> <nfx-action-set-payload-ip
>  xmlns="urn:opendaylight:openflowplugin:extension:noviflow:action"> 
> <payload_size>1</payload_size> <payload_offset>0</payload_offset> 
> <hasmask>0</hasmask> <data>9</data> </nfx-action-set-payload-ip> </action> 
> </apply-actions> <order>0</order> </instruction>
>  </instructions> <priority>2</priority> <strict>false</strict> 
> <table_id>2</table_id> </flow>
> 
> 
> It fails with the following error:
> 2017-05-01 18:33:58,205 | WARN  | entLoopGroup-9-1 | OFDecoder                
>         | 285 - org.opendaylight.openflowjava.openflow-protocol-impl - 
> 0.9.0.SNAPSHOT | Message deserialization failed
> java.lang.IllegalStateException: Deserializer for key: msgVersion: 4 
> objectClass: 
> org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry
>  msgType: 65535 oxm_field: 2 experimenterID: 4278190082 was not found - 
> please verify that all needed deserializers ale loaded correctly
> at 
> org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl.getDeserializer(DeserializerRegistryImpl.java:70)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer.deserializeList(ListDeserializer.java:52)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer.deserialize(MatchDeserializer.java:53)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer.deserialize(MatchDeserializer.java:30)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.setFlow(MultipartReplyMessageFactory.java:301)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.deserialize(MultipartReplyMessageFactory.java:198)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.deserialize(MultipartReplyMessageFactory.java:148)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializationFactory.deserialize(DeserializationFactory.java:55)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:49)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:26)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)[144:io.netty.codec:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)[144:io.netty.codec:4.1.8.Final]
> at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)[144:io.netty.codec:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)[144:io.netty.codec:4.1.8.Final]
> at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)[144:io.netty.codec:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287)[146:io.netty.handler:4.1.8.Final]
> at 
> org.opendaylight.openflowjava.protocol.impl.core.IdleHandler.channelRead(IdleHandler.java:39)[285:org.opendaylight.openflowjava.openflow-protocol-impl:0.9.0.SNAPSHOT]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:433)[142:io.netty.transport:4.1.8.Final]
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)[141:io.netty.common:4.1.8.Final]
> at 
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)[141:io.netty.common:4.1.8.Final]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
> 
> Here is how I define the deserializer key in the codec:
> 
> private static final int NXM_FIELD_CODE = 0b0000010;
> 
> 
> public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new 
> MatchEntryDeserializerKey(
> EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.EXPERIMENTER_CLASS,
> NXM_FIELD_CODE);
> 
> I can provide any other part of the code modified to support the match.
> 
> I have attached the log file with log level set to debug to 
> org.opendaylight.openflowplugin.impl
> 
> 
> 
> Any help on what I’m doing wrong will be greatly appreciated.
> 
> Thanks,
> Yann Bourdeau, M.Ing.
> Senior Software Developer
> 438-499-4607
> [email protected] <mailto:[email protected]>

_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev

Reply via email to