dpdk internal_config讲解

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 */
};

这次只是涉及内存相关的结构体,一边学习一边更新,后期涉及到后边的字段后再进行更新

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值