各位专家大侠,小弟在插入内存区时,返回-135,不知是什么错误,求指教。
James Li2:
原因可能是你实际配置的描述符个数超出了你之前配置的最大描述符个数。
你可以把QMSS driver的souce code加到你的工程编译然后debug进去。下面是QMSS driver的摘录和分析
#define QMSS_SOK 0/** QMSS Error Base */ #define QMSS_LLD_EBASE (-128)/** QMSS LLD invalid parameter */#define QMSS_INVALID_PARAM QMSS_LLD_EBASE-1/** QMSS LLD not initialized */#define QMSS_NOT_INITIALIZED QMSS_LLD_EBASE-2/** QMSS LLD queue open error */#define QMSS_QUEUE_OPEN_ERROR QMSS_LLD_EBASE-3/** QMSS memory region not initialized */#define QMSS_MEMREGION_NOT_INITIALIZED QMSS_LLD_EBASE-4/** QMSS memory region already initialized */#define QMSS_MEMREGION_ALREADY_INITIALIZED QMSS_LLD_EBASE-5/** QMSS memory region invalid parameter */#define QMSS_MEMREGION_INVALID_PARAM QMSS_LLD_EBASE-6/** QMSS maximum number of allowed descriptor are already configured */#define QMSS_MAX_DESCRIPTORS_CONFIGURED QMSS_LLD_EBASE-7
/* Check if maximum descriptors already configured */ if (qmssGObj.obj.currDescCnt + memRegCfg->descNum > qmssGObj.obj.initCfg.maxDescNum) { result = QMSS_MAX_DESCRIPTORS_CONFIGURED; goto exitCs; /* common exit to close CsEnter and MemAccess */ }
Ping Li3:
如果你使用具体的mem_region号,会不会是mem_region的index和start_index配合不对,我有过一次经验而已