VOL-1650 Change MAX_ONUS_PER_PON to 128 for golang openolt adapter
Change-Id: Ib6aa63ce5c186f5da69c98c422770a23bf6212cd
diff --git a/adaptercore/olt_platform.go b/adaptercore/olt_platform.go
index 7f457dc..157f331 100644
--- a/adaptercore/olt_platform.go
+++ b/adaptercore/olt_platform.go
@@ -19,6 +19,7 @@
import (
"errors"
+ "github.com/opencord/voltha-go/common/log"
"github.com/opencord/voltha-go/rw_core/utils"
ofp "github.com/opencord/voltha-protos/go/openflow_13"
"github.com/opencord/voltha-protos/go/voltha"
@@ -81,7 +82,7 @@
*/
//MaxOnusPerPon value
-var MaxOnusPerPon = 32
+var MaxOnusPerPon = 128
//MinUpstreamPortID value
var MinUpstreamPortID = 0xfffd
@@ -93,7 +94,10 @@
//MkUniPortNum returns new UNIportNum based on intfID, inuID and uniID
func MkUniPortNum(intfID, onuID, uniID uint32) uint32 {
- /* TODO: Add checks */
+ var limit = int(onuID)
+ if limit > MaxOnusPerPon {
+ log.Warn("Warning: exceeded the MAX ONUS per PON")
+ }
return (intfID << 11) | (onuID << 4) | uniID
}