Merge "[Bugfix][bug-view-1152] Fix the problem of high CPU load on nv instruction"
diff --git a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/at_nvrw_0x00001000.bin b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/at_nvrw_0x00001000.bin
index ae20019..77e1fdd2 100755
--- a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/at_nvrw_0x00001000.bin
+++ b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/at_nvrw_0x00001000.bin
Binary files differ
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
index d22a736..31a02a7 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
@@ -24,6 +24,7 @@
#define LOG_UCI_FILE "lynq_uci"
+#define LOG_UCI_RO_FILE "lynq_uci_ro"
#define LOG_UCI_MODULE "debug_mode"
using ::android::Parcel;
@@ -38,6 +39,8 @@
}lynq_client_t;
int num = 0;
+int nf_conntrack_max = 0;
+int conntrack_flag = 0;
int max_num;
static int get_md_sta(void)
@@ -124,6 +127,37 @@
return 0;
}
+
+static int t106_get_current_conntrack()
+{
+ FILE *fp = fopen("/proc/sys/net/netfilter/nf_conntrack_count", "r");
+ int count = -1;
+
+ if(fp)
+ {
+ fscanf(fp, "%d", &count);
+ ALOGD("nf_conntrack_count is %d",count);
+ fclose(fp);
+ }
+
+ return count;
+}
+
+int get_conntrack_count(void)
+{
+ int current_num = 0;
+
+ current_num = t106_get_current_conntrack();
+ if(current_num == nf_conntrack_max)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
/**
* @brief 30s request imei
*
@@ -286,8 +320,30 @@
/*judge the res_error*/
if(!res_error)
{
- lynq_set_section("sdk_ready", "0");
- RLOGE("sdk_ready = 0\n");
+ if(conntrack_flag)
+ {
+ ret = get_conntrack_count();
+ if(ret == 1)
+ {
+ ALOGD("print nf_conntrack in var/log");
+ system("date > /var/log/conntrack.txt");
+ system("cat /proc/net/nf_conntrack >> /var/log/conntrack.txt");
+ lynq_set_section("sdk_ready", "5");
+ }
+
+ else if(ret == 0)
+ {
+ lynq_set_section("sdk_ready", "0");
+ RLOGE("sdk_ready = 0\n");
+ }
+
+ }
+
+ else
+ {
+ lynq_set_section("sdk_ready", "0");
+ RLOGE("sdk_ready = 0\n");
+ }
}
else
{
@@ -623,15 +679,40 @@
+int t106_get_conntrack_max(void)
+{
+ //only when progress startup to get nf_conntrack_max
+ FILE *fp = fopen("/proc/sys/net/netfilter/nf_conntrack_max", "r");
+
+ if(fp)
+ {
+ fscanf(fp, "%d", &nf_conntrack_max);
+ ALOGD("nf_conntrack_max = %d",nf_conntrack_max);
+ fclose(fp);
+ return 0;
+ }
+
+ else
+ {
+ return -1;
+ }
+
+}
+
+
+
+
+
void start_timer_request(void)
{
- pthread_t thid,thid_1,thid_2;
+ pthread_t thid,thid_1,thid_2,thid_3;
pthread_attr_t a;
pthread_attr_init(&a);
pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED);
char tmp[20];
int debug_mode;
+ int conntrack_mode = 0;
int ret;
ALOGD("start lynq-sdk-ready\n");
@@ -649,6 +730,25 @@
}
pthread_detach(thid_2);
*/
+
+ //read uci
+ ret = lynq_get_value(LOG_UCI_RO_FILE, LOG_UCI_MODULE, "conntrack_mode", tmp);
+ ALOGD("ret = %d, tmp is %s\n",ret,tmp);
+ conntrack_mode = atoi(tmp);
+
+ if(conntrack_mode == 1)
+ {
+ if(t106_get_conntrack_max() < 0)
+ {
+ ALOGD("can not get conntrack_max");
+ }
+ else
+ {
+ conntrack_flag = 1;
+ }
+ }
+
+
ret = pthread_create(&thid, &a, timer_request_imei, NULL);
if(ret != 0){
ALOGD("pthread_create error!!!");
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
index eab15dc..59167c7 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
@@ -1637,7 +1637,7 @@
return -1;
}
//get_response(lynq_client_sockfd,p);
- error = wait_response(lynq_client_sockfd,p,client.uToken,g_wait_time);
+ error = wait_response(lynq_client_sockfd,p,client.uToken,5);
if(error!=0)
{
LYERRLOG("wait_response fail,ret:%d",error);
@@ -1801,7 +1801,7 @@
}
//get_response(lynq_client_sockfd,p);
- error = wait_response(lynq_client_sockfd,p,client.uToken,50);
+ error = wait_response(lynq_client_sockfd,p,client.uToken,5);
if(error!=0)
{
LYERRLOG("wait_response fail,ret:%d",error);
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci_ro.config b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci_ro.config
index 305e4e4..32f563e 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci_ro.config
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci_ro.config
@@ -1,3 +1,5 @@
config lynq_version_ro 'lynq_version'
option LYNQ_SW_VERSION 'T106CN-ZS03.V2.01.01.02P52U02.AP.09.05_CAP.09.05'
option LYNQ_SW_INSIDE_VERSION 'T106CN-ZS03.V2.01.01.02P52U02.AP.09.05_CAP.09.05'
+config debug_mode 'debug_mode'
+ option conntrack_mode '1'
\ No newline at end of file
diff --git a/customer_config/nv/platform/platform_nv.xml b/customer_config/nv/platform/platform_nv.xml
index 7004de2..57cf7c6 100755
--- a/customer_config/nv/platform/platform_nv.xml
+++ b/customer_config/nv/platform/platform_nv.xml
@@ -479,7 +479,7 @@
<param key="T_CommAtSetting.manual_search" val="0" signed="0" />
<param key="T_CommAtSetting.lteInfo_strongscan" val="0" signed="0" />
<param key="T_CommAtSetting.lteInfo_CSFB" val="0" signed="0" />
- <param key="T_CommAtSetting.exceptReset" val="0" signed="0" />
+ <param key="T_CommAtSetting.exceptReset" val="2" signed="0" />
<param key="T_CommAtSetting.UsatFlag" val="1" signed="0" />
<param key="T_CommAtSetting.PppEchoFlag" val="1" signed="0" />
<param key="T_CommAtSetting.IsUseImsiFlag" val="0" signed="0" />
@@ -902,6 +902,18 @@
<param key="T_zDev_NV_PsData_Pri.tUeCapa.atEuraBandInfo[65].dwFUlLow" val="17100" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUeCapa.atEuraBandInfo[65].dwNOffUl" val="131972" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallCapa.bEcallMode" val="2" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.bTestNumLen" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[0]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[1]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[2]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[3]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[4]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[5]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[6]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[7]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[8]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.abTestNum[9]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tEcallNum.bTestNumType" val="0" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUeCapa.bSuppHoToEutraTdd" val="1" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUeCapa.bSuppHoToEutraFdd" val="1" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUeCapa.abLtePriorityFreq[0]" val="0" signed="0" />
@@ -2093,6 +2105,42 @@
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tMccCustomBand.atLteMccCustomBand[2].abLteBand[8]" val="0" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tMccCustomBand.atLteMccCustomBand[3].abLteBand[8]" val="0" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.bCallNum" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].bNumLen" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[0]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[1]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[2]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[3]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[4]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[5]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[6]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[7]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[8]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[9]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[0].abCallNum[10]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].bNumLen" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[0]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[1]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[2]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[3]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[4]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[5]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[6]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[7]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[8]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[9]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[1].abCallNum[10]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].bNumLen" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[0]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[1]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[2]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[3]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[4]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[5]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[6]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[7]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[8]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[9]" val="0" signed="0" />
+ <param key="T_zDev_NV_PsData_Pri.tUserInfo.tBeepCall.atCallGroup[2].abCallNum[10]" val="0" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tSmsMemInfo[0].bMem1" val="3" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tSmsMemInfo[0].bMem2" val="3" signed="0" />
<param key="T_zDev_NV_PsData_Pri.tUserInfo.tSmsMemInfo[0].bMem3" val="3" signed="0" />