UNI port is derived from tunnelID and some bug fixes
Flow-manager now uses tunnel id to derive uniport needed for futher flow processing
Able to verify EAPOL/HSIA flows end to end with physical hardware ( Edgecore BAL OLT  & TWSH ONT kit) with  below work-around :

EAPOL flow from logical device , results in installing device flows in ONU device (due to default leaf device flows in core - leafDeviceDefaultRules),
This flow over-rides previously installed default 4091 private rule installed from techprofile download event , Hence removed default leaf flows in rw_core to overcome this problem.

Change-Id: Icdb96674545e1c58ea3f020f989a3c9dd06214bc
diff --git a/adaptercore/olt_platform.go b/adaptercore/olt_platform.go
index 60b9bb8..131234a 100644
--- a/adaptercore/olt_platform.go
+++ b/adaptercore/olt_platform.go
@@ -79,6 +79,8 @@
 var MIN_UPSTREAM_PORT_ID = 0xfffd
 var MAX_UPSTREAM_PORT_ID = 0xfffffffd
 
+var controllerPorts []uint32 = []uint32{0xfffd, 0x7ffffffd, 0xfffffffd}
+
 func MkUniPortNum(intfId uint32, onuId uint32, uniId uint32) uint32 {
 	/* TODO: Add checks */
 	return ((intfId << 11) | (onuId << 4) | uniId)
@@ -145,11 +147,22 @@
 }
 
 func IsUpstream(outPort uint32) bool {
-	if (outPort >= uint32(MIN_UPSTREAM_PORT_ID)) && (outPort <= uint32(MAX_UPSTREAM_PORT_ID)) {
-		return true
+	for _, port := range controllerPorts {
+		if port == outPort {
+			return true
+		}
 	}
 	if (outPort & (1 << 16)) == (1 << 16) {
 		return true
 	}
 	return false
 }
+
+func IsControllerBoundFlow(outPort uint32) bool {
+	for _, port := range controllerPorts {
+		if port == outPort {
+			return true
+		}
+	}
+	return false
+}