diff options
| author | lijie <[email protected]> | 2018-12-10 17:04:28 +0800 |
|---|---|---|
| committer | lijie <[email protected]> | 2018-12-10 17:04:28 +0800 |
| commit | a23c5d796f9406940dd1b11988139defb43e90ba (patch) | |
| tree | 0dd6111166a68a4f9a0a7d8f6b0db11027e90e8c | |
| parent | cac5c951f20640fa89e23adb55dec8d5ac66a5cc (diff) | |
删除printf的相关代代码v1.0.1
| -rw-r--r-- | src/mrl_main.c | 6 | ||||
| -rw-r--r-- | src/mrl_redis.c | 13 | ||||
| -rw-r--r-- | src/mrl_stat.c | 1 | ||||
| -rw-r--r-- | src/mrl_utils.c | 1 |
4 files changed, 0 insertions, 21 deletions
diff --git a/src/mrl_main.c b/src/mrl_main.c index 8b67066..2a2bcaf 100644 --- a/src/mrl_main.c +++ b/src/mrl_main.c @@ -51,7 +51,6 @@ void mrl_cfg_init(const char *profile) char mrl_netcard[MRL_STR_NETCARD_LEN];
memset(mrl_netcard,0,MRL_STR_NETCARD_LEN);
MESA_load_profile_string_def(profile, "SOCK_INFO", "mrl_netcard", mrl_netcard, MRL_STR_NETCARD_LEN, "eth0");
- printf("mrl netcard is %s\n",mrl_netcard);
uint32_t temp_mrl_ip = mrl_get_ip_by_eth_name(mrl_netcard);
if(temp_mrl_ip < 0)
{
@@ -59,7 +58,6 @@ void mrl_cfg_init(const char *profile) assert(0);
}
inet_ntop(AF_INET,(void *)&temp_mrl_ip, mrl_instance.mrl_cfg.mrl_ip,MRL_STR_IP_LEN);
- printf("mrl ip is %s\n",mrl_instance.mrl_cfg.mrl_ip);
MESA_load_profile_int_def(profile, "SOCK_INFO", "mrl_port",&(temp_port),8888);
assert(temp_port > 0 && temp_port <= 65535);
mrl_instance.mrl_cfg.mrl_port = temp_port;
@@ -161,13 +159,11 @@ void mrl_cfg_init(const char *profile) for(j = 0; j < mrl_instance.mrl_cfg.vxlan_link_id_num; j++)
{
mrl_instance.mrl_cfg.vxlan_link_id[i][j] = atoi(_link_id_str[j]);
- printf("%d gdev %d link id is %d\n",i,j,mrl_instance.mrl_cfg.vxlan_link_id[i][j]);
}
}
int inner_mac_len = mrl_instance.mrl_cfg.vxlan_gdev_num*mrl_instance.mrl_cfg.vxlan_link_id_num*MRL_STR_MAC_LEN;
- printf("inner mac len is %d\n",inner_mac_len);
temp_inner_mac_str = (char *)calloc(inner_mac_len,sizeof(char));
global_stat.malloc_memory += inner_mac_len;
@@ -208,7 +204,6 @@ void mrl_cfg_init(const char *profile) for(j = 0; j < mrl_instance.mrl_cfg.vxlan_link_id_num; j++)
{
memcpy(mrl_instance.mrl_cfg.vxlan_inner_smac[i][j], _inner_mac_str[j],strlen(_inner_mac_str[j]));
- printf("the smac of %d gdev %d link id is %s\n",i,j,mrl_instance.mrl_cfg.vxlan_inner_smac[i][j]);
}
}
@@ -235,7 +230,6 @@ void mrl_cfg_init(const char *profile) for(j = 0; j < mrl_instance.mrl_cfg.vxlan_link_id_num; j++)
{
memcpy(mrl_instance.mrl_cfg.vxlan_inner_dmac[i][j], _inner_mac_str[j],strlen(_inner_mac_str[j]));
- printf("the dmac of %d gdev %d link id is %s\n",i,j,mrl_instance.mrl_cfg.vxlan_inner_dmac[i][j]);
}
}
diff --git a/src/mrl_redis.c b/src/mrl_redis.c index 0d59c51..3d83b17 100644 --- a/src/mrl_redis.c +++ b/src/mrl_redis.c @@ -172,16 +172,6 @@ void nominee_update_cb(int table_id,const char *table_line,void *u_para) {
MESA_handle_runtime_log(mrl_instance.mrl_log_handle, RLOG_LV_DEBUG,"nominee_update_cb","the nominee key[sip:%s, dip:%s, sport:%hu, dport:%hu] is duplicated in nominee htable.",nominee_key.sip,nominee_key.dip,nominee_key.sport,nominee_key.dport);
}
- /*
- inet_pton(AF_INET,nominee_key.sip,&queue_ip);
- printf("insert ip %s into lqueue\n",nominee_key.sip);
- ret = MESA_lqueue_join_tail(mrl_instance.mrl_queue,&(queue_ip),sizeof(queue_ip));
- MESA_handle_runtime_log(mrl_instance.mrl_log_handle, RLOG_LV_DEBUG,"nominee_update_cb","insert queue ip is %s",nominee_key.sip);
- if(ret != 0)
- {
- MESA_handle_runtime_log(mrl_instance.mrl_log_handle, RLOG_LV_FATAL,"nominee_update_cb","the ip insert into lqueue fail!ret is %d",nominee_key.sip,ret);
- assert(0);
- }*/
break;
default:
assert(0);
@@ -206,7 +196,6 @@ Maat_feather_t mrl_Maat_feather_init() wrapped_Maat_set_feather_opt(feather, MAAT_OPT_STAT_FILE_PATH, mrl_instance.mrl_cfg.Maat_stat_path, strlen(mrl_instance.mrl_cfg.Maat_stat_path)+1);
wrapped_Maat_set_feather_opt(feather, MAAT_OPT_STAT_ON, NULL, 0);
wrapped_Maat_set_feather_opt(feather, MAAT_OPT_PERF_ON, NULL, 0);
- printf("redis index is %d\n",mrl_instance.mrl_cfg.redis_index);
wrapped_Maat_set_feather_opt(feather, MAAT_OPT_REDIS_INDEX,&(mrl_instance.mrl_cfg.redis_index), sizeof(mrl_instance.mrl_cfg.redis_index));
int ret = Maat_initiate_feather(feather);
if(ret< 0)
@@ -285,7 +274,6 @@ void mrl_get_vxlan_info(struct streaminfo *mystream, struct mrl_vxlan_info *vxl get_rawpkt_opt_from_streaminfo(mystream, RAW_PKT_GET_VXLAN_ID, &link_id);
vxlan_info->vxlan_link_id = ntohl(link_id);
- printf("cur link id is %d\n",vxlan_info->vxlan_link_id);
int position = mrl_get_link_id_index(gdev_index, vxlan_info->vxlan_link_id);
if(position <0)
{
@@ -297,7 +285,6 @@ void mrl_get_vxlan_info(struct streaminfo *mystream, struct mrl_vxlan_info *vxl mrl_inet_ntoa(mystream->addr.tuple4_v4->daddr,debug_dip);
debug_sport = ntohs(mystream->addr.tuple4_v4->source);
debug_dport = ntohs(mystream->addr.tuple4_v4->dest);
- printf("cur stream[sip:%s,sport:%hu,dip:%s,dport:%hu] link id is %d\n",debug_sip,debug_sport,debug_dip,debug_dport,vxlan_info->vxlan_link_id);
MESA_handle_runtime_log(mrl_instance.mrl_log_handle, RLOG_LV_FATAL,"mrl_get_vxlan_info","cur stream[sip:%u,sport:%hu,dip:%u,dport:%hu]"
"get link id error,link id is %d,gdev index is %d,position is %d",
debug_sip,debug_sport,debug_dip,debug_dport,
diff --git a/src/mrl_stat.c b/src/mrl_stat.c index a2ead74..16c5658 100644 --- a/src/mrl_stat.c +++ b/src/mrl_stat.c @@ -70,7 +70,6 @@ void mrl_stat_output() void *mrl_stat_action(void *arg)
{
- printf("start stat thread\n");
for(;;)
{
mrl_stat_output();
diff --git a/src/mrl_utils.c b/src/mrl_utils.c index 6356a00..df01b0b 100644 --- a/src/mrl_utils.c +++ b/src/mrl_utils.c @@ -210,7 +210,6 @@ unsigned short mrl_get_checksum(unsigned short * buffer, size_t len) void mrl_mmdb_init(const char *path)
{
- printf("mrl mmdb init\n");
int status =MMDB_open(path,MMDB_MODE_MMAP,&(mrl_instance.mrl_mmdb));
if(status != MMDB_SUCCESS)
{
|
