VOL-3419: Replicate voltha flows in openolt agent
- Use the flow_id, symmetric_flow_id, replication_flag and pbit_to_gemport_map
  coming in Flow proto messge to replicate the flow as needed
- Use the CreateQueues and RemoveQueues messages to setup and remove gem_ports
- Use latest gRPC version 1.31.1 which allows fine tuning of gRPC threadpools
  which allows for greating performance.
- Performance numbers when tested with openolt-scale-tester has been better with
  using latest gRPC and threadpool tuning when compared to earlier. It is to be
  noted that the performance is better even with openolt-agent replicating the flow
  now.
- Scale tests with 512 subscribers have been successfull with BAL3.4.7.5 version
- Use openolt proto version 4.0.0
- Use openolt-test (for unit test) image version 2.0.1 (which bundles latest gRPC version 1.31.1)
- These changes are NOT backward compatible and openolt-agent will have a major
  version bump to 3.0.0

Change-Id: I715c804bdf342e60d08cab6c59e1c21b8c5ac1f4
diff --git a/agent/common/core.h b/agent/common/core.h
index d301a01..c9c7bf1 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -171,6 +171,9 @@
 #define NUMBER_OF_DEFAULT_INTERFACE_QUEUES 4 // <= NUM_OF_PRIORITIES
 #define FILL_ARRAY(ARRAY,START,END,VALUE) for(int i=START;i<END;ARRAY[i++]=VALUE);
 #define COUNT_OF(array) (sizeof(array) / sizeof(array[0]))
+#define NUMBER_OF_PBITS 8
+#define NUMBER_OF_REPLICATED_FLOWS NUMBER_OF_PBITS
+#define GRPC_THREAD_POOL_SIZE 150
 
 #define GET_FLOW_INTERFACE_TYPE(type) \
        (type == BCMOLT_FLOW_INTERFACE_TYPE_PON) ? "PON" : \
@@ -216,12 +219,14 @@
 Status ProbeDeviceCapabilities_();
 Status ProbePonIfTechnology_();
 Status UplinkPacketOut_(uint32_t intf_id, const std::string pkt);
+Status FlowAddWrapper_(const openolt::Flow* request);
 Status FlowAdd_(int32_t access_intf_id, int32_t onu_id, int32_t uni_id, uint32_t port_no,
                 uint32_t flow_id, const std::string flow_type,
                 int32_t alloc_id, int32_t network_intf_id,
                 int32_t gemport_id, const ::openolt::Classifier& classifier,
                 const ::openolt::Action& action, int32_t priority_value,
                 uint64_t cookie, int32_t group_id, uint32_t tech_profile_id);
+Status FlowRemoveWrapper_(const openolt::Flow* request);
 Status FlowRemove_(uint32_t flow_id, const std::string flow_type);
 Status Disable_();
 Status Reenable_();