Uploaded image for project: 'VOLTHA'
  1. VOLTHA
  2. VOL-4671

Fix usage of Metadata classifier field in openolt adapter

    XMLWordPrintable

    Details

    • Story Points:
      3
    • Sprint:
      VOLTHA 2.10 - Sprint 6

      Description

      There is below code snippet in makeOpenOltClassifierField, where metadata classifier is treated as vlan.

      // The classifierInfo[Metadata] carries the vlan that the OLT see when it receives packet from the ONU
      if metadata, ok := classifierInfo[Metadata].(uint64); ok {
       vid := uint32(metadata)
       // Set the OVid or IVid classifier based on the whether OLT is using a transparent tag or not
       // If OLT is using transparent tag mechanism, then it classifies whatever tag it sees to/from ONU which
       //is OVid from the perspective of the OLT. When OLT also places or pops the outer tag, then classifierInfo[Metadata]
       // becomes the IVid.
       if classifier.OVid != 0 && classifier.OVid != ReservedVlan { // This is case when classifier.OVid is not set
       if vid != ReservedVlan {
       classifier.IVid = vid
       }
       } else {
       if vid != ReservedVlan {
       classifier.OVid = vid
       }
       }
      }
      

      However there is below code snippet where it is treated as uni port.

      
      	// Ignore Downlink trap flow given by core, cannot do anything with this flow */
      	if vlan, exists := downlinkClassifier[VlanVid]; exists {
      		if vlan.(uint32) == (uint32(ofp.OfpVlanId_OFPVID_PRESENT) | 4000) { //private VLAN given by core
      			if metadata, exists := downlinkClassifier[Metadata]; exists { // inport is filled in metadata by core
      				if uint32(metadata.(uint64)) == plt.MkUniPortNum(ctx, flowContext.intfID, flowContext.onuID, flowContext.uniID) {
      					logger.Infow(ctx, "ignoring-dl-trap-device-flow-from-core",
      						log.Fields{
      							"flow":      flowContext.logicalFlow,
      							"device-id": f.deviceHandler.device.Id,
      							"onu-id":    flowContext.onuID,
      							"intf-id":   flowContext.intfID})
      					return nil
      				}
      			}
      		}
      	}
      

      What is the correct usage?

        Attachments

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

          Activity

            People

            Assignee:
            ggowdra Girish Gowdra
            Reporter:
            ggowdra Girish Gowdra
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: