Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-722

Some Flows not found in DeviceFlowRegistry

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 6146

    Description

      This was noticed with netvirt's TunnelFloodOut_ flows.

      1) Create the flow. It gets written to the DeviceFlowRegistry
      2) When the OFPST_FLOW comes the hash of the match object is different and therefor it is written with an "alien" Flow ID.

      The following are some stuff I logged and then run through a pretty printer to format the yang nesting for easier reading. What you can see is that the FlowRegistryKey changes because the hash of the Match object changes. The augmentations in the two log lines seem functionally equivalent but very structurally different.

      I will continue to dig on this and keep you updated but wanted to throw this out in case you have any relevant input already.

      1) When the flow is written to config and inserted into the DeviceFlowRegistry the following log statement is issued:

      LOG.trace("Storing flowDescriptor with table ID : {} and flow ID : {} for flow hash : {} {} {}",
      flowDescriptor.getTableKey().getId(), flowDescriptor.getFlowId().getValue(),
      flowRegistryKey.hashCode(), flowRegistryKey, flowRegistryKey.getMatch());

      Which produces the following output (Pretty printed):
      Storing flowDescriptor with table ID : 110 and flow ID : TunnelFloodOut_101 for flow hash : -1920448894 FlowRegistryKeyDto: org.opendaylight.openflowplugin.impl.registry.flow.FlowRegistryKeyFactory$FlowRegistryKeyDto@8d884682,
      tableId: 110,
      priority: 16383,
      cookie: 0,
      match (hash): -1921062477 Match{
      getEthernetMatch=EthernetMatch{
      getEthernetDestination=EthernetDestination{
      getAddress=MacAddress [
      _value=01:00:00:00:00:00
      ],
      getMask=MacAddress [
      _value=01:00:00:00:00:00
      ],
      augmentations={}
      } /* getEthernetDestination=EthernetDestination */,
      augmentations={}
      } /* getEthernetMatch=EthernetMatch */,
      getTunnel=Tunnel{
      getTunnelId=101,
      augmentations={}
      },
      augmentations={
      interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow=GeneralAugMatchNodesNodeTableFlow{
      getExtensionList=[
      ExtensionList{
      getExtension=Extension{
      augmentations={
      interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow=NxAugMatchNodesNodeTableFlow{
      getNxmNxReg=NxmNxReg{
      getReg=class org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg0,
      getValue=1,
      augmentations={}
      }
      } /* interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow=NxAugMatchNodesNodeTableFlow */
      } /* augmentations= */
      } /* getExtension=Extension */,
      getExtensionKey=class org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxReg0Key,
      augmentations={}
      } /* ExtensionList */
      ] /* getExtensionList= */
      } /* interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow=GeneralAugMatchNodesNodeTableFlow */
      } /* augmentations= */
      } /* match (hash): -1921062477 Match */

      2) When the OFPST_FLOW message comes in the following is logged from the DeviceFlowRegistry:

      LOG.trace("Created alien flow id {} for flow hash {} {} {}",
      flowDescriptor.getFlowId().getValue(), flowRegistryKey.hashCode(), flowRegistryKey,
      flowRegistryKey.getMatch());
      Which logs (pretty printed):
      Created alien flow id #UF$TABLE*110-2 for flow hash 1557777654 FlowRegistryKeyDto: org.opendaylight.openflowplugin.impl.registry.flow.FlowRegistryKeyFactory$FlowRegistryKeyDto@5cd9ccf6,
      tableId: 110,
      priority: 16383,
      cookie: 0,
      match (hash): 1557164071 Match [
      _ethernetMatch=EthernetMatch [
      _ethernetDestination=EthernetDestination [
      _address=MacAddress [
      _value=01:00:00:00:00:00
      ],
      _mask=MacAddress [
      _value=01:00:00:00:00:00
      ],
      augmentation=[]
      ] /* _ethernetDestination=EthernetDestination */,
      augmentation=[]
      ] /* _ethernetMatch=EthernetMatch */,
      _tunnel=Tunnel [
      _tunnelId=101,
      augmentation=[]
      ],
      augmentation=[
      GeneralAugMatchNotifUpdateFlowStats [
      _extensionList=[
      ExtensionList [
      _extension=Extension [
      augmentation=[
      NxAugMatchNotifUpdateFlowStats [
      _nxmNxReg=NxmNxReg [
      _reg=class org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg0,
      _value=1,
      augmentation=[]
      ]
      ] /* NxAugMatchNotifUpdateFlowStats */
      ] /* augmentation= */
      ] /* _extension=Extension */,
      _extensionKey=class org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxReg0Key,
      _key=ExtensionListKey [
      _extensionKey=class org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxReg0Key
      ],
      augmentation=[]
      ] /* ExtensionList */
      ] /* _extensionList= */
      ] /* GeneralAugMatchNotifUpdateFlowStats */
      ] /* augmentation= */
      ] /* match (hash): 1557164071 Match */

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jhershbe Josh Hershberg
            jhershbe Josh Hershberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: