解决could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM问题

部署运行你感兴趣的模型镜像

https://blog.youkuaiyun.com/weixin_39873397/article/details/81432061

试了很多办法

(1):

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
这个方法对我来说不管用,还是之前的错误;


(2):执行 sudo rm -rf ~/.nv /解决问题

在/home/yourname/目录下面执行命令!!
---------------------  
作者:weixin_39873397  
来源:优快云  
原文:https://blog.youkuaiyun.com/weixin_39873397/article/details/81432061  
版权声明:本文为博主原创文章,转载请附上博文链接!

您可能感兴趣的与本文相关的镜像

TensorFlow-v2.15

TensorFlow-v2.15

TensorFlow

TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型

好,下面是跟在后面的调试信息,帮我描述启动过程等等你能看出的信息。[2025-07-25 15:02:33] [ERROR] ds_handle_method_do():1608 - [DS]not support action get_rtsp_info [2025-07-25 15:02:33] [ERROR] ds_handle():2504 - [DS]Signal handle failed. plug -->DWC_ETH_QOS_setsettings <--DWC_ETH_QOS_setsettings [2025-07-25 15:02:38] [ERROR] system_if_del_gateway_changing MTU from 1500 to 1480 route():267 - [NIFC]Ioctl SIOCDELRT error, ret code is -1, dst =DWC_ETH_QOS_yinit: apb_clk 120000000 Hz 00000000, gateway = 0100a8c0, error info:No such process. Queue0 Tx fifo size 2048, Rx fifo size 2048 Disabled JUMBO pkt Enabled Rx watchdog timer Enabled TSO Disabled Rx Split header mode [2025-07-25 15:02:38] link_status_update():410 - [Information][Network][NIFC]Link status: LINK_DOWN -> LINK_DOWN [2025-07-25 15:02:38] link_status_update():412 - [Information][Network][NIFC]IP: 192.168.0.60, mask: 255.255.255.0, gateway: 192.168.0.1, DNS: 8.8.8.8, 8.8.4.4 [2025-07-25 15:02:38] [ERROR] eap_start():889 - [EAP]g_ieee8021x_enable = 0 timer handle excute times 5, interval 1000 timer handle excute times 5, interval 1000 timer handle excute times 5, interval 1000 timer handle excute times 5, interval 1000 timer handle excute times 5117, interval 1 [2025-07-25 15:02:38] link_status_update():410 - [Information][Network][NIFC]Link status: LINK_DOWN -> LINK_UP [2025-07-25 15:02:38] link_status_update():412 - [Information][Network][NIFC]IP: 192.168.0.60, mask: 255.255.255.0, gateway: 192.168.0.1, DNS: 8.8.8.8, 8.8.4.4 timer handle excute times 3, interval 1 [2025-07-25 15:02:38] [ERROR] eap_reload():912 - [EAP]reload ... g_ether_status:0 phy_status.ether:1 [2025-07-25 15:02:38] [ERROR] ds_handle_method_do():1608 - [DS]not support action get_rtsp_info [2025-07-25 15:02:38] [ERROR] ds_handle():2504 - [DS]Signal handle failed. [2025-07-25 15:02:38] ip_conflict_detect_start():1000 - [Information][Network]Start IP conflict detecting [2025-07-25 15:02:38] [ERROR] ds_handle_method_do():1608 - [DS]not support action get_rtsp_info [2025-07-25 15:02:38] [ERROR] ds_handle():2504 - [DS]Signal handle failed. timer handle excute times 6, interval 1 [2025-07-25 15:02:38] [ERROR] load_user_defined_address():118 - [DIAGNOSE][LTE] add default dns address:8.8.8.8 [2025-07-25 15:02:38] [ERROR] load_user_defined_address():121 - [DIAGNOSE][LTE] add default dns address:www.google.com [2025-07-25 15:02:38] [ERROR] load_user_defined_address():143 - [DIAGNOSE]user defined addrees1:, user define address2:. [2025-07-25 15:02:38] [ERROR] telemetry_post_start():1844 - [telemetry]telemetry post start timer handle excute times 20, interval 1 timer handle excute times 3, interval 1 timer handle excute times 3, interval 1 timer handle excute times 296, interval 1 [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3026 - [AVTS]============stream(0): [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3027 - [AVTS]encode type: H265. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3028 - [AVTS]resolution: 2560*1440. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3029 - [AVTS]max resolution: 2560*1440. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3030 - [AVTS]bitrate type: 2. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3031 - [AVTS]bitrate: 2560. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3032 - [AVTS]quality: medium. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3033 - [AVTS]framerate: 1/25. [2025-07-25 15:02:38] [ERROR] video_stream_load_config():303vprc: enable direct func at in[0] 5 - [AVTS]smart_codec: 1. [2025-07-25 15:02:38] [ERROR]vprc: enable one-buf func at path 0, (3ndr_ref=1) (max_strp=1) video_stream_load_config():3036 - [AVTS]smart_codec_type: 1vcap: enable direct func at out[0] . [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3053 - [AVTS]============================== [2025-07-25 15:02:38] [ERROR] video_stream_load_config():3026 - [AVTS]============stream(1): [2025-07-25 15:02:38] [ERWRN:_isf_vdoprc_oport_do_new() vdoprc0.out[0]! Start single blk mode => blk_id=86001fc0 addr=86002000 ROR] video_stream_load_config():3027 - [AVTS]encode type: H264. [2025-07-25 15:02:38] [ERROR] video_stream_loadERR:nvtanr_setconfig() dB value=0 < 3. Set to 3. _config():3028 - [AVTS]resolution: 848*480. [2025-07-25 15:02:3ERR:nvtanr_setconfig() Bias sensitive value=0 < 1. Set to 1. 8] [ERROR] video_stream_load_config():3029 - [AVTS]m[acap] update cmd 0x2++ ax resolution: 848*576. [2025-07-25 15:02:38] [ERROR]acap] update cmd 0x2-- 0m video_stream_load_config():3030 - [AVTS]bitrate type: 0. [20[acap] update cmd 0x400++ 25-07-25 15:02:38] [ERROR] video_stream_load_config([acap] update cmd 0x400-- ):3031 - [AVTS]bitrate: 512. [2025-07-25 15:02:38] [ERR[acap] update cmd 0x4++ OR] video_stream_load_config():3032 - [AVTS]quality: medium.[acap] update start 1 [2025-07-25 15:02:38] [ERROR] video_stream_load_co[acap] update start 2 nfig():3033 - [AVTS]framerate: 1/25. [2025-07-25 15:02:38] acap] start 1 ;37m[ERROR] video_stream_load_config():3035 - [AVTS]smart_co[acap] start 2 dec: 0. [2025-07-25 15:02:38] [ERROR] video_stream_[acap] start 3 load_config():3036 - [AVTS]smart_codec_type: 0. [2025-07-25 15:[acap] start 4 02:38] [ERROR] video_stream_load_config():3053 - [AV[acap] start 5 TS]============================== [2025-07-25 15:02:38] E_CBMSG_PREVIEWSTABLE_20240320_tp ========== m[ERROR] __audio_stream_init():569 - [MPP]nvt_attr.sample_ra[acap] start 6 te_max:8000 [acap] start 7 [acap] start 15 [acap] start 16 [acap] start 18 [acap] start 20 [acap] start 22 [acap] lb 1 [acap] start 23 [acap] start 24 [acap] start 25 [acap] start 26 [acap] start 27 [acap] start 28 [acap] start 29 [acap] start 30 [acap] update start 3 [acap] update cmd 0x4-- ERR:nvtanr_setconfig() dB value=0 < 3. Set to 3. ERR:nvtanr_setconfig() Bias sensitive value=0 < 1. Set to 1. yanyu uiSetRCMode 2 timer handle excute times 795, interval 1 [2025-07-25 15:02:39] [ERROR] ds_register_op_log_info():720 - [DS]Section harddisk sub_type and func_name is set already. [2025-07-25 15:02:39] [ERROR] processing_linkage_capability():147 - [STM]linkage_capability capability length 30 [2025-07-25 15:02:39] [ERROR] processing_linkage_capability():147 - [STM]linkage_capability capability length 30 [2025-07-25 15:02:39] [ERROR] create_and_init_sem():140 - [STM]creating initial sem... [2025-07-25 15:02:39] [ERROR] init_stm_files_structure():144 - [STM]sizeof(struct stm_file) = 104 [2025-07-25 15:02:39] [ERROR] reload_record_adv_config():2572 - [STM]Set delay time to 10 seconds [2025-07-25 15:02:39] [ERROR] stm_open():2588 - [STM][0] stm_fd is allocated. channel = 0, type = video, flags = 0x1, mode = 0x1 [2025-07-25 15:02:39] [ERROR] data_sync_handle_thread():200 - [STM]register signal handler on thread:0x732e94c0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():905 - [STM]Free data_buf 0, size is 0x0 [202ERR:nvtanr_apply() NvtAnr is not opened 5-07-25 15:02:39] [ERROR] destroy_playback_buf():906 - [STM]Free data_buf 1, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():905 - [STM]Free data_buf 0, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():906 - [STM]Free data_buf 1, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():905 - [STM]Free data_buf 0, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():906 - [STM]Free data_buf 1, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():905 - [STM]Free data_buf 0, size is 0x0 [2025-07-25 15:02:39] [ERROR] destroy_playback_buf():906 - [STM]Free data_buf 1, size is 0x0 [2025-07-25 15:02:39] [ERROR] playback_init():5201 - [STM]playback init over. [2025-07-25 15:02:39] [ERROR] set_auto_delete_timer():713 - [STM]auto delete switch: off [2025-07-25 15:02:39] [ERROR] set_auto_delete_timer():714 - [STM]auto delete record before 7 days [2025-07-25 15:02:39] [ERROR] storage_start():594 - [STM]storage start over. timer handle excute times 15, interval 1 [2025-07-25 15:02:39] [ERROR] ds_convert_init():84 - [DS]ds convert init successed. ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened [2025-07-25 15:02:40] [ERROR] record_stop():4239 - [STM]record stopped ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened DWC_ETH_QOS_adjust_link: start tx/rx DWC_ETH_QOS f02b0000.eth eth0: Link is Up - 100Mbps/Full - flow control rx/tx ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened ERR:nvtanr_apply() NvtAnr is not opened timer handle excute times 3, interval 1000 timer handle excute times 3, interval 1000 [network_send()]:[248]: sendto error: Connection refused [dms_probe_cb()]:[645]: msg mid(1) mlen(196) send failed [network_send()]:[248]: sendto error: Connection refused [dms_sendto()]:[231]: msg mid(36) mlen(0) send failed [2025-07-25 15:02:42] [ERROR] eap_reload():912 - [EAP]reload ... g_ether_status:1 phy_status.ether:0 timer handle excute times 2, interval 1000 timer handle excute times 2, interval 1000 timer handle excute times 2, interval 1000 timer handle excute times 3, interval 1000 [2025-07-25 15:02:42] [ERROR] ds_handle_method_do():1608 - [DS]not support action get_rtsp_info [2025-07-25 15:02:42] [ERROR] ds_handle():2504 - [DS]Signal handle failed. timer handle excute times 3, interval 1000 timer handle excute times 3, interval 1000 timer handle excute times 2819, interval 1 [2025-07-25 15:02:42] [ERROR] rtsp_server_init():224ERR:nvtanr_apply() NvtAnr is not opened 9 - [RTSP]rtsps_support: 0 [2025-07-25 15:02:42] [ERROR] rtsp_server_init():2253 - [RTSP]RTSP Server Port 554 [2025-07-25 15:02:42] [ERROR] rtsp_server_init():2256 - [RTSP]g_tp_rtsp_digest_auth_type: 0 [2025-07-25 15:02:42] [ERROR] rtsp_server_init():2270 - [RTSP]Start RTSP Server on port 554 [2025-07-25 15:02:42] [ERROR] rtsp_server_init():2349 - [RTSP]RTSP Server Init ended [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:0, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:2, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:3, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:4, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:5, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:6, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:7, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:8, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:11, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:12, attach_ringbuffer_enable:0 [2025-07-25 15:02:ERR:nvtanr_apply() NvtAnr is not opened 42] [ERROR] trans_start():2697 - sd_type:14, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:15, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2697 - sd_type:16, attach_ringbuffer_enable:0 [2025-07-25 15:02:42] [ERROR] trans_start():2708 - Try to attach ringbuffer 21000 [2025-07-25 15:02:42] [ERROR] reload_multicast_config():886 - [RTSP][Media Source]: stream type 3 have no multicast config [2025-07-25 15:02:42] [ERROR] reload_multicast_config():886 - [RTSP][Media Source]: stream type 4 have no multicast config [2025-07-25 15:02:42] [ERROR] reload_multicast_config():886 - [RTSP][Media Source]: stream type 5 have no multicast config [2025-07-25 15:02:42] [ERROR] trans_start_loop():1677 - goto send_empty_smart_data [2025-07-25 15:02:42] [ERROR] inetd_register_rtsp_server():2127 - [RTSP]register rtsp server done. [2025-07-25 15:02:42] [ERROR] rtsp_server_start():3548 - [RTSP]trans_attach_to_stream stream_id 7 timer handle excute times 37, interval 1 [2025-07-25 15:02:42] [ERROR] add_rtp_package_info():637 - [RTSP]add package code_type 5 [2025-07-25 15:02:42] [ERROR] init_rtp_package():140 - [RTSP]av_codec = 5 [2025-07-25 15:02:42] [ERROR] init_rtp_packaERR:nvtanr_apply() NvtAnr is not opened ge():185 - [RTSP]jpeg_header width 80 height 45 [2025-07-25 15:02:42] [ERROR] add_rtp_package_info():637 - [RTSP]add package code_type 1 [2025-07-25 15:02:42] [ERROR] init_rtp_package():140 - [RTSP]av_codec = 1 [2025-07-25 15:02:42] [ERROR] RtpAdjustTime():327 - [RTSP]init rtp_base, pts=21285962, utc_ms=1753426962297 [2025-07-25 15:02:42] [ERROR] add_rtp_package_info():637 - [RTSP]add package code_type 0 [2025-07-25 15:02:42] [ERROR] init_rtp_package():140 - [RTSP]av_codec = 0 [2025-07-25 15:02:42] [ERROR] RtpAdjustTime():327 - [RTSP]init rtp_base, pts=21287618, utc_ms=1753426962298 [2025-07-25 15:02:42] [ERROR] add_rtp_package_info():637 - [RTSP]add package code_type 7 [2025-07-25 15:02:42] [ERROR] init_rtp_package():140 - [RTSP]av_codec = 7 [2025-07-25 15:02:42] [ERROR] RtpAdjustTime():327 - [RTSP]init rtp_base, pts=21172583, utc_ms=1753426962183 [2025-07-25 15:02:42] [ERROR] add_rtp_package_info():637 - [RTSP]add package code_type 7 [2025-07-25 15:02:42] [ERROR] init_rtp_package():140 - [RTSP]av_codec = 7 [2025-07-25 15:02:42] [ERROR] trans_register_stream_vtype():2298 - stream srcid = 7 [2025-07-25 15:02:42] [ERROR] RtpAdjustTime():327 - [RTSP]init rtp_base, pts=21172583, utc_ms=1753426962183 [2025-ERR:nvtanr_apply() NvtAnr is not opened 07-25 15:02:42] [ERROR] ds_register_action():824 - [DS]Action [video.force_iframe] has exist. [2025-07-25 15:02:42] link_status_update():410 - [Information][Network][NIFC]Link status: LINK_UP -> LINK_UP [2025-07-25 15:02:42] link_status_update():412 - [Information][Network][NIFC]IP: 192.168.0.60, mask: 255.255.255.0, gateway: 192.168.0.1, DNS: 8.8.8.8, 8.8.4.4 [2025-07-25 15:02:42] [ERROR] eap_reload():912 - [EAP]reload ... g_ether_status:0 phy_status.ether:1 [2025-07-25 15:02:42] [ERROR] ds_handle_method_do():1608 - [DS]not support action get_rtsp_info [2025-07-25 15:02:42] [ERROR] ds_handle():2504 - [DS]Signal handle failed. [2025-07-25 15:02:42] [ERROR] rtsp_reload():3850 - [RTSP]config changes rtsp_reload timer handle excute times 398, interval 1 timer handle excute times 2, interval 1 ERR:nvtanr_apply() NvtAnr is not opened open adc channel 0 error ! open adc channel 1 error ! open adc channel 2 error ! open adc channel 3 error ! open adc channel 0 error ! open adc channel 1 error ! open adc channel 2 error ! open adc channel 3 error ! [2025-07-25 15:02:42] [ERROR] image_3dnr_lv_reconfig():1237 - [CAMERA]image_3dnr_lv_reconfig called [2025-07-25 15:02:42] [ERROR] image_2dnr_lv_reconfig():1313 - [CAMERA]image_2dnr_lv_reconfig called [**************reload isp.cfg **************] [filepath=/tmp/base-files/cfg/day/day_isp.cfg] ERR:nvtanr_apply() NvtAnr is not opened ERR:vos_file_close() vfs_fsync fail, vos_file 0x8283B600 [2025-07-25 15:02:42] [ERROR] image_start():1454 - [IMAGE]Image start over. [2025-07-25 15:02:43] [ERROR] eap_reload():912 - [EAP]reload ... g_ether_status:1 phy_status.ether:0 timer handle excute times 338, interval 1 [2025-07-25 15:02:43] [ERROR] dn_switch_init():1120 - dn_switch,choose IR+WL algorithERR:vos_file_close() vfs_fsync fail, vos_file 0x8283BB00 m [dms_attach_event()]:[782]: callback for mid(28720) exists. [dms_attach_event()]:[782]: callback for mid(28735) exists. timer handle excute times 30, interval 1 timer handle excute times 2, interval 1 [2025-07-25 15:02:43] [ERROR] get_motion_rec_enhance_capability():97 - [RECORD_PLAN]ds_read /smart_analysis/detection fail. [2025-07-25 15:02:43] [ERROR] record_plan_start():385 - [RECORD_PLAN]get_motion_rec_enhance_capability error [2025-07-25 15:02:43] [ERROR] recERR:nvtanr_apply() NvtAnr is not opened ord_plan_start():388 - [RECORD_PLAN]start over, ret[0] [2025-07-25 15:02:43] [ERROR] record_plan_action_callback():1868 - [STM]record_plan new rec type:(motion) timer handle excute times 7, interval 1 [2025-07-25 15:02:43] [ERROR] msg_alarm_update_arming_status():1243 - [MSG_ALARM]alarm type 1, remain 32237s [2025-07-25 15:02:43] [ERROR] msg_alarm_update_arming_status():1285 - [MSG_ALARM]alarm type 0, remain 32237s [2025-07-25 15:02:43] [ERROR] msg_alarm_start():1514 - [MSG_ALARM]msg alarm start over. timer handle excute times 3, interval 1 [2025-07-25 15:02:43] [ERROR] hsr_alarm_start():2616 - [HSR]hsr_alarm start over. timer handle excute times 11, interval 1 [2025-07-25 15:02:43] [ERROR] md_alarm_start():4153 - [MD_ALARM]md alarm start over. timer handle excute times 6, interval 1 [2025-07-25 15:02:43] [ERROR] od_alarm_start():749 - [OD_ALARM]od alarm start over. timer handle excute times 2, interval 1 [2025-07-25 15:02:43] [ERROR] id_alarm_start():4112 - [ID]id_alarm start over. timer handle excute times 16, interval 1 [2025-07-25 15:02:43] [ERROR] cd_alarm_start():3109 - [CD]cd_alarm start over. timer handle excute times 10, interval 1 [2025-07-25 15:02:43] [ERROR] vd_alarm_start():2448 - [VD_ALARM]vd_alarm start over. timer handle excute times 4, interval 1 [2025-07-25 15:02:43] [ERROR] er_alarm_start():3323 - [ER]er_alarm start over. timer handle excute times 17, interval 1 [2025-07-25 15:02:43] [ERROR] lr_alarm_start():3328 - [LR]lr_alarm start over. timer handle excute times 4, interval 1 [2025-07-25 15:02:43] [ERROR] aod_alarm_start():2918 - [AOD]aod_alarm start over. timer handle excute times 20, interval 1 [2025-07-25 15:02:43] [ERROR] aad_alarm_start():1116 - [AAD]aad_alarm start over.ERR:vos_file_open() open [/mnt/app/isp/day_isp_dpc.bin] failed, ret -2 timer handle excute times 3, interval 1 [2025-07-25 15:02:43] [ERROR] hd_alarm_start():3029 - [HD]hd_alarm start over. timer handle excute times 8, interval 1 [2025-07-25 15:02:43] [ERROR] sc_alarm_start():975 - [SC]sc_alarm start over. timer handle excute times 4, interval 1 [2025-07-25 15:02:43] [ERROR] ams_start():557 - [AMS] ams version: 2.0.0.4348-b9f4532-dirty timer handle excute times 5, interval 1 [dms_detach_event()]:[850]: detach mERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs.bin] failed, ret -2 sg[20486] handler[0x3b0fdc] [dms_detach_event()]:[850]: detach msg[20487] handler[0x3b0e90] timer handle excute times 10, interval 1 [2025-07-25 15:02:43] [ERROR] p2p_start():34ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_0.bin] failed, ret -2 - [P2P]p2p module started. version: 2.0 p2p do punch start. timer handle excute times 2, interval 1 timer handle excute times 3, interval 1 error was 0 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_1.bin] failed, ret -2 over. [2025-07-25 15:02:43] aecns_init():924 - [Alarm][AMS] [TPAECNS] init ok! [2025-07-25 15:02:43] link_status_update():410 - [Information][Network][NIFC]Link status: LINK_UP -> LINK_UP [2025-07-25 15:02:43] [ERROR] dla_context_init_dev():1139 -ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_2.bin] failed, ret -2 [AMS] DLA read TP_MODE_SWITCH failed [2025-07-25 15:02:43] [ERROR] dla_load_alg_on_cfg_dev():2154 - [AMS] read PTD_DETECT failed, PET moduERR:vos_file_open() open [/mnt/app/isp/day_isp_lut2d.bin] failed, ret -2 le config file not found. [2025-07-25 15:02:43] link_status_update():412 - [Information][Network][NIFC]IP: 192.168.0.60, mask: 255.255.255.0, gateway: 192.168.0.1, DNS: 8.8.8.8, 8.8.4.4 [2025-07-25 15:02:43] [ERROR] eap_reload():912 - [EAP]reload ... g_ether_status:0 phy_status.ether:1 [2025-07-25 15:02:43] [ERROR] ds_handle_method_do():1608 - [DS]nERR:vos_file_close() vfs_fsync fail, vos_file 0x83939400 ot support action get_rtsp_info [2025-07-25 15:02:43] [ERROR] ds_handle():2504 - [DS]Signal handle failed. [2025-07-25 15:02:43] [ERROR] dla_ctx_init():138 - [2025-07-25 15:02:43] [ERROR] rtsp_reload():3850 - [RTSP]config changes rtsp_reload [2025-07-25 15:02:43] [ERROR] rtmp_reload():1213 - [RTMP]rtmp reload [2025-07-25 15:02:43] [ERROR] rtmp_reconnect():1182 - [RTMP]stop stream flag:0 pClient->lte_stop_flag:0 timer handle excute times 218, interval 1 [2025-07-25 15:02:43] [ERROR] ftp_record_plan_start():767 - [FTP_RECORD_PLAN]start over, ret[0] [2025-07-25 15:02:43] [ERROR] ftp_record_plan_action_callback():849 - [FTP]ftp_record_plan new rec type:(null) [2025-07-25 15:02:43] [ERROR] openapi_load():672 - [OPENAPI]/opeERR:vos_file_close() vfs_fsync fail, vos_file 0x82945C00 napi/server disable [2025-07-25 15:02:43] [ERROR] openapi_start():1067 - [OPENAPI]openapi disable [libdla] libdla version: 2.0.0.4348-b9f4532-dirty [2025-07-25 15:02:43] [ERROR] update_server_info():2281 - [SMTP]no need to send email timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 update_core_dump_config()-57 - [DEBUG_TOOLS]enable coredump [**************reload isp.cfg **************] [filepath=/tmp/base-files/cfg/day/day_isp.cfg] enable_core_dump()-42 - [DEBUG_TOOLS]new core dump file size: cur 4294967295, max 4294967295 Monitor: receive NVMP_NO_RESTART. (uptime:23) debug_tools_coredump_start()-100 - [DEBUG_TOOLS]USAGE:input "killall -10 main" to enable coredump timer handle excute times 172, interval 1 timer handle excute times 3, interval 1 timer handle excute times 2, interval 1 [2025-ERR:vos_file_close() vfs_fsync fail, vos_file 0x82945D00 07-25 15:02:43] [ERROR] mb_start():4958 - [MB]ringbuffer_attach error:type:0, rb_id:10201 [2025-07-25 15:02:43] [ERROR] mb_start():4958 - [MB]ringbuffer_attach error:type:1, rb_id:10202 [2025-07-25 15:02:43] [ERROR] mb_start():4958 - [MB]ringbuffer_attach error:type:2, rb_id:10200 [2025-07-25 15:02:43] [ERROR] mb_start():4958 - [MB]ringbuffer_attach error:type:3, rb_id:10206 [2025-07-25 15:02:43] [ERROR] mb_update_target_valid():1066 - [MB]mb_update_target_valid[0] [2025-07-25 15:02:43] [ERROR] mb_update_target_valid():1066 - [MB]mb_update_target_valid[0] [2025-07-25 15:02:43] [ERROR] mb_update_target_valid():1066 - [MB]mb_update_target_valid[0] ai - proc[0].trace = 00000000 [2025-07-25 15:02:43] [ERROR] mb_update_target_valid():1066 - [MB]mb_update_target_valid[0] [2025-07-25 15:02:43] [ERROR] qd_update_mb_enabled():3243 - [MB]dsusb 1-1: USB disconnect, device number 2 read /queue_detection/detection error [2025-07-25 15:02:43] [ERROR] mb_start():5025 - [MB]mb start over. timer harndis_host 1-1:1.0 usb0: unregister 'rndis_host' usb-ehci_hcd-1, RNDIS device ndle excute times 23, interval 1 [2025-07-25 15:02:43] [ERROR] dla_get_models():94 - [AMS] rotate type: 3, model list :0, 1, 2, 3 timer handle excute times 15, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 [2025-07-25 15:02:43] [ERROR] update_server_info():322 - [REPORT_EVENT]read report_server_list failed [2025-07-25 15:02:43] [ERROR] update_server_info():322 - [REPORT_EVENT]read report_server_list failed [2025-07-25 15:02:43] [ERROR] update_server_info():322 - [REPORT_EVoption1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 ENT]read report_server_list failed timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, inteoption 1-1:1.2: device disconnected rval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 3, interval 1 [2025-07-25 15:02:43] [ERROR] _getsize_model():141 - timer handle excute times 2, interval 1 [libdla] get bin(/etc/plugins/obj_detection_fd.bin) size fail [2025-07-25 15:02:43] [ERROR] _getsize_model():141 - [libdla] ption 1-1:1.3: device disconnected 1mget bin(/etc/plugins/obj_detection_fd_90.bin) size fail [2025-07-25 15:02:43] [ERROR] _getsize_model():141 - [libdla] get bin(/etc/plugins/obj_detection_fdERR:vos_file_open() open [/mnt/app/isp/day_isp_dpc.bin] failed, ret -2 _90.bin) size fail [2025-07-25 15:02:43] [ERROR] hw_network_load():304 - [libdla] ***********option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 ***** max_blk_size:2948576 ***************** timer handle eERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs.bin] failed, ret -2 xcute times 3, interval 1 option 1-1:1.4: device disconnected ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_0.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_1.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_2.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_lut2d.bin] failed, ret -2 ERR:vos_file_close() vfs_fsync fail, vos_file 0x83939400 nvtim_patch_usbhc enter error was 0 [2025-07-25 15:02:44]lte_start():12016 - [LTE]g_delta_total_flow:0 [2025-07-25 15:02:44] [ERROR] image_3dnr_lv_reconfig():1237 - [CAMERA]image_3dnr_lv_reconfig called [2025-07-25 15:02:44] [ERROR] image_2dnr_lv_reconfig():1313 - [CAMERA]image_2dnr_lv_reconfig called timer handle excute times 1009, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 5, interval 1 timer handle excute times 2, interval 1 timer handle excute times 3, interval 1 timer handle excute times 2, interval 1 timer handle excute times 43, interval 1 timer handle excute times 2, interval 1 timer handle excute times 8, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 [2025-07-25 15:02:44] delay_setting_light_timer_handl():3185 - [Information][Camera]Switch to DAY, WTL OFF [2025-07-25 15:02:44] delay_setting_light_timer_handl():3190 - [Information][Camera]Switch to DAY, IR OFF [**************reload isp.cfg **************] [filepath=/tmp/base-files/cfg/day/day_isp.cfg] timer handle excute times 7, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 timer handle excute times 2, interval 1 [2025-07-25 15:02:44] [ERROR] set_time_date_format():4448 - [CAMERA]change time format:0, change date format:0 [2025-07-25 15:02:44] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:44] [ERROR] osd_init_bitmap():2034 - [CAMERA]init bitmap main size:72, char_size:72, res:2560 [2025-07-25 15:02:44] [ERROR] regenerate_mem_font():4029 - [CAMERA]regenerate_mem_font called [2025-07-25 15:02:44] [ERROR] fill_mem_font_head():4101 - [CAMERA]after default write offset:132, data size:100 [2025-07-25 15:02:44] [ERROR] fill_mem_font_head():4177 - [CERR:vos_file_close() vfs_fsync fail, vos_file 0x84241900 AMERA]g write offset:7596 [2025-07-25 15:02:44] [ERROR] camera_osd_start():3932 - [CAMERA]cated string:APSatunMoTehWdFri1234567890 .-:ZVIGI C540-4G 1.20_D936, g_is_font_changed:1 [2025-07-25 15:02:44] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:44] [ERROR] get_stampsize():2656 - [CAMERA]chn:0, osd mem size:0x32100 [2025-07-25 15:02:44] [ERROR] set_glyph_info():2674 - [CAMERA]unicode:32, num of vertex:0 [2025-07-25 15:02:44] [ERROR] set_glyph_info():2681 - [CAMERA]vertex pts is NULL [2025-07-25ERR:vos_file_close() vfs_fsync fail, vos_file 0x82945E00 15:02:44] [ERROR] set_glyph_info():2674 - [CAMERA]unicode:32, num of vertex:0 [2025-07-25 15:02:44] [ERROR] set_glyph_info():2681 - [CAMERA]vertex pts is NULL [2025-07-25 15:02:45] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:45] [ERROR] get_stampsize():2656 - [CAMERA]chn:0, osd mem size:0x32100 [2025-07-25 15:02:45] [ERROR] set_time_date_format():4448 - [CAMERA]change time format:0, change date format:0 [2025-07-25 15:02:45] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:45] [ERROR] osd_init_bitmap():1997 - [CAMERA]minor res:848, main size:72, height:24, width:24 [2025-07-25 15:02:45] [ERROR] camera_osd_start():3932 - [CAMERA]cated string:APSatunMoTehWdFri1234567890 .-:ZVIGI C540-4G 1.20_D936, g_is_font_changed:0 [2025-07-25 15:02:45] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:45] [ERROR] get_stampsize():2670 - [CAMERA]chn:1, osd mem size:0x6300 [2025-07-25 15:02:45] [ERROR] osd_cal_max_font_size():1824 - [CAMERA]get max main resolusion: 2560, calc main font size:80 , get max minor resolusion: 848, calc minor max font size: 28 [2025-07-25 15:02:45] [ERROR] get_stampsize():2670 - [CAMERA]chn:1, osd mem size:0x6300 [2025-07-25 15:02:45] [ERROR] osd_start():2285 - [OSD]Osd start over. ERR:vos_file_open() open [/mnt/app/isp/day_isp_dpc.bin] failed, ret -2 error was 0 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_0.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_1.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_2.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_lut2d.bin] failed, ret -2 ERR:vos_file_close() vfs_fsync fail, vos_file 0x83939700 [**************reload isp.cfg **************] [filepath=/tmp/base-files/cfg/day/day_isp.cfg] ERR:vos_file_close() vfs_fsync fail, vos_file 0x83939A00 [2025-07-25 15:02:45] [ERROR] udp_send_dev_advertisement():1794 - [IPCD]udp data send error ret = -1 ERR:vos_file_close() vfs_fsync fail, vos_file 0x83909500 usb 1-1: new high-speed USB device number 3 using ehci-nvtivot [2025-07-25 15:02:45] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:45] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:45] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail ERR:vos_file_open() open [/mnt/app/isp/day_isp_dpc.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_0.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_1.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_ecs_auto_2.bin] failed, ret -2 ERR:vos_file_open() open [/mnt/app/isp/day_isp_lut2d.bin] failed, ret -2 usb 1-1: New USB device found, idVendor=2ecc, idProduct=3001, bcdDevice= 0.00 ERR:vos_file_close() vfs_fsync fail, vos_file 0x82945B00 usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0 usb 1-1: Product: WUKONG usb 1-1: Manufacturer: MARVELL usb 1-1: USB disconnect, device number 3 error was 0 [2025-07-25 15:02:46] [ERROR] image_3dnr_lv_reconfignvtim_patch_usbhc enter ():1237 - [CAMERA]image_3dnr_lv_reconfig called [2025-07-25 15:02:46] [ERROR] image_2dnr_lv_reconfig():1313 - [CAMERA]image_2dnr_lv_reconfig called [2025-07-25 15:02:46] delay_setting_light_timer_handl():3185 - [Information][Camera]Switch to DAY, WTL OFF [2025-07-25 15:02:46] delay_setting_light_timer_handl():3190 - [Information][Camera]Switch to DAY, IR OFF [2025-07-25 15:02:46] [ERROR] hw_network_load():462 - [libdla] ************* load network 7 success [2025-07-25 15:02:46] [ERROR] smart_box_reload_det():309 - [AMS] read PTD_DETECT failed, PTD module config file not found. [2025-07-25 15:02:46] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:46] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:46] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. error was 0 [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:47] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:47] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_vd_result():506 - [AMS] mark_motion_vd_result: empty fg! [2025-07-25 15:02:47] [ERROR] vd_dla_process():931 - [AMS] mark_motion_vd_result error. [2025-07-25 15:02:47] [ERROR] vd_dla_trigger():1079 - [AMS] vd_dla_process failed. [2025-07-25 15:02:47] [ERROR] mark_motion_pd_result():495 - [AMS] mark_motion_pd_result: empty fg! [2025-07-25 15:02:47] [ERROR] pd_dla_process():751 - [AMS] mark_motion_pd_result error. [2025-07-25 15:02:47] [ERROR] pd_dla_trigger():1064 - [AMS] pd_dla_process failed. [2025-07-25 15:02:48] [ERROR] ftp_record_start_delay():29 - [FTP]ftp_record_start_delay error was 0 [2025-07-25 15:02:48] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:48] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:48] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail error was 0 [2025-07-25 15:02:49] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:49] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:49] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail error was 0 [2025-07-25 15:02:50] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:50] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:50] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail error was 0 [2025-07-25 15:02:51] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:51] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:51] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail [2025-07-25 15:02:52] md_alarm_start_effect():2769 - [Alarm][Motion Detection]Motion detection start [2025-07-25 15:02:52] [ERROR] change_record_status():1238 - [STM]rec status change: pre => recording error was 0 [2025-07-25 15:02:52] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:52] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:52] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail error was 0 [2025-07-25 15:02:53] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:53] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:53] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail error was 0 usb 1-1: new high-speed USB device number 4 using ehci-nvtivot [2025-07-25 15:02:54] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idVendor. [2025-07-25 15:02:54] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-0:1.0/idProduct. [2025-07-25 15:02:54] [ERROR] usbdevice_detect():663 - [LTE]find USB device fail usb 1-1: New USB device found, idVendor=2c7c, idProduct=6005, bcdDevice= 3.18 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: Android usb 1-1: Manufacturer: Android usb 1-1: SerialNumber: 0000 rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-ehci_hcd-1, RNDIS device, 5a:e6:53:d5:1a:0c option 1-1:1.2: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 option 1-1:1.3: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 option 1-1:1.4: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2 [2025-07-25 15:02:55] md_alarm_end_effect():2837 - [Alarm][Motion Detection]Motion detection end error was 0 [2025-07-25 15:02:55] [ERROR] __enlarge_udesc_list():703 - [AVDM]avdm0 udesc list enlarge 200 to 600 [2025-07-25 15:02:55] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-1:1.3/idVendor. [2025-07-25 15:02:55] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-1:1.3/idProduct. [2025-07-25 15:02:55] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-1:1.1/idVendor. [2025-07-25 15:02:55] [ERROR] get_value_from_file():600 - [LTE]Fail to open /sys/bus/usb/devices/1-1:1.1/idProduct. [2025-07-25 15:02:55] [ERROR] usbdevice_detect():651 - [LTE]Find /sys/bus/usb/devices/1-1 idVendor=0x2c7c idProduct=0x6005 [2025-07-25 15:02:55]lte_timer_handle():10906 - [LTE]Now create lte_main_loop thread. [2025-07-25 15:02:55]openport():58 - [LTE]Starting serial communication process. [2025-07-25 15:02:55] [ERROR] openport():68 - [LTE]Open /dev/ttyUSB1 successfully. [2025-07-25 15:02:55]config_AT_port():3375 - [LTE]opened the device /dev/ttyUSB1 [2025-07-25 15:02:55]setport():207 - [LTE]Comport Init Successfully ...... [2025-07-25 15:02:55] [ERROR] readport():451 - [LTE]urc not found, recv [RDY ] [2025-07-25 15:02:55] [ERROR] readport():451 - [LTE]urc not found, recv [+CFUN: 1 ] [2025-07-25 15:02:55] [ERROR] readport():451 - [LTE]urc not found, recv [+QSIMSTAT: 1,1 ] error was 0 [2025-07-25 15:02:57] [ERROR] config_AT_port():3396 - [LTE]Serial Port:/dev/ttyUSB1 does not repsonse! wait and try later error was 0 [2025-07-25 15:02:58]openport():58 - [LTE]Starting serial communication process. [2025-07-25 15:02:58] [ERROR] openport():68 - [LTE]Open /dev/ttyUSB1 successfully. [2025-07-25 15:02:58]config_AT_port():3375 - [LTE]opened the device /dev/ttyUSB1 [2025-07-25 15:02:58]setport():207 - [LTE]Comport Init Successfully ...... [2025-07-25 15:02:58] [ERROR] readport():451 - [LTE]urc not found, recv [AT ] [2025-07-25 15:02:58]config_AT_port():3404 - [LTE]Find AT_PROT:/dev/ttyUSB1 success [2025-07-25 15:02:58]openport():58 - [LTE]Starting serial communication process. [2025-07-25 15:02:58] [ERROR] openport():68 - [LTE]Open /dev/ttyUSB1 successfully. [2025-07-25 15:02:58]setport():207 - [LTE]Comport Init Successfully ...... [2025-07-25 15:02:58]lte_start_main_loop():6111 - [LTE]lte_main_loop thread start running. [2025-07-25 15:02:58]update_led_state():11558 - [LTE]LED send led event 20 [2025-07-25 15:02:58] [ERROR] lte_start_main_loop():6136 - [LTE]disable echo characters error was 0 [2025-07-25 15:02:58] [ERROR] readport():451 - [LTE]urc not found, recv [ATE0 ] [2025-07-25 15:02:58] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: SMS DONE ] [2025-07-25 15:02:58] [ERROR] lte_start_main_loop():6146 - [LTE]set ATE0 success. [2025-07-25 15:02:58]lte_start_main_loop():6155 - [LTE]Check if the 4G module is in network interface mode. [2025-07-25 15:02:58]lte_start_main_loop():6186 - [LTE]AT+QCFG="nat" return +QCFG: "nat",1 [2025-07-25 15:02:58]lte_start_main_loop():6218 - [LTE]Check if the 4G module is in rndis mode. [2025-07-25 15:02:58]lte_start_main_loop():6249 - [LTE]AT+QCFG="usbnet" return +QCFG: "usbnet",3 error was 0 error was 0 [2025-07-25 15:03:00]lte_start_main_loop():6643 - [LTE]Main loop init 4G ... [2025-07-25 15:03:00] [ERROR] ping_start():508 - [DIAGNOSE]start ping:8.8.8.8 [2025-07-25 15:03:00] [ERROR] ping_start():508 - [DIAGNOSE]start ping:www.google.com [2025-07-25 15:03:00]clearProfileForESM():3557 - [LTE]clear Profile For default success! [2025-07-25 15:03:00] [ERROR] readport():451 - [LTE]urc not found, recv [+QUSIM: 1 ] [2025-07-25 15:03:00] [ERROR] set_module_properties():3881 - [LTE]SET DDR CLK to 1066 [2025-07-25 15:03:01] [ERROR] set_module_properties():3902 - [LTE]Close SIM write [2025-07-25 15:03:01]waiting_for_sim_det_ctrl():3683 - [LTE]ignored SimDetection set! error was 0 [2025-07-25 15:03:01] md_alarm_start_effect():2769 - [Alarm][Motion Detection]Motion detection start [2025-07-25 15:03:01]update_module_info_param():2931 - [LTE]update_module_info_param now! [2025-07-25 15:03:01]update_module_info_param():2934 - [LTE][vender]Quectel [2025-07-25 15:03:01]update_module_info_param():2935 - [LTE][product]EC200A [2025-07-25 15:03:01]update_module_info_param():2936 - [LTE][revision]EC200AELLAR01A05M16_TP [2025-07-25 15:03:01]update_module_info_param():2937 - [LTE][version]05 [2025-07-25 15:03:01]update_module_info_param():2938 - [LTE][imei]864042070769390 [2025-07-25 15:03:01]update_module_info_param():2967 - [LTE]update_module_info_param now! [2025-07-25 15:03:01] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected [2025-07-25 15:03:01]lte_start_main_loop():6788 - [LTE]Main loop sim check... [2025-07-25 15:03:01]lte_start_main_loop():6806 - [LTE]start do sim check [2025-07-25 15:03:01] [ERROR] get_sim_card_status():11292 - [LTE]get_sim_card_status cpinLine:+CPIN: READY [2025-07-25 15:03:01]get_cme_err_code():3491 - [LTE]get_cme_err_code cme_err_reply:+CPIN: READY [2025-07-25 15:03:01]get_sim_card_status():11391 - [LTE]SIM card status changed(1 -> 2) [2025-07-25 15:03:01]iccid_manager_handle():11209 - [LTE]4G not connected. [2025-07-25 15:03:01]iccid_manager_handle():11232 - [LTE]lte iccid updated ... [2025-07-25 15:03:01]handle_iccid():11158 - [LTE]SIM_QCCID:89861124640282341661 [2025-07-25 15:03:01] [ERROR] iccid_manager_handle():11251 - [LTE]sim card iccid change. [2025-07-25 15:03:01] [ERROR] iccid_manager_handle():11252 - [LTE]update data_traffic_count and data_traffic_count_start_time. [2025-07-25 15:03:01]iccid_manager_handle():11267 - [LTE]update_iccid now! [2025-07-25 15:03:01] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0 [2025-07-25 15:03:02]update_module_info_param():2909 - [LTE]lte module_info is already updated. [2025-07-25 15:03:02] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: SMS DONE ] [2025-07-25 15:03:02] md_alarm_start_effect():2769 - [Alarm][Motion Detection]Motion detection start [2025-07-25 15:03:02] [ERROR] urc_CGREG():214 - [LTE]ps_net_info.pcid:9B21, ps_net_info.cellID:858BD03 [2025-07-25 15:03:02] [ERROR] readport():451 - [LTE]urc not found, recv [+CGEV: EPS PDN ACT 1 ] error was 0 [2025-07-25 15:03:02] md_alarm_end_effect():2837 - [Alarm][Motion Detection]Motion detection end [2025-07-25 15:03:02] [ERROR] get_cimi_info_param():2894 - [LTE]imsi:460115279906397 [2025-07-25 15:03:02]update_module_info_param():2957 - [LTE][imsi]460115279906397 [2025-07-25 15:03:02]update_module_info_param():2967 - [LTE]update_module_info_param now! [2025-07-25 15:03:02] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected [2025-07-25 15:03:02]lte_start_main_loop():7293 - [LTE]Main loop search for internet. [2025-07-25 15:03:02]update_led_state():11558 - [LTE]LED send led event 20 [2025-07-25 15:03:02] [ERROR] readport():446 - [LTE]urc 0x10000019 have no proc fun, [+CTZV: "+32" ] [2025-07-25 15:03:02] [ERROR] lte_start_main_loop():7423 - [LTE]err = 5, cgreg_status:1 [2025-07-25 15:03:03] [ERROR] urc_CNEC_ESM_GSM():453 - [LTE]err_code:51,err_cid:8 [2025-07-25 15:03:03] [ERROR] urc_CNEC_ESM_GSM():454 - [LTE]Network side rejection occurred [2025-07-25 15:03:03] [ERROR] urc_CNEC_ESM_GSM():470 - [LTE]no need to Switch profile [2025-07-25 15:03:03] [ERROR] readport():451 - [LTE]urc not found, recv [+CGEV: ME PDN ACT 8,1 ] [2025-07-25 15:03:03] [ERROR] lte_start_main_loop():7470 - [LTE]err = 2, cereg_status:1 [2025-07-25 15:03:03] [ERROR] lte_start_main_loop():7514 - [LTE]ps network register successs, get profile now. [2025-07-25 15:03:03] [ERROR] get_sim_spn_info():524 - [LTE]AT_Response_buf:^SPN: 1,1,▒N-V▒u5O▒ [2025-07-25 15:03:03] [ERROR] get_sim_spn_info():528 - [LTE]short_eons:▒N-V▒u5O▒ [2025-07-25 15:03:03] [ERROR] get_sim_spn_info():531 - [LTE]SIM short_spn is ▒N-V▒u5O▒, coding =1 [2025-07-25 15:03:03] [ERROR] get_sim_gid1_info():474 - [LTE]Sim GID1 Response Error! [2025-07-25 15:03:03] [ERROR] get_sim_gid1_info():478 - [LTE]SIM GID1 is ff len = 0 [2025-07-25 15:03:03] link_up_timer_handle():1993 - [Exception][Network][NIFC]link up timeout! error was 0 [2025-07-25 15:03:03] [ERROR] get_profile():4174 - [LTE]isp:46011. [2025-07-25 15:03:03] [ERROR] get_profile():4177 - [LTE]mcc:460 mnc:11. [2025-07-25 15:03:03] [ERROR] __enlarge_udesc_list():703 - [AVDM]avdm0 udesc list enlarge 200 to 800 [2025-07-25 15:03:03] [ERROR] get_profile():4264 - [LTE]g_apn_conf_index:0 [2025-07-25 15:03:03] [ERROR] get_profile():4266 - [LTE]g_profile_pos:2310 [2025-07-25 15:03:03] [ERROR] get_profile():4281 - [LTE]###########is mvno ERROR######### [2025-07-25 15:03:03] get_profile():4343 - [Information][Network][4G]cur_profile apn:ctnet ip_version:2 username: password: authentication:0 pkg_name:China Telecom (4G) [2025-07-25 15:03:03] [ERROR] get_profile():4354 - [LTE]g_apn_conf_index:1868 [2025-07-25 15:03:03] [ERROR] get_profile():4355 - [LTE]g_profile_pos:1868 [2025-07-25 15:03:03]get_default_bearer_apn():4666 - [LTE]AT*CGDFLT? return:*CGDFLT: "IPV4V6","",0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0. [2025-07-25 15:03:03] [ERROR] get_default_bearer_apn():4668 - [LTE]pdp_type_str:IPV4V6, apn_str: [2025-07-25 15:03:03] [ERROR] get_default_bearer_apn():4672 - [LTE]parse AT*CGDFLT success. [2025-07-25 15:03:03]lte_start_main_loop():7561 - [LTE]isEsmAPN:0, g_prof_config.apn:ctnet,apn_str:,g_prof_config.ip_ver:2,pdp_type:2 [2025-07-25 15:03:03] [ERROR] lte_start_main_loop():7572 - [LTE]ps network register successs, go to APN_SET status. [2025-07-25 15:03:03]iccid_manager_handle():11209 - [LTE]4G not connected. [2025-07-25 15:03:03]iccid_manager_handle():11232 - [LTE]lte iccid updated ... [2025-07-25 15:03:03] [ERROR] iccid_manager_handle():11236 - [LTE]lte module_info is already updated. [2025-07-25 15:03:03] [ERROR] iccid_manager_handle():11237 - [LTE]no need to upload iccid:89861124640282341661. [2025-07-25 15:03:03]lte_start_main_loop():7796 - [LTE]Main loop apn set ...(1) [2025-07-25 15:03:03] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected [2025-07-25 15:03:03] [ERROR] long_connect_reload():4392 - [LONG_CONNECT]4g internet link_status change to :2 [2025-07-25 15:03:03]lte_start_main_loop():7841 - [LTE]Will not set user apn! [2025-07-25 15:03:03] [ERROR] try_to_set_apn():9463 - [LTE]cmd:AT+CGDCONT=2,"IPV4V6","ctnet" [2025-07-25 15:03:03] [ERROR] remote_log_reload():434 - [REMOTE_LOG]4g internet link_status change to :2 [2025-07-25 15:03:03] [ERROR] ddns_reload():693 - [DDNS]LTE mode: link_status change to :2 error was 0 [2025-07-25 15:03:04] [ERROR] try_to_set_apn():9478 - [LTE]cmd:AT*AUTHREQ=2,0,"","" [2025-07-25 15:03:04] [ERROR] diagnose_msg_send():846 - [DIAGNOSE]send lte model diagnose msg out id:2 [2025-07-25 15:03:04] [ERROR] diagnose_result_save_config():1055 - [DIAGNOSE]internet status has changed: [0] ===> [4] [2025-07-25 15:03:04]lte_net_detection_callback():11759 - [LTE]4G internet not connected [2025-07-25 15:03:04]lte_start_main_loop():7850 - [LTE]set default apn success [2025-07-25 15:03:04] [ERROR] lte_start_main_loop():7888 - [LTE]4G model start attach. [2025-07-25 15:03:04] start_attach_process():795 - [Information][Network][4G]4G model attach successful error was 0 [2025-07-25 15:03:05] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4 [2025-07-25 15:03:05] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:0,data:0 [2025-07-25 15:03:05] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:0,data:0 [2025-07-25 15:03:05]lte_start_main_loop():7925 - [LTE]Main loop start dial... [2025-07-25 15:03:05] [ERROR] udp_send_dev_advertisement():1794 - [IPCD]udp data send error ret = -1 error was 0 [2025-07-25 15:03:06] [ERROR] smart_box_reload_det():309 - [AMS] read PTD_DETECT failed, PTD module config file not found. [2025-07-25 15:03:07] [ERROR] soap_update_global():126 - [ONVIF]device_model VIGI-C540-4G-1.20 [2025-07-25 15:03:07] [ERROR] onvif_start():646 - [ONVIF]g_onvif_port 80 [2025-07-25 15:03:07] [ERROR] onvif_start():649 - [ONVIF]g_onvif_connection_type 0 [2025-07-25 15:03:07] [ERROR] onvif_start():657 - [ONVIF]###### onvif support ###### [2025-07-25 15:03:07] [ERROR] onvif_start():668 - [ONVIF]###### Automatically set static IP ###### [2025-07-25 inet_loop (271): drop_caches: 3 15:03:07] [ERROR] soap_event_create_rb():4644 - [ONVIF]Create http socket 38. [2025-07-25 15:03:07] [ERROR] get_md_capability():4200 - [ONVIF]onvif_mdconf.events is [2025-07-25 15:03:07] [ERROR] get_md_capability():4216 - [ONVIF]md_capability.topic_type is 0 [2025-07-25 15:03:07] [ERROR] onvif_discv_start():172 - [ONVIF]Onvif discovery start [2025-07-25 15:03:07] [ERROR] onvif_srv_start():630 - [ONVIF]Onvif services start, listen_port 2020 [2025-07-25 15:03:07] [ERROR] soap_out_wsdd_hello_type():246 - [ONVIF]g_onvif_port 80 Monitor: ignore <NVMP_START_DONE, 271> because nvmp_no_restart. [2025-07-25 15:03:07] nvmp_print_start_done():317 - [Information][System]Main progress start done error was 0 [2025-07-25 15:03:07] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected [2025-07-25 15:03:07]lte_start_main_loop():8070 - [LTE]Waiting for usb0 ... [2025-07-25 15:03:07]lte_start_main_loop():8097 - [LTE]Interface usb0 up [2025-07-25 15:03:07] [ERROR] limit_network_speed():1889 - [LTE]cmd:iptables -t filter -I FORWARD 1 -m limit --limit=2000/s --limit-burst=1000 -j ACCEPT; [2025-07-25 15:03:08] [ERROR] limit_network_speed():1893 - [LTE]cmd:iptables -t filter -A FORWARD -j DROP; error was 0 [2025-07-25 15:03:08] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: PB DONE ] (c540-4g_1.20) login: [2025-07-25 15:03:08] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4 [2025-07-25 15:03:09] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:438,data:438 [2025-07-25 15:03:09] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:300,data:300 [2025-07-25 15:03:09]lte_start_main_loop():8133 - [LTE]Main loop net connecting ... [2025-07-25 15:03:09] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected error was 0 [2025-07-25 15:03:09] [ERROR] __enlarge_bdesc_ring():596 - [AVDM]avdm0 bdesc ring enlarge 5 to 20 [2025-07-25 15:03:09] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4 [2025-07-25 15:03:09] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:876,data:876 [2025-07-25 15:03:09] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:372,data:372 [2025-07-25 15:03:10] [ERROR] get_runtime_param():1328 - [LTE]start:+CGCONTRDP: 2,5,"ctnet","10.76.50.247","","218.6.200.139","61.139.2.69","","",0,0 +CGCONTRDP: 2,5,"ctnet","254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1","","36.14.0.86.64.0.128.0.0.0.0.0.0.0.0.105","36.14.0.86.64.0.0.0.0.0.0.0.0.0.2.24","","",0,0 OK . [2025-07-25 15:03:10] [ERROR] get_runtime_param():1402 - [LTE]ipv6:fe80::1 [2025-07-25 15:03:10] [ERROR] get_runtime_param():1412 - [LTE]dnsv6_1:240e:56:4000:8000::69 [2025-07-25 15:03:10] [ERROR] get_runtime_param():1427 - [LTE]dnsv6_2:240e:56:4000::218 [2025-07-25 15:03:10]lte_reload():12064 - [LTE]lte_reload [2025-07-25 15:03:10] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0 error was 0 [2025-07-25 15:03:10] [ERROR] get_runtime_mtu():1206 - [LTE]mtu_val:0, old_mtu_val:1480, ret_cnt:1 [2025-07-25 15:03:10] [ERROR] get_runtime_mtu():1216 - [LTE]get lte ipv6 dns config [2025-07-25 15:03:10] [ERROR] get_runtime_mtu():1240 - [LTE]Could not get MTU value by command AT*PCO=2, keep old mtu value. [2025-07-25 15:03:10] [ERROR] lte_start_main_loop():8333 - [LTE]get ipv4 successful, get_ipaddr_flag:17 [2025-07-25 15:03:10] [ERROR] lte_start_main_loop():8338 - [LTE]get ipv6 successful, get_ipaddr_flag:17 [2025-07-25 15:03:10] [ERROR] lte_start_main_loop():8344 - [LTE]info_internet.ipv6_link_status:2 [2025-07-25 15:03:10] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0 [2025-07-25 15:03:10] [ERROR] lte_start_main_loop():8378 - [LTE]dhcpc_process_cur_time - dhcpc_process_start_time:0 s [2025-07-25 15:03:10]lte_start_main_loop():8133 - [LTE]Main loop net connecting ... [2025-07-25 15:03:10] [ERROR] onvif_cfg_monitor_reload():111 - [ONVIF]config /protocol/ipv6 changed [2025-07-25 15:03:10] ipv6_enabled():649 - [Information][Network][IPV6]Start IPv6 stateless successful [2025-07-25 15:03:10] ipv6_reload():826 - [Information][Network][IPV6]Enable IPv6 [2025-07-25 15:03:10] [ERROR] nifc_set_if_usb0_info_callback():899 - [NIFC]get usb0 information success [2025-07-25 15:03:10] [ERROR] nifc_set_if_usb0_info_callback():900 - [NIFC]Start set usb0 network information [2025-07-25 15:03:10] [ERROR] nifc_set_if_usb0_info_callback():911 - [NIFC]start set usb0 ipv4 net. [2025-07-25 15:03:10] [ERROR] system_if_del_mac_of_gateway():502 - [NIFC]Ioctl SIOCDARP error, error info:No such device or address [2025-07-25 15:03:10] [ERROR] nifc_set_usb0_net():1579 - [NIFC][LTE] bridge.host_route:0.0.0.0 [2025-07-25 15:03:10] [ERROR] nifc_set_usb0_net():1637 - [NIFC]set usb0 net success [2025-07-25 15:03:10] [ERROR] write_dns():249 - [NIFC]start write ipv6 dns nameserver. [2025-07-25 15:03:11] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected [2025-07-25 15:03:11] [ERROR] __enlarge_udesc_list():703 - [AVDM]avdm0 udesc list enlarge 200 to 1000 [2025-07-25 15:03:11] md_alarm_start_effect():2769 - [Alarm][Motion Detection]Motion detection start [2025-07-25 15:03:11] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4 [2025-07-25 15:03:11] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:4382,data:4382 [2025-07-25 15:03:11] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:5176,data:5176 [2025-07-25 15:03:11] [ERROR] lte_wan6_stopXlat():5673 - [LTE]lte_wan6_stopXlat begin. [2025-07-25 15:03:11] [ERROR] lte_wan6_stopXlat():5685 - [LTE]virtualIpv4:192.0.0.2 [2025-07-25 15:03:11] [ERROR] lte_wan6_stopXlat():5693 - [LTE]cmd:ip6tables -D FORWARD -t filter -i clatd -j ACCEPT. ip6tables: Bad rule (does a matching rule exist in that chain?). [2025-07-25 15:03:11] [ERROR] lte_wan6_stopXlat():5697 - [LTE]cmd:ip6tables -D FORWARD -t filter -i usb0 -j ACCEPT. ip6tables: Bad rule (does a matching rule exist in that chain?). [2025-07-25 15:03:12] [ERROR] lte_wan6_stopXlat():5701 - [LTE]cmd:iptables -D FORWARD -t filter -i eth0 -j ACCEPT. [2025-07-25 15:03:12] [ERROR] validate_recv_handle():155 - [cloud-service]validate "err_code":-20501, msg:Device id not found. iptables: Bad rule (does a matching rule exist in that chain?). [2025-07-25 15:03:12] [ERROR] lte_wan6_stopXlat():5705 - [LTE]cmd:iptables -D POSTROUTING -t nat -o clatd -j SNAT --to-source 192.0.0.2. iptables: No chain/target/match by that name. [2025-07-25 15:03:12] [ERROR] lte_wan6_stopXlat():5709 - [LTE]cmd:echo "del clatd" > /proc/net/nat46/control. nat46: deleting device (clatd) Could not find device 'clatd' [2025-07-25 15:03:12] [ERROR] lte_wan6_stopXlat():5712 - [LTE]lte_wan6_stopXlat end. [2025-07-25 15:03:12] [ERROR] lte_dhcps_start():687 - [LTE]dev_name:eth0 [2025-07-25 15:03:12] [ERROR] start_ipv4_nat_conversion():1790 - [LTE]cmd:echo '1' > /proc/sys/net/ipv4/ip_forward [2025-07-25 15:03:12] dhcps_start_cb():1044 - [Information][Network][DHCP]Start DHCP server [2025-07-25 15:03:12] [ERROR] start_ipv4_nat_conversion():1826 - [LTE]cmd:iptables -t nat -A PREROUTING -d 192.168.43.1 -p udp -m udp --dport 53 -j DNAT --to-destination 218.6.200.139; [2025-07-25 15:03:12] [ERROR] start_ipv4_nat_conversion():1855 - [LTE]cmd:iptables -t nat -A PREROUTING -d 192.168.43.1 -p tcp -m tcp --dport 53 -j DNAT --to-destination 218.6.200.139; [2025-07-25 15:03:12] [ERROR] start_ipv4_nat_conversion():1863 - [LTE]cmd:iptables -t nat -A POSTROUTING -s 192.168.43.0/255.255.255.0 -o usb0 -j MASQUERADE; [2025-07-25 15:03:12]update_led_state():11558 - [LTE]LED send led event 21 [2025-07-25 15:03:12]lte_start_main_loop():8582 - [LTE]Main loop net check ... [2025-07-25 15:03:12] lte_start_main_loop():8554 - [Information][Network][4G]*** 4g internet connected. [2025-07-25 15:03:12] [ERROR] long_connect_reload():4392 - [LONG_CONNECT]4g internet link_status change to :1 [2025-07-25 15:03:12] [ERROR] remote_log_reload():434 - [REMOTE_LOG]4g internet link_status change to :1 [2025-07-25 15:03:12] [ERROR] ddns_reload():693 - [DDNS]LTE mode: link_status change to :1 [2025-07-25 15:03:12] [ERROR] start_ddns_process():579 - [DDNS]DDNS start [2025-07-25 15:03:12] [ERROR] start_ddns_process():582 - [DDNS]dns is not enable [2025-07-25 15:03:13] md_alarm_end_effect():2837 - [Alarm][Motion Detection]Motion detection end
09-20
有以下两份代码,其中,代码1: /* Copyright(c) 2009-2025 Chengdu TP-LINK Technologies Co.Ltd. * * file srvcQos.c * brief * details * * author zhanghaoxuan * version * date 14Aug25 * * history \arg */ /**************************************************************************************************/ /* INCLUDE_FILES */ /**************************************************************************************************/ /* libc header */ #include <stdio.h> /* syscall header */ /* common header */ #include "fepTypes.h" #include "fepDefs.h" /* platform header */ #include "midware/dal.h" /* public application header */ #include "common/applError.h" #include "common/dmpComDef.h" /*private header*/ #include "srvcQos.h" #include "adQos.h" #include "qos/dalQosPub.h" #include "qos/qosPub.h" #include "qos/logQos.h" #include "qos/errQos.h" #include "data/dataQos.h" #include "data/stateQos.h" #include "l2/l2Pub.h" #include "l2/port/cfgPortPub.h" #include "l2/port/portPub.h" #include "l2/port/dalPortPub.h" #include "l2/port/statPortPub.h" #include "l2/lag/statLagPub.h" #include "l2/lag/lagPub.h" #include "tpDbg/tpdebug.h" #include "syslog/syslog.h" #include "libApp/libQos/libQos.h" #include "libDcm/libStack/libStack.h" /**************************************************************************************************/ /* DEFINES */ /**************************************************************************************************/ #define QOS_IFG_DELAY (10.8) #define QOS_RATE_ADJUST_PAR 1514 #define QOS_RATE_KBPS_THOUSAND 1000 #define QOS_RATE_PERCENT_HUNDRED 100 #define QOS_STORM_EXCEED_LOG_CYCLE 60 // secs #define OMADA_KEY_OSW_STORM "OSW_DET_STORM" #define OMADA_KEY_OSW_PB "OSW_PB" #define QOS_MIB_UPDATE_TIMER_NAME "qos_mib_update_tm" #define AD_QOS_RATE_ADJUST_BY_PACKET_LENGTH(factor, packet_length) \ { \ if(packet_length >= 64 && packet_length < 128) \ { \ factor = 1.04 + (packet_length-64)*0.0022; \ } \ else if(packet_length >= 128 && packet_length < 192) \ { \ factor = 1.18 + (packet_length-128)*0.0009; \ } \ else if(packet_length >= 192 && packet_length < 256) \ { \ factor = 1.24 + (packet_length-192)*0.0004; \ } \ else if(packet_length >= 256 && packet_length < 320) \ { \ factor = 1.27 + (packet_length-256)*0.0003; \ } \ else if(packet_length >= 320 && packet_length < 384) \ { \ factor = 1.29 + (packet_length-320)*0.0002; \ } \ else if(packet_length >= 384 && packet_length < 1536) \ { \ factor = 1.30 + (packet_length-384)*0.00004; \ } \ } #define PORT_UP2STR(up, str)\ if(UP_IS_VALID(up) && (NULL != (str)))\ {\ *(str)='\0';\ usUp2Str((up), (str), UP_STR_BRF_PRFX);\ } typedef struct { int updateFlag; } QOS_MIB_UPDATE_MSG; /**************************************************************************************************/ /* TYPES */ /**************************************************************************************************/ extern int preQueueWeight[QOS_QUEUE_MAX_NUM]; /**************************************************************************************************/ /* EXTERN_PROTOTYPES */ /**************************************************************************************************/ /**************************************************************************************************/ /* LOCAL_PROTOTYPES */ /**************************************************************************************************/ /**************************************************************************************************/ /* VARIABLES */ /**************************************************************************************************/ static TIMER_ID qosMibUpdateTimer ; static pal_msgq_t qosSrvcMsgQ = PAL_MQ_ERROR; pal_thread_t qosTimerTaskId = PAL_THREAD_ERROR; //static int qosTrapCounter = 0; //static QOS_PORT_RATE_DIFF_STRUCT rateDiff[UP_UNIT_PORT_MAX+1]; static int qosTrapCounter = 0; static BOOL l_ingressLogEnable = FALSE; static BOOL l_egressLogEnable = FALSE; static BOOL l_bcLogEnable = FALSE; static BOOL l_mcLogEnable = FALSE; /**************************************************************************************************/ /* LOCAL_FUNCTIONS */ /**************************************************************************************************/ /* helper routine: transform the ratio rate to kbps rate*/ static void _rateValueTransform(user_port uPort, UINT32 *rateValue) { QOS_PORT_STATUS portStatus = {}; user_port_list lagMemberList = {}; user_port up = {}; int lagId = 0; int index = 0; int portRate = 0; int tmpRate = 0; int speedValue[UP_ABILITY_SPEED_END] = PORT_SPEED_VALUE; APPL_ENSURE_RET_VOID(UP_IS_VALID(uPort)); APPL_ENSURE_RET_VOID(NULL != rateValue); uplist_init(&lagMemberList); APPL_IF_ERR_DONE_VOID(adQosGetPortLinkStatus(uPort, &portStatus)); if (DISABLE == portStatus.status) { if (UP_IS_LAG(uPort)) { UP_TO_LAG(uPort, lagId); dataQosLagMemberListGet(lagId, &lagMemberList); UP_ITER_LIST_SWP(&lagMemberList, index, up) { tmpRate = QOS_PORT_MAX_RATE_KBPS(up) / QOS_RATE_KBPS_THOUSAND; if (0 == portRate || tmpRate < portRate) { portRate = tmpRate; } } } else { portRate = QOS_PORT_MAX_RATE_KBPS(uPort) / QOS_RATE_KBPS_THOUSAND; } } else { portRate = speedValue[portStatus.speedMode]; } *rateValue = (*rateValue) * portRate * (QOS_RATE_KBPS_THOUSAND / QOS_RATE_PERCENT_HUNDRED); //本应为 (rateValue/100) * (portRate*1000),为防止UINT32溢出,需要交换顺序 rateValueAdjust(rateValue); done: uplist_free(&lagMemberList); return; } static void _qosMsgRecover(QOS_AD_MSG_T qosMsg) { user_port physicalPort = {}; user_port logicPort = {}; QOS_PORT_STATUS portStatus = {}; UINT8 linkState = 0; //NTFY_QOS qosNtfy = {}; TIMER_ID recoverTimer = {}; TIMER_ID_INIT(recoverTimer); memcpy(&physicalPort, &qosMsg.qosRcvr.physicalPort, sizeof(user_port)); //物理端口 memcpy(&logicPort, &qosMsg.qosRcvr.logicPort, sizeof(user_port)); //lag端口 if (UP_CMP(physicalPort, logicPort)) /* 获取端口配置的状态 */ dataQosRcvrTimerIdLagSet(physicalPort, recoverTimer); else /*dealing with phy port*/ dataQosRcvrTimerIdPhySet(physicalPort, recoverTimer); /*check port config, if port set to disable ,do not enable this phy port*/ if (UP_CMP(physicalPort, logicPort)) { qosStatePortStatusGet(logicPort, &portStatus); } else { qosStatePortStatusGet(physicalPort, &portStatus); } stateQosPortBlockStatusSet(physicalPort, DISABLE); /* QOS_TODO:堆叠时,向master发送notify更新recovery信息 */ #if 0 if (!DEV_ROLE_LOCAL_IS_MASTER()){ memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.block = DISABLE; unit_list ul={}; UNIT_LIST_ADD(ul, UNIT_MASTER); notify_call_remote(ul, NOTIFY_QOS_STORM_CTRL_BLOCK, &qosNtfy, sizeof(qosNtfy)); } #endif QOS_DEBUG("linkStatus:%d",portStatus.status); if (portStatus.status == ENABLE) { adQosGetPortState(physicalPort, &linkState); if(linkState != ENABLE) { adQosSetPortState(physicalPort, ENABLE); } } else { adQosSetPortState(physicalPort, DISABLE); } } static void _qosRateRecoverTimerNotify(void *data) { // QOS_AD_MSG_T qosMsg = {}; // user_port *upArr = data; // // APPL_ENSURE_RET_VOID(data != NULL); // // qosMsg.qosRcvr.physicalPort = upArr[0]; // qosMsg.qosRcvr.logicPort = upArr[1]; // qosMsg.type = QOS_MSG_RCVR; QOS_AD_MSG_T qosMsg = {}; APPL_ENSURE_RET_VOID(data != NULL); user_port *upArr = (user_port*) data; qosMsg.qosRcvr.physicalPort = upArr[0]; qosMsg.qosRcvr.logicPort = upArr[1]; qosMsg.type = QOS_MSG_RCVR; _qosMsgRecover(qosMsg); } static STATUS _qosPortMibUpdateCb() { // DW("_qosPortMibUpdateCb"); int ret = ERR_NO_ERROR; char *key = NULL; void *handler = NULL; user_port logicPort = {}; user_port physicalPort = {}; QOS_PORT_RATE_DIFF_STRUCT rateDiff = {}; UINT64 ingressVal = 0; UINT64 egressVal = 0; UINT64 bcVal = 0; UINT64 mcVal = 0; UINT32 rate = 0; TIMER_ID recoverTimer; TIMER_ID_INIT(recoverTimer); struct timespec timer = {}; char strUp[STR_STRUP_SIZE] = {}; char timerName[STR_TIMER_NAME_SIZE] = {}; APPQOS_ADCFG_OPT optCfg = {}; QOS_PORT_STATUS portStatus = {}; UINT32 lagId = 0; UINT8 shutdownFlag = 0; NTFY_QOS qosNtfy = {}; MAC_ADDRESS sysMac = {}; char macStr[STR_MAC_SIZE] = {}; char portStr[STR_STRUP_SIZE] = {}; memset(macStr, 0, 20); libStkSysDevMacGet(UNIT_CURRENT, sysMac); ether2str(macStr, sysMac, CSL_UPCASE, STR_TRANS_CLI); qosTrapCounter++; if (qosTrapCounter >= QOS_STORM_EXCEED_LOG_CYCLE) { qosTrapCounter = 0; l_ingressLogEnable = TRUE; l_egressLogEnable = TRUE; l_bcLogEnable = TRUE; l_mcLogEnable = TRUE; } /* 置位flag */ BOOL f_ingressLogEnable = FALSE; BOOL f_egressLogEnable = FALSE; BOOL f_bcLogEnable = FALSE; BOOL f_mcLogEnable = FALSE; dal_ado_t *adoi; adoi = dalAsdoiCreate(DMP_DEV_NAME_SWITCHMAC, DAL_MOD_PORT, DAL_CFG_TYPE_ENTRY); APPL_ENSURE_DONE(ret, adoi, ERR_NO_MEMORY); dalAdoiEntryTableAppend(adoi, DAL_PORT_K_MIB); dalAdoiEntryOperAppend(adoi, DAL_PORT_K_MIB, DAL_OPER_GET_ALL); if (PFM_ERR_C_OK != dalGet(adoi)) { ret = ERR_BAD_PARAM; goto done; } if (NULL != (handler = DAL_ADOI_ENTRY(adoi, DAL_PORT_K_MIB))) { DAL_ADOI_ENTRY_LOOP(handler) { if(NULL == (key = DAL_ADOI_ENTRY_KEY(handler)) || !DAL_ADOI_ENTRY_KEY_MATCH(handler, DAL_PORT_K_MIB_ALL)) { continue; } DAL_PORT_KEY_MIB_PARSE_TO_UP(key, physicalPort); /* QOS_TODO:所有端口启用功能并且link-up时存在性能问题 get交换机的时间戳,通过绝对时间来处理 */ adQosGetPortLinkStatus(physicalPort, &portStatus); if (portStatus.status == DISABLE) { continue; } /* KEY inner field&value loop */ if (DAL_ADOI_ENTRY_KEY_EMPTY(handler)) { QOS_DEBUG_COMMON("Invalid operation: deleting Fixed entries!"); } else { DAL_ADOI_ENTRY_FIELD_LOOP(handler, key) { if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_RXBYTEDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.rxbyteDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_TXBYTEDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.txbyteDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_BCNUMDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.bcNumDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_MCNUMDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.mcNumDiff); } } } qosGetLagIdOfPort(physicalPort, &lagId); if (lagId) { UP_FROM_LAG(logicPort, lagId); } else { memcpy(&logicPort, &physicalPort, sizeof(user_port)); } ret = dataQosGetPortConfig(logicPort, &optCfg); if (ret != ERR_NO_ERROR) { continue; } if(optCfg.stormLogging) { QOS_DEBUG("upIdx:%d, rxbyteDiff:%d, txbyteDiff:%d, bcNumDiff:%d, mcNumDiff:%d", UP_INDEX(logicPort), rateDiff.rxbyteDiff, rateDiff.txbyteDiff, rateDiff.bcNumDiff, rateDiff.mcNumDiff); } /* 入口带宽阈值 Byte/s */ ingressVal = (UINT64)(optCfg.ingressRateValue) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; /*1(sec)*1000*/ /* 出口带宽阈值 Byte/s */ egressVal = (UINT64)(optCfg.egressRateValue) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; if (QOS_RATE_MODE_PPS != optCfg.rateMode) //PPS(包速率模式)、KBPS(kbit模式)、RATIO(端口带宽模式) { if (QOS_RATE_MODE_KBPS == optCfg.rateMode) { /* 广播流量阈值 */ bcVal = (UINT64)(optCfg.bcRate) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; /* 组播流量阈值 */ mcVal = (UINT64)(optCfg.mcRate) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } else if (QOS_RATE_MODE_RATIO == optCfg.rateMode) { rate = optCfg.bcRate; _rateValueTransform(logicPort, &rate); bcVal = (UINT64)(rate)*QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; rate = optCfg.mcRate; _rateValueTransform(logicPort, &rate); mcVal = (UINT64)(rate)*QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } } else { bcVal = (UINT64)optCfg.bcRate; /*1 sec*/ mcVal = (UINT64)optCfg.mcRate; } /* 入口带宽超限 */ if (optCfg.ingressRateValue && rateDiff.rxbyteDiff > ingressVal) { if (l_ingressLogEnable) { //QOS_TODO: snmp trap、controller log f_ingressLogEnable = TRUE; QDW("ingress exceed:%d", UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.ingressRate = optCfg.ingressRateValue; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_BANDWIDTH_INGRESS, &qosNtfy); //触发告警 PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_INGRESS_REACH, portStr); //触发日志 } } else { /*bc trap & notify*/ if (optCfg.bcRate && QOS_RATE_MODE_PPS != optCfg.rateMode && (rateDiff.rxbyteDiff > bcVal)&&(QOS_RATE_ADJUST_PAR * rateDiff.bcNumDiff >= bcVal)) { double factor = 1; int packet_length = rateDiff.rxbyteDiff/rateDiff.bcNumDiff; AD_QOS_RATE_ADJUST_BY_PACKET_LENGTH(factor, packet_length); QOS_DEBUG_COMMON("factor %4f, rateValNew.rxbyteDiff %d",factor,rateDiff.rxbyteDiff); if(rateDiff.rxbyteDiff >= factor * bcVal) { shutdownFlag = TRUE; if (l_bcLogEnable) { //QOS_TODO: snmp trap、controller log f_bcLogEnable = TRUE; QDW("bc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.bcastRate = optCfg.bcRate; qosNtfy.bcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_BCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_BC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_BCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Broadcast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } } if (optCfg.bcRate && QOS_RATE_MODE_PPS == optCfg.rateMode && rateDiff.bcNumDiff >= bcVal) { shutdownFlag = TRUE; if (l_bcLogEnable) { //QOS_TODO: snmp trap、controller log f_bcLogEnable = TRUE; QDW("bc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.bcastRate = optCfg.bcRate; qosNtfy.bcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_BCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_BC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_BCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Broadcast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } /*mc trap & notify*/ if (optCfg.mcRate && QOS_RATE_MODE_PPS != optCfg.rateMode && (rateDiff.rxbyteDiff > mcVal) && (QOS_RATE_ADJUST_PAR * rateDiff.mcNumDiff >= mcVal)) { double factor = 1; int packet_length = rateDiff.rxbyteDiff/rateDiff.mcNumDiff; AD_QOS_RATE_ADJUST_BY_PACKET_LENGTH(factor, packet_length); QOS_DEBUG_COMMON("factor %4f, rateValNew.rxbyteDiff %d",factor,rateDiff.rxbyteDiff); if(rateDiff.rxbyteDiff >= factor * mcVal) { shutdownFlag = TRUE; if (l_mcLogEnable) { //QOS_TODO: snmp trap、controller log f_mcLogEnable = TRUE; QDW("mc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.mcastRate = optCfg.mcRate; qosNtfy.mcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_MCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_MC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_MCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Multicast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } } } if (optCfg.egressRateValue && rateDiff.txbyteDiff > egressVal) { if (l_egressLogEnable) { //QOS_TODO: snmp trap、syslog、controller log f_egressLogEnable = TRUE; QDW("egress exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.egressRate = optCfg.egressRateValue; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_BANDWIDTH_EGRESS, &qosNtfy); PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_EGRESS_REACH, portStr); } } /*if port belong to a LAG, the optCfg is LAG rate Config*/ if (optCfg.stormOper == QOS_STORM_EXCEED_SHUTDOWN && shutdownFlag /* && portStatus */) { QOS_DEBUG("QOS_STORM_EXCEED_SHUTDOWN"); shutdownFlag = FALSE; adQosSetPortState(physicalPort, DISABLE); stateQosPortBlockStatusSet(physicalPort, ENABLE); PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_STORM_CONTROL_SHUTDOWN, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_SHUTDOWN, OMADA_KEY_OSW_PB, OMD_ALERT_REPORT, portStr, (ULONG)macStr, (ULONG)portStr, 0, 0, 0, 0); //QOS_TODO:堆叠时,向master发送notify更新block信息 if (optCfg.recoverTime) { if (UP_IS_LAG(logicPort)) dataQosRcvrTimerIdLagGet(physicalPort,&recoverTimer); else dataQosRcvrTimerIdPhyGet(logicPort,&recoverTimer); /*add timer, LAG member set their own logic timer ID: check the timer value, if not 0, LAG has a timer*/ /* controller独有bug,定时器存在,需删除*/ if (TIMER_ID_IS_VALID(recoverTimer)) { DEL_TIMER(recoverTimer); } timer.tv_sec = optCfg.recoverTime; timer.tv_nsec = 0; user_port upArr[2] = {}; upArr[0] = physicalPort; upArr[1] = logicPort; usUp2Str(upArr[0],strUp,UP_STR_BRF_PRFX); snprintf(timerName, sizeof(timerName), "qosRecoverTime:%s",strUp); if (UP_IS_LAG(logicPort)) { recoverTimer = add_timer(timerName, &timer, _qosRateRecoverTimerNotify, upArr, sizeof(upArr), EXECUTE_SINGLE); if (TIMER_ID_IS_VALID(recoverTimer)) dataQosRcvrTimerIdLagSet(physicalPort, recoverTimer); } else { recoverTimer = add_timer(timerName, &timer, _qosRateRecoverTimerNotify, upArr, sizeof(upArr), EXECUTE_SINGLE); if (TIMER_ID_IS_VALID(recoverTimer)) dataQosRcvrTimerIdPhySet(physicalPort, recoverTimer); } } } if(f_ingressLogEnable) { l_ingressLogEnable = FALSE; f_ingressLogEnable = FALSE; } if(f_egressLogEnable) { l_egressLogEnable = FALSE; f_egressLogEnable = FALSE; } if(f_bcLogEnable) { l_bcLogEnable = FALSE; f_bcLogEnable = FALSE; } if(f_mcLogEnable) { l_mcLogEnable = FALSE; f_mcLogEnable = FALSE; } }//end loop handler } done: if(adoi) { dalAdoiDestroy(adoi); } return ret; } static void _managerTimerHandleTask() { int status = 0; int pri = 0; QOS_MIB_UPDATE_MSG msg = {}; while (1) { //一直阻塞,usec置为PAL_MQ_WAIT_FOREVER status = pal_msgQ_receive(qosSrvcMsgQ, (char *)(&msg), sizeof(QOS_MIB_UPDATE_MSG), PAL_MQ_WAIT_FOREVER, (UINT *)&pri); if (PAL_MQ_ERROR == status) { continue; } /* 接收到消息则执行 */ _qosPortMibUpdateCb(); } } static void _managerTimerHandle(void *param) { QOS_MIB_UPDATE_MSG msg = {}; msg.updateFlag = true; pal_msgQ_send(qosSrvcMsgQ, (char *)&msg, sizeof(QOS_MIB_UPDATE_MSG), 0, PAL_MQ_WAIT_NOWAIT); } static int _qosMibUpdatePthreadInit() { qosTimerTaskId = pal_thread_create("qosTimerTaskId", 10 * 1024, 0, _managerTimerHandleTask, NULL); if (PAL_THREAD_ERROR == qosTimerTaskId) { DBG("create task fail"); } D("_qosMibUpdatePthreadInit ok"); return ERR_NO_ERROR; } STATUS _qosMibUpdateStartTimerInit() { TIMER_ID_INIT(qosMibUpdateTimer); struct timespec updateTimer = {}; updateTimer.tv_sec = 1; updateTimer.tv_nsec = 0; qosMibUpdateTimer = add_timer("qos_mib_update_timer", &updateTimer, _managerTimerHandle, NULL, 0, EXECUTE_FOREVER); APPL_ENSURE_RET_VAL(TIMER_ID_IS_VALID(qosMibUpdateTimer), ERR_INIT); D("_qosMibUpdateStartTimerInit ok"); return ERR_NO_ERROR; } static int _qosMibUpdateQueueInit() { qosSrvcMsgQ = pal_msgQ_create("/qosMibUpdateTimerQueue", 10, sizeof(QOS_MIB_UPDATE_MSG), PAL_MQ_READ_WRITE); if (PAL_MQ_ERROR == qosSrvcMsgQ) { pal_msgQ_destroy("/qosMibUpdateTimerQueue"); } D("_qosMibUpdateQueueInit ok"); return ERR_NO_ERROR; } /**************************************************************************************************/ /* PUBLIC_FUNCTIONS */ /**************************************************************************************************/ STATUS srvcQosInit() { /* 初始化任务线程 */ APPL_IF_ERR_RET(_qosMibUpdatePthreadInit()); /* 初始化消息队列 */ APPL_IF_ERR_RET(_qosMibUpdateQueueInit()); /* 初始化定时器 */ _qosMibUpdateStartTimerInit(); // PFM_IF_FAIL_RET_VAL(dalStatChgSub(DMP_DEV_NAME_SWITCHMAC, DAL_SWITCHMAC_STAT_MIBUPDATE, _qosPortMibUpdateCb), ERR_QOS_INIT); return ERR_NO_ERROR; } 代码2: static void _rateValueTransform(user_port uPort, UINT32 *rateValue) { QOS_PORT_STATUS portStatus = {}; user_port_list lagMemberList = {}; user_port up = {}; int lagId = 0; int index = 0; int portRate = 0; int tmpRate = 0; int speedValue[UP_ABILITY_SPEED_END] = PORT_SPEED_VALUE; APPL_ENSURE_RET_VOID(UP_IS_VALID(uPort)); APPL_ENSURE_RET_VOID(NULL != rateValue); uplist_init(&lagMemberList); APPL_IF_ERR_DONE_VOID(adQosGetPortLinkStatus(uPort, &portStatus)); if (DISABLE == portStatus.status) { if (UP_IS_LAG(uPort)) { UP_TO_LAG(uPort, lagId); dataQosLagMemberListGet(lagId, &lagMemberList); UP_ITER_LIST_SWP(&lagMemberList, index, up) { tmpRate = QOS_PORT_MAX_RATE_KBPS(up) / QOS_RATE_KBPS_THOUSAND; if (0 == portRate || tmpRate < portRate) { portRate = tmpRate; } } } else { portRate = QOS_PORT_MAX_RATE_KBPS(uPort) / QOS_RATE_KBPS_THOUSAND; } } else { portRate = speedValue[portStatus.speedMode]; } *rateValue = (*rateValue) * portRate * (QOS_RATE_KBPS_THOUSAND / QOS_RATE_PERCENT_HUNDRED); //本应为 (rateValue/100) * (portRate*1000),为防止UINT32溢出,需要交换顺序 rateValueAdjust(rateValue); done: uplist_free(&lagMemberList); return; } static void _qosMsgRecover(QOS_AD_MSG_T qosMsg) { user_port physicalPort = {}; user_port logicPort = {}; QOS_PORT_STATUS portStatus = {}; UINT8 linkState = 0; //NTFY_QOS qosNtfy = {}; TIMER_ID recoverTimer = {}; TIMER_ID_INIT(recoverTimer); memcpy(&physicalPort, &qosMsg.qosRcvr.physicalPort, sizeof(user_port)); //物理端口 memcpy(&logicPort, &qosMsg.qosRcvr.logicPort, sizeof(user_port)); //lag端口 if (UP_CMP(physicalPort, logicPort)) /* 获取端口配置的状态 */ dataQosRcvrTimerIdLagSet(physicalPort, recoverTimer); else /*dealing with phy port*/ dataQosRcvrTimerIdPhySet(physicalPort, recoverTimer); /*check port config, if port set to disable ,do not enable this phy port*/ if (UP_CMP(physicalPort, logicPort)) { qosStatePortStatusGet(logicPort, &portStatus); } else { qosStatePortStatusGet(physicalPort, &portStatus); } stateQosPortBlockStatusSet(physicalPort, DISABLE); /* QOS_TODO:堆叠时,向master发送notify更新recovery信息 */ #if 0 if (!DEV_ROLE_LOCAL_IS_MASTER()){ memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.block = DISABLE; unit_list ul={}; UNIT_LIST_ADD(ul, UNIT_MASTER); notify_call_remote(ul, NOTIFY_QOS_STORM_CTRL_BLOCK, &qosNtfy, sizeof(qosNtfy)); } #endif QOS_DEBUG("linkStatus:%d",portStatus.status); if (portStatus.status == ENABLE) { adQosGetPortState(physicalPort, &linkState); if(linkState != ENABLE) { adQosSetPortState(physicalPort, ENABLE); } } else { adQosSetPortState(physicalPort, DISABLE); } } static void _qosRateRecoverTimerNotify(void *data) { QOS_AD_MSG_T qosMsg = {}; user_port *upArr = data; APPL_ENSURE_RET_VOID(data != NULL); qosMsg.qosRcvr.physicalPort = upArr[0]; qosMsg.qosRcvr.logicPort = upArr[1]; qosMsg.type = QOS_MSG_RCVR; _qosMsgRecover(qosMsg); } static STATUS _qosPortMibUpdateCb(dal_ado_t *adoi, dal_attr *attr) { int ret = ERR_NO_ERROR; char *key = NULL; void *handler = NULL; user_port logicPort = {}; user_port physicalPort = {}; QOS_PORT_RATE_DIFF_STRUCT rateDiff = {}; UINT64 ingressVal = 0; UINT64 egressVal = 0; UINT64 bcVal = 0; UINT64 mcVal = 0; UINT32 rate = 0; TIMER_ID recoverTimer; TIMER_ID_INIT(recoverTimer); struct timespec timer = {}; char strUp[STR_STRUP_SIZE] = {}; char timerName[STR_TIMER_NAME_SIZE] = {}; APPQOS_ADCFG_OPT optCfg = {}; QOS_PORT_STATUS portStatus = {}; UINT32 lagId = 0; UINT8 shutdownFlag = 0; NTFY_QOS qosNtfy = {}; MAC_ADDRESS sysMac = {}; char macStr[STR_MAC_SIZE] = {}; char portStr[STR_STRUP_SIZE] = {}; memset(macStr, 0, 20); libStkSysDevMacGet(UNIT_CURRENT, sysMac); ether2str(macStr, sysMac, CSL_UPCASE, STR_TRANS_CLI); qosTrapCounter++; if (qosTrapCounter >= QOS_STORM_EXCEED_LOG_CYCLE) { qosTrapCounter = 0; l_ingressLogEnable = TRUE; l_egressLogEnable = TRUE; l_bcLogEnable = TRUE; l_mcLogEnable = TRUE; } /* 置位flag */ BOOL f_ingressLogEnable = FALSE; BOOL f_egressLogEnable = FALSE; BOOL f_bcLogEnable = FALSE; BOOL f_mcLogEnable = FALSE; if (NULL != (handler = DAL_ADOI_ENTRY(adoi, DAL_PORT_K_MIB))) { DAL_ADOI_ENTRY_LOOP(handler) { if(NULL == (key = DAL_ADOI_ENTRY_KEY(handler)) || !DAL_ADOI_ENTRY_KEY_MATCH(handler, DAL_PORT_K_MIB_ALL)) { continue; } DAL_PORT_KEY_MIB_PARSE_TO_UP(key, physicalPort); /* QOS_TODO:所有端口启用功能并且link-up时存在性能问题 get交换机的时间戳,通过绝对时间来处理 */ adQosGetPortLinkStatus(physicalPort, &portStatus); if (portStatus.status == DISABLE) { continue; } /* KEY inner field&value loop */ if (DAL_ADOI_ENTRY_KEY_EMPTY(handler)) { QOS_DEBUG_COMMON("Invalid operation: deleting Fixed entries!"); } else { DAL_ADOI_ENTRY_FIELD_LOOP(handler, key) { if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_RXBYTEDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.rxbyteDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_TXBYTEDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.txbyteDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_BCNUMDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.bcNumDiff); } else if (DAL_ADOI_ENTRY_FIELD_MATCH(handler, DAL_PORT_K_MIB_F_MCNUMDIFF)) { dalAdoiGetEntryUI64(adoi, DAL_PORT_K_MIB, &rateDiff.mcNumDiff); } } } qosGetLagIdOfPort(physicalPort, &lagId); if (lagId) { UP_FROM_LAG(logicPort, lagId); } else { memcpy(&logicPort, &physicalPort, sizeof(user_port)); } ret = dataQosGetPortConfig(logicPort, &optCfg); if (ret != ERR_NO_ERROR) { continue; } if(optCfg.stormLogging) {QOS_DEBUG("upIdx:%d, rxbyteDiff:%d, txbyteDiff:%d, bcNumDiff:%d, mcNumDiff:%d", UP_INDEX(logicPort), rateDiff.rxbyteDiff, rateDiff.txbyteDiff, rateDiff.bcNumDiff, rateDiff.mcNumDiff);} ingressVal = (UINT64)(optCfg.ingressRateValue) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; /*1(sec)*1000*/ egressVal = (UINT64)(optCfg.egressRateValue) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; if (QOS_RATE_MODE_PPS != optCfg.rateMode) { if (QOS_RATE_MODE_KBPS == optCfg.rateMode) { bcVal = (UINT64)(optCfg.bcRate) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } else if (QOS_RATE_MODE_RATIO == optCfg.rateMode) { rate = optCfg.bcRate; _rateValueTransform(logicPort, &rate); bcVal = (UINT64)(rate)*QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } if (QOS_RATE_MODE_KBPS == optCfg.rateMode) { mcVal = (UINT64)(optCfg.mcRate) * QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } else if (QOS_RATE_MODE_RATIO == optCfg.rateMode) { rate = optCfg.mcRate; _rateValueTransform(logicPort, &rate); mcVal = (UINT64)(rate)*QOS_RATE_KBPS_THOUSAND / QOS_IFG_DELAY; } } else { bcVal = (UINT64)optCfg.bcRate; /*1 sec*/ mcVal = (UINT64)optCfg.mcRate; } if (optCfg.ingressRateValue && rateDiff.rxbyteDiff > ingressVal) { if (l_ingressLogEnable) { //QOS_TODO: snmp trap、controller log f_ingressLogEnable = TRUE; QDW("ingress exceed:%d", UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.ingressRate = optCfg.ingressRateValue; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_BANDWIDTH_INGRESS, &qosNtfy); PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_INGRESS_REACH, portStr); } } else { /*bc trap & notify*/ if (optCfg.bcRate && QOS_RATE_MODE_PPS != optCfg.rateMode && (rateDiff.rxbyteDiff > bcVal)&&(QOS_RATE_ADJUST_PAR * rateDiff.bcNumDiff >= bcVal)) { double factor = 1; int packet_length = rateDiff.rxbyteDiff/rateDiff.bcNumDiff; AD_QOS_RATE_ADJUST_BY_PACKET_LENGTH(factor, packet_length); QOS_DEBUG_COMMON("factor %4f, rateValNew.rxbyteDiff %d",factor,rateDiff.rxbyteDiff); if(rateDiff.rxbyteDiff >= factor * bcVal) { shutdownFlag = TRUE; if (l_bcLogEnable) { //QOS_TODO: snmp trap、controller log f_bcLogEnable = TRUE; QDW("bc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.bcastRate = optCfg.bcRate; qosNtfy.bcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_BCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_BC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_BCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Broadcast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } } if (optCfg.bcRate && QOS_RATE_MODE_PPS == optCfg.rateMode && rateDiff.bcNumDiff >= bcVal) { shutdownFlag = TRUE; if (l_bcLogEnable) { //QOS_TODO: snmp trap、controller log f_bcLogEnable = TRUE; QDW("bc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.bcastRate = optCfg.bcRate; qosNtfy.bcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_BCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_BC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_BCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Broadcast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } /*mc trap & notify*/ if (optCfg.mcRate && QOS_RATE_MODE_PPS != optCfg.rateMode && (rateDiff.rxbyteDiff > mcVal) && (QOS_RATE_ADJUST_PAR * rateDiff.mcNumDiff >= mcVal)) { double factor = 1; int packet_length = rateDiff.rxbyteDiff/rateDiff.mcNumDiff; AD_QOS_RATE_ADJUST_BY_PACKET_LENGTH(factor, packet_length); QOS_DEBUG_COMMON("factor %4f, rateValNew.rxbyteDiff %d",factor,rateDiff.rxbyteDiff); if(rateDiff.rxbyteDiff >= factor * mcVal) { shutdownFlag = TRUE; if (l_mcLogEnable) { //QOS_TODO: snmp trap、controller log f_mcLogEnable = TRUE; QDW("mc exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.mcastRate = optCfg.mcRate; qosNtfy.mcastMode = optCfg.rateMode; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_STORM_CTRL_MCAST, &qosNtfy); stateQosPortStormOccursSet(physicalPort, QOS_RATE_STORM_MODE_MC, TRUE); if (optCfg.stormLogging) { PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_MCSTORM_CONTROL_REACH, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_DETECTED, OMADA_KEY_OSW_STORM, OMD_ALERT_REPORT, portStr, (ULONG)"Multicast", (ULONG)macStr, (ULONG)portStr, 0, 0, 0); } } } } } if (optCfg.egressRateValue && rateDiff.txbyteDiff > egressVal) { if (l_egressLogEnable) { //QOS_TODO: snmp trap、syslog、controller log f_egressLogEnable = TRUE; QDW("egress exceed:%d",UP_PORT(physicalPort)); memset(&qosNtfy, 0, sizeof(qosNtfy)); qosNtfy.physicalPort = physicalPort; qosNtfy.egressRate = optCfg.egressRateValue; stateQosSnmpTrapSet(QOS_SNMP_TRAP_TYPE_BANDWIDTH_EGRESS, &qosNtfy); PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_EGRESS_REACH, portStr); } } /*if port belong to a LAG, the optCfg is LAG rate Config*/ if (optCfg.stormOper == QOS_STORM_EXCEED_SHUTDOWN && shutdownFlag /* && portStatus */) { QOS_DEBUG("QOS_STORM_EXCEED_SHUTDOWN"); shutdownFlag = FALSE; adQosSetPortState(physicalPort, DISABLE); stateQosPortBlockStatusSet(physicalPort, ENABLE); PORT_UP2STR(physicalPort, portStr); QOS_ADD_LOG_ONE_PARA(LOG_QOS_PORT_STORM_CONTROL_SHUTDOWN, portStr); syslogAdd_omada(QOS_LOG_MODULE_NAME, LOG_OMADA_STORM_SHUTDOWN, OMADA_KEY_OSW_PB, OMD_ALERT_REPORT, portStr, (ULONG)macStr, (ULONG)portStr, 0, 0, 0, 0); //QOS_TODO:堆叠时,向master发送notify更新block信息 if (optCfg.recoverTime) { if (UP_IS_LAG(logicPort)) dataQosRcvrTimerIdLagGet(physicalPort,&recoverTimer); else dataQosRcvrTimerIdPhyGet(logicPort,&recoverTimer); /*add timer, LAG member set their own logic timer ID: check the timer value, if not 0, LAG has a timer*/ /* controller独有bug,定时器存在,需删除*/ if (TIMER_ID_IS_VALID(recoverTimer)) { DEL_TIMER(recoverTimer); } timer.tv_sec = optCfg.recoverTime; timer.tv_nsec = 0; user_port upArr[2] = {}; upArr[0] = physicalPort; upArr[1] = logicPort; usUp2Str(upArr[0],strUp,UP_STR_BRF_PRFX); snprintf(timerName, sizeof(timerName), "qosRecoverTime:%s",strUp); if (UP_IS_LAG(logicPort)) { recoverTimer = add_timer(timerName, &timer, _qosRateRecoverTimerNotify, upArr, sizeof(upArr), EXECUTE_SINGLE); if (TIMER_ID_IS_VALID(recoverTimer)) dataQosRcvrTimerIdLagSet(physicalPort, recoverTimer); } else { recoverTimer = add_timer(timerName, &timer, _qosRateRecoverTimerNotify, upArr, sizeof(upArr), EXECUTE_SINGLE); if (TIMER_ID_IS_VALID(recoverTimer)) dataQosRcvrTimerIdPhySet(physicalPort, recoverTimer); } } } if(f_ingressLogEnable){ l_ingressLogEnable = FALSE; f_ingressLogEnable = FALSE; } if(f_egressLogEnable){ l_egressLogEnable = FALSE; f_egressLogEnable = FALSE; } if(f_bcLogEnable){ l_bcLogEnable = FALSE; f_bcLogEnable = FALSE; } if(f_mcLogEnable){ l_mcLogEnable = FALSE; f_mcLogEnable = FALSE; } } } return ret; } 其中,代码1在第二次广播风暴后关闭端口后无法开启,而代码2在第二次广播风暴后关闭端口在恢复时间后开启,试分析原因,并给出详细解决方案
最新发布
11-26
### 协程句柄的创建与 `from_promise` 方法详解 在 C++20 中,协程(coroutine)提供了一种灵活的方式来定义异步或惰性求值的函数。为了管理协程的状态和行为,C++ 标准库提供了 `std::coroutine_handle` 类型,用于操作协程的底层控制流[^1]。 #### 协程句柄的基本概念 `std::coroutine_handle` 是一个轻量级的对象,用来引用正在执行的协程实例。它允许开发者手动恢复、销毁或者检查协程的状态。协程句柄通常通过协程的 `promise_type` 来获取,而 `from_promise` 是其中的关键方法之一[^1]。 #### 从 promise 对象创建协程句柄 每个协程都有一个与之关联的 promise 对象,该对象负责存储协程的返回值以及异常处理逻辑。当协程被调用时,编译器会自动生成这个 promise 实例,并将其绑定到协程的上下文中。要获取指向该协程的句柄,可以使用 `std::coroutine_handle::from_promise()` 函数模板[^1]。 此方法接受对 promise 对象的引用作为参数,并返回对应的协程句柄: ```cpp template<typename Promise> static coroutine_handle<Promise> coroutine_handle<Promise>::from_promise(Promise& promise) noexcept; ``` 这意味着只要持有 promise 的引用,就可以直接访问其所属的协程句柄。这一机制对于实现自定义的协程调度逻辑非常有用,例如在异步 I/O 操作完成后自动恢复协程执行等场景[^1]。 #### 使用示例 下面是一个简单的例子,展示了如何利用 `from_promise` 获取协程句柄并对其进行基本的操作: ```cpp #include <coroutine> #include <iostream> struct MyCoroutine { struct promise_type { MyCoroutine get_return_object() { return {std::coroutine_handle<promise_type>::from_promise(*this)}; } std::suspend_always initial_suspend() { return {}; } std::suspend_always final_suspend() noexcept { return {}; } void return_void() {} void unhandled_exception() {} }; std::coroutine_handle<promise_type> handle; explicit MyCoroutine(std::coroutine_handle<promise_type> h) : handle(h) {} }; MyCoroutine my_coroutine() { co_await std::suspend_always{}; } int main() { auto coro = my_coroutine(); std::cout << "Coroutine is done: " << coro.handle.done() << std::endl; if (!coro.handle.done()) { coro.handle.resume(); // Resume the coroutine } coro.handle.destroy(); // Clean up the coroutine state } ``` 在这个示例中,`MyCoroutine` 结构体包含了一个 `std::coroutine_handle` 成员变量,它通过 `get_return_object()` 方法由 promise 对象构造而来。这样做的目的是让外部代码能够方便地管理和操作协程生命周期[^1]。 #### 总结 `std::coroutine_handle::from_promise` 提供了一种高效且安全的方式来获取与特定 promise 相关联的协程句柄。这对于构建高级别的异步编程模型至关重要。理解如何正确使用这项技术可以帮助开发者更好地掌握现代 C++ 中的并发编程技巧[^1]。 ---
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值