struct internal_config {
volatile size_t memory; /*申请内存的数量*/
volatile unsigned force_nchannel; /**< force number of channels */
volatile unsigned force_nrank; /**< force number of ranks */
volatile unsigned no_hugetlbfs; /*是否使用hugetlb */
unsigned hugepage_unlink; /*是否删除hugepage文件 */
volatile unsigned no_pci; /**< true to disable PCI */
volatile unsigned no_hpet; /**< true to disable HPET */
volatile unsigned vmware_tsc_map; /**< true to use VMware TSC mapping
* instead of native TSC */
volatile unsigned no_shconf; /*是否允许共享,如果不允许共享,则配置不会更新到共享文件中*/
volatile unsigned in_memory;
/**< true if DPDK should operate entirely in-memory and not create any
* shared files or runtime data.
*/
volatile unsigned create_uio_dev; /**< true to create /dev/uioX devices */
volatile enum rte_proc_type_t process_type; /*进程类型*/
/** true to try allocating memory on specific sockets */
volatile unsigned force_sockets; //强制在指定的socket上分配内存
volatile uint64_t socket_mem[RTE_MAX_NUMA_NODES]; /*设置每个socket申请大页的个数*/
volatile unsigned force_socket_limits;//设置是否限制socket分配的内存
volatile uint64_t socket_limit[RTE_MAX_NUMA_NODES]; /*限制每个socket申请内存的数量*/
uintptr_t base_virtaddr; /*从指定虚地址分配内存*/
volatile unsigned legacy_mem; //是否是静态分配内存的方式
/**< true to enable legacy memory behavior (no dynamic allocation,
* IOVA-contiguous segments).
*/
volatile unsigned match_allocations;
/**< true to free hugepages exactly as allocated */
volatile unsigned single_file_segments;
/**< true if storing all pages within single files (per-page-size,
* per-node) non-legacy mode only.
*/
volatile int syslog_facility; /**< facility passed to openlog() */
/** default interrupt mode for VFIO */
volatile enum rte_intr_mode vfio_intr_mode;
char *hugefile_prefix; /*大页文件前缀,和大页设置有关*/
char *hugepage_dir; /*大页文件目录*/
char *user_mbuf_pool_ops_name;
/**< user defined mbuf pool ops name */
unsigned num_hugepage_sizes; /*系统支持大页的内存值,1M,2G等*/
struct hugepage_info hugepage_info1[MAX_HUGEPAGE_SIZES];/*用于保存大页的信息*/
enum rte_iova_mode iova_mode ; /**< Set IOVA mode on this system */
rte_cpuset_t ctrl_cpuset; /**< cpuset for ctrl threads */
volatile unsigned int init_complete;
/**< indicates whether EAL has completed initialization */
};
这次只是涉及内存相关的结构体,一边学习一边更新,后期涉及到后边的字段后再进行更新