diff options
Diffstat (limited to 'src/platform_cfg.cpp')
-rwxr-xr-x | src/platform_cfg.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/platform_cfg.cpp b/src/platform_cfg.cpp index f0911611..ca42aa31 100755 --- a/src/platform_cfg.cpp +++ b/src/platform_cfg.cpp @@ -35,8 +35,8 @@ void CPlatformMemoryYamlInfo::reset(){ m_mbuf[MBUF_64] = m_mbuf[MBUF_64]*2; m_mbuf[MBUF_2048] = CONST_NB_MBUF_2_10G/2; - m_mbuf[TRAFFIC_MBUF_64] = m_mbuf[MBUF_64]*2; - m_mbuf[TRAFFIC_MBUF_2048] = CONST_NB_MBUF_2_10G*4; + m_mbuf[TRAFFIC_MBUF_64] = m_mbuf[MBUF_64] * 4; + m_mbuf[TRAFFIC_MBUF_2048] = CONST_NB_MBUF_2_10G * 8; m_mbuf[MBUF_DP_FLOWS] = (1024*1024/2); m_mbuf[MBUF_GLOBAL_FLOWS] =(10*1024/2); @@ -127,7 +127,7 @@ void CPlatformMemoryYamlInfo::Dump(FILE *fd){ int i=0; for (i=0; i<MBUF_SIZE; i++) { - fprintf(fd," %-40s : %lu \n",names[i].c_str(),m_mbuf[i]); + fprintf(fd," %-40s : %lu \n",names[i].c_str(), (ulong)m_mbuf[i]); } } @@ -300,6 +300,10 @@ void operator >> (const YAML::Node& node, CPlatformYamlInfo & plat_info) { plat_info.m_telnet_exist=true; } + if ( node.FindValue("zmq_rpc_port") ){ + node["zmq_rpc_port"] >> plat_info.m_zmq_rpc_port; + } + if ( node.FindValue("port_bandwidth_gb") ){ node["port_bandwidth_gb"] >> plat_info.m_port_bandwidth_gb; } @@ -375,7 +379,7 @@ void CPlatformYamlInfo::Dump(FILE *fd){ }else{ fprintf(fd," port limit : not configured \n"); } - fprintf(fd," port_bandwidth_gb : %lu \n",m_port_bandwidth_gb); + fprintf(fd," port_bandwidth_gb : %lu \n", (ulong)m_port_bandwidth_gb); if ( m_if_mask_exist && m_if_mask.size() ) { fprintf(fd," if_mask : "); @@ -383,7 +387,7 @@ void CPlatformYamlInfo::Dump(FILE *fd){ for (i=0; i<(int)m_if_mask.size(); i++) { fprintf(fd," %s,",m_if_mask[i].c_str()); } - fprintf(fd,"\n",m_if_mask[i].c_str()); + fprintf(fd,"\n"); }else{ fprintf(fd," if_mask : None \n"); @@ -410,7 +414,9 @@ void CPlatformYamlInfo::Dump(FILE *fd){ } if ( m_telnet_exist ){ fprintf(fd," telnet_port : %d \n",m_telnet_port); + } + fprintf(fd," m_zmq_rpc_port : %d \n",m_zmq_rpc_port); if ( m_mac_info_exist ){ int i; |