[VOL-1849] : fix to handle tech-profile download for all flows instead of just eapol
Change-Id: Iee14056cf8a4849ad5f1870a2b787285538603dc
diff --git a/adaptercore/openolt_flowmgr.go b/adaptercore/openolt_flowmgr.go
index 38d5c7e..fae77a9 100644
--- a/adaptercore/openolt_flowmgr.go
+++ b/adaptercore/openolt_flowmgr.go
@@ -34,6 +34,7 @@
openoltpb2 "github.com/opencord/voltha-protos/go/openolt"
tp_pb "github.com/opencord/voltha-protos/go/tech_profile"
"github.com/opencord/voltha-protos/go/voltha"
+
//deepcopy "github.com/getlantern/deepcopy"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@@ -262,9 +263,10 @@
} else if ipProto == IgmpProto {
log.Info("igmp flow add ignored, not implemented yet")
+ return
} else {
log.Errorw("Invalid-Classifier-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo})
- //return errors.New("Invalid-Classifier-to-handle")
+ return
}
} else if ethType, ok := classifierInfo[EthType]; ok {
if ethType.(uint32) == EapEthType {
@@ -284,12 +286,11 @@
} else {
installFlowOnAllGemports(nil, f.addEAPOLFlow, args, classifierInfo, actionInfo, flow, gemPorts, EapolFlow, vlanId)
}
- // Send Techprofile download event to child device in go routine as it takes time
- go f.sendTPDownloadMsgToChild(intfID, onuID, uniID, uni, TpId)
}
if ethType == LldpEthType {
log.Info("Adding LLDP flow")
addLLDPFlow(flow, portNo)
+ return
}
} else if _, ok := actionInfo[PushVlan]; ok {
log.Info("Adding upstream data rule")
@@ -317,7 +318,10 @@
}
} else {
log.Errorw("Invalid-flow-type-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo, "flow": flow})
+ return
}
+ // Send Techprofile download event to child device in go routine as it takes time
+ go f.sendTPDownloadMsgToChild(intfID, onuID, uniID, uni, TpId)
}
func (f *OpenOltFlowMgr) CreateSchedulerQueues(Dir tp_pb.Direction, IntfId uint32, OnuId uint32, UniId uint32, UniPort uint32, TpInst *tp.TechProfile, MeterId uint32, flowMetadata *voltha.FlowMetadata) error {