Packet-In/Out Support and Removed default Leaf rules as it is overriding ONU default 4091 flows
Bug fixes in pon resource manager
Change-Id: Iafbbfa7360fec3b5f3f4d591f65cbcd8c8215eec
diff --git a/common/ponresourcemanager/ponresourcemanager.go b/common/ponresourcemanager/ponresourcemanager.go
index c37307b..2873dbc 100755
--- a/common/ponresourcemanager/ponresourcemanager.go
+++ b/common/ponresourcemanager/ponresourcemanager.go
@@ -133,6 +133,7 @@
SharedResourceMgrs map[string]*PONResourceManager
SharedIdxByType map[string]string
IntfIDs []uint32 // list of pon interface IDs
+ Globalorlocal string
}
func newKVClient(storeType string, address string, timeout int) (kvstore.Client, error) {
@@ -254,10 +255,14 @@
log.Debugf("update ranges for %s, %d", StartIDx, StartID)
if StartID != 0 {
- PONRMgr.PonResourceRanges[StartIDx] = StartID
+ if (PONRMgr.PonResourceRanges[StartIDx] == nil) || (PONRMgr.PonResourceRanges[StartIDx].(uint32) < StartID) {
+ PONRMgr.PonResourceRanges[StartIDx] = StartID
+ }
}
if EndID != 0 {
- PONRMgr.PonResourceRanges[EndIDx] = EndID
+ if (PONRMgr.PonResourceRanges[EndIDx] == nil) || (PONRMgr.PonResourceRanges[EndIDx].(uint32) > EndID) {
+ PONRMgr.PonResourceRanges[EndIDx] = EndID
+ }
}
//if SharedPoolID != 0 {
PONRMgr.PonResourceRanges[SharedIDx] = SharedPoolID
@@ -567,6 +572,7 @@
if SharedResourceMgr != nil && PONRMgr != SharedResourceMgr {
return SharedResourceMgr.GetResourceID(IntfID, ResourceType, NumIDs)
}
+ log.Debugf("Fetching resource from %s rsrc mgr for resource %s", PONRMgr.Globalorlocal, ResourceType)
Path := PONRMgr.GetPath(IntfID, ResourceType)
if Path == "" {
diff --git a/common/techprofile/tech_profile.go b/common/techprofile/tech_profile.go
index 00cfdc1..2879e99 100644
--- a/common/techprofile/tech_profile.go
+++ b/common/techprofile/tech_profile.go
@@ -382,6 +382,7 @@
log.Errorw("Error getting alloc id from rsrcrMgr", log.Fields{"intfId": intfId, "numTconts": numOfTconts})
return nil
}
+ log.Debugw("Num GEM ports in TP:", log.Fields{"NumGemPorts": tp.NumGemPorts})
if gemPorts, err = t.resourceMgr.GetResourceID(intfId, t.resourceMgr.GetResourceTypeGemPortID(), tp.NumGemPorts); err != nil {
log.Errorw("Error getting gemport ids from rsrcrMgr", log.Fields{"intfId": intfId, "numGemports": tp.NumGemPorts})
return nil
@@ -593,7 +594,6 @@
}
}
tconts := []*openolt_pb.Tcont{}
- // TODO: Fix me , UPSTREAM direction is not proper
// upstream scheduler
tcont_us := &openolt_pb.Tcont{
Direction: usSched.Direction,