VOL-1100 Flow priority, fix EAP after OLT reboot

Change-Id: I74878313e11aa26bf4e3909aa13f55116acfe797
diff --git a/protos/openolt.proto b/protos/openolt.proto
index 0cb6192..e13cc83 100644
--- a/protos/openolt.proto
+++ b/protos/openolt.proto
@@ -223,6 +223,7 @@
     fixed32 gemport_id = 6;
     Classifier classifier = 7;
     Action action = 8;
+    fixed32 priority = 9;
 }
 
 message SerialNumber {
diff --git a/src/core.cc b/src/core.cc
index e5f4949..6a605e4 100644
--- a/src/core.cc
+++ b/src/core.cc
@@ -241,7 +241,7 @@
 Status FlowAdd_(uint32_t onu_id,
                 uint32_t flow_id, const std::string flow_type,
                 uint32_t access_intf_id, uint32_t network_intf_id,
-                uint32_t gemport_id,
+                uint32_t gemport_id, uint32_t priority_value,
                 const ::openolt::Classifier& classifier,
                 const ::openolt::Action& action) {
     bcmos_errno err;
@@ -274,6 +274,8 @@
     BCMBAL_CFG_PROP_SET(&cfg, flow, network_int_id, network_intf_id);
     BCMBAL_CFG_PROP_SET(&cfg, flow, sub_term_id, onu_id);
     BCMBAL_CFG_PROP_SET(&cfg, flow, svc_port_id, gemport_id);
+    BCMBAL_CFG_PROP_SET(&cfg, flow, priority, priority_value);
+
 
     {
         bcmbal_classifier val = { };
diff --git a/src/core.h b/src/core.h
index 38e02ba..eae6e79 100644
--- a/src/core.h
+++ b/src/core.h
@@ -33,7 +33,7 @@
 Status FlowAdd_(uint32_t onu_id,
                 uint32_t flow_id, const std::string flow_type,
                 uint32_t access_intf_id, uint32_t network_intf_id,
-                uint32_t gemport_id,
+                uint32_t gemport_id, uint32_t priority,
                 const ::openolt::Classifier& classifier,
                 const ::openolt::Action& action);
 
diff --git a/src/server.cc b/src/server.cc
index 606e9cb..6b1609c 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -96,6 +96,7 @@
             request->access_intf_id(),
             request->network_intf_id(),
             request->gemport_id(),
+            request->priority(),
             request->classifier(),
             request->action());
     }