rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr; /* store address of the config in the config itself so that secondary * processes could later map the config into this exact location */ rte_config.mem_config->mem_cfg_addr = (uintptr_t) rte_mem_cfg_addr; ...
{ RTE_LOG(ERR, EAL, "Could not open /dev/zero\n"); goto error; } //打开文件 /var/run/.rte_hugepage_info fd_hugepage = open(eal_hugepage_info_path(), O_RDONLY); if (fd_hugepage < 0) { RTE_LOG(ERR, EAL, "Could not open %s\n", eal_hugepage_info_path()); goto ...
函数返回最后计算对齐后的obj的大小,为后面分配空间提供依据。然后分配了一个mempool队列条目,为后面挂接在队列做准备。 /* try to allocate tailq entry */te = rte_zmalloc("MEMPOOL_TAILQ_ENTRY", sizeof(*te), 0);if (te == NULL) {RTE_LOG(ERR, MEMPOOL, "Cannot allocate tailq entry!\n");goto...
/* store address of the config in the config itself so that secondary * processes could later map the config into this exact location */ rte_config.mem_config->mem_cfg_addr = (uintptr_t) rte_mem_cfg_addr; 填充映射后的地址,这里最后一句比较有意思,把primary进程中映射的地址保存下来,后面我...
hpi->hugedir = get_hugepage_dir(hpi->hugepage_sz);//如果对应hugepage_sz的挂载点,则跳过此种类型大页/* first, check if we have a mountpoint */if (hpi->hugedir == NULL) {uint32_t num_pages;num_pages = get_num_hugepages(dirent->d_name);if (num_pages > 0)RTE_LOG(NOTICE, ...
RTE_LOG(ERR, EAL,"%s(): Cannot scan PCI bus\n", __func__);return-1; } #ifdef VFIO_PRESENT pci_vfio_enable();if(pci_vfio_is_enabled()) {/*if we are primary process, create a thread to communicate with * secondary processes. the thread will use a socket to wait for ...
* processes could later map the config into this exact location */ rte_config.mem_config->mem_cfg_addr = (uintptr_t) rte_mem_cfg_addr; rte_config.mem_config->dma_maskbits = 0; 1. 2. 3. 4. 5. 6. 7. 8. 2.7.2 eal_update_mem_config ...
layout(location=1)invec3 color;// 输入颜色 outvec3 fragColor;// 输出到片段着色器的颜色 voidmain(){ gl_Position=vec4(position,1.0);// 设置裁剪坐标 fragColor=color;// 将颜色传递给片段着色器 } 片段着色器 (Fragment Shader) #version 330 core ...
GLcharinfoLog[512]; glGetShaderInfoLog(shader,sizeof(infoLog),nullptr,infoLog); std::cerr<<"ERROR::SHADER::COMPILATION_FAILED\n"<<infoLog<<std::endl; return0;// Return 0 on error } returnshader; } // Function to create shader program ...
*/ int rte_openlog_stream(FILE *f); 5、设计日志打印级别 void rte_set_log_level(uint32_t level); 6、使能某个日志类型,使能之后,可以记录该类型的日志信息。 void rte_set_log_type(uint32_t type, int enable); 7、取得当前核中刚刚处理的日志消息类型和级别每个核处理日志消息时,会记录本该消息...