VOL-1023 - Supporting multiple UNI per ONU

To support multiple UNIs on a given ONU, OpenOLT Driver is updated to support
an abstract opaque cookie that is registered with all controller-bound trap
flows. This cookie is supplied back to adapter during all packet indications.
OpenOLT adapter will use this cookie to track the OF logical port that should
be used to reflect the origin of packet to OF controller.

For outbound packets from controller, the system needs to inject frames
directly onto a GEM port rather than towards "any GEM" associated with the ONU.
This is necessary to send to various UNIs on one ONU. This is achieved by
registering the OF logical port number with the flow and gemport(s) associated
with the port. The OF Out packet will include the logical port number and
hence can be tracked back to a registered GEM for that UNI.

Change-Id: I1085a4b44d12b9402a431c41083e3a5cdb4764b9
diff --git a/protos/openolt.proto b/protos/openolt.proto
index 8c35bba..e6bb0b5 100644
--- a/protos/openolt.proto
+++ b/protos/openolt.proto
@@ -217,6 +217,8 @@
     fixed32 intf_id = 1;
     fixed32 gemport_id = 2;
     fixed32 flow_id = 3;
+    fixed32 port_no = 6;
+    fixed64 cookie = 7;
     bytes pkt = 4;
 }
 
@@ -244,6 +246,7 @@
 message OnuPacket {
     fixed32 intf_id = 1;
     fixed32 onu_id = 2;
+    fixed64 port_no = 4;
     bytes pkt = 3;
 }
 
@@ -257,6 +260,8 @@
     string model = 2;
     string hardware_version = 3;
     string firmware_version = 4;
+    string device_id = 16;
+    string device_serial_number = 17;
 
     // Total number of pon intf ports on the device
     fixed32 pon_ports = 12;
@@ -342,6 +347,7 @@
 message Flow {
     sfixed32 access_intf_id = 1;
     sfixed32 onu_id = 2;
+    sfixed32 uni_id = 11;
     fixed32 flow_id = 3;
     string flow_type = 4;	// upstream, downstream, broadcast, multicast
     sfixed32 alloc_id = 10;
@@ -350,6 +356,8 @@
     Classifier classifier = 7;
     Action action = 8;
     sfixed32 priority = 9;
+    fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
+    fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
 }
 
 message SerialNumber {
@@ -515,6 +523,8 @@
 message Tconts {
     fixed32 intf_id = 1;
     fixed32 onu_id = 2;
+    fixed32 uni_id = 4;
+    fixed32 port_no = 5;
     repeated Tcont tconts = 3;
 }