trace: add memory tracepoints
[dpdk.git] / lib / librte_eal / common / eal_private.h
index 31eae22..ecf8279 100644 (file)
 #include <stdio.h>
 
 #include <rte_dev.h>
+#include <rte_lcore.h>
+
+/**
+ * Structure storing internal configuration (per-lcore)
+ */
+struct lcore_config {
+       pthread_t thread_id;       /**< pthread identifier */
+       int pipe_master2slave[2];  /**< communication pipe with master */
+       int pipe_slave2master[2];  /**< communication pipe with master */
+
+       lcore_function_t * volatile f; /**< function to call */
+       void * volatile arg;       /**< argument of function */
+       volatile int ret;          /**< return value of function */
+
+       volatile enum rte_lcore_state_t state; /**< lcore state */
+       unsigned int socket_id;    /**< physical socket id for this lcore */
+       unsigned int core_id;      /**< core number on socket for this lcore */
+       int core_index;            /**< relative index, starting from 0 */
+       uint8_t core_role;         /**< role of core eg: OFF, RTE, SERVICE */
+
+       rte_cpuset_t cpuset;       /**< cpu set which the lcore affinity to */
+};
+
+extern struct lcore_config lcore_config[RTE_MAX_LCORE];
+
+/**
+ * The global RTE configuration structure.
+ */
+struct rte_config {
+       uint32_t master_lcore;       /**< Id of the master lcore */
+       uint32_t lcore_count;        /**< Number of available logical cores. */
+       uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
+       uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nodes. */
+       uint32_t service_lcore_count;/**< Number of available service cores. */
+       enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. */
+
+       /** Primary or secondary configuration */
+       enum rte_proc_type_t process_type;
+
+       /** PA or VA mapping mode */
+       enum rte_iova_mode iova_mode;
+
+       /**
+        * Pointer to memory configuration, which may be shared across multiple
+        * DPDK instances
+        */
+       struct rte_mem_config *mem_config;
+} __rte_packed;
+
+/**
+ * Get the global configuration structure.
+ *
+ * @return
+ *   A pointer to the global configuration structure.
+ */
+struct rte_config *rte_eal_get_configuration(void);
 
 /**
  * Initialize the memzone subsystem (private to eal).
@@ -387,4 +443,9 @@ rte_option_usage(void);
 uint64_t
 eal_get_baseaddr(void);
 
+void *
+eal_malloc_no_trace(const char *type, size_t size, unsigned int align);
+
+void eal_free_no_trace(void *addr);
+
 #endif /* _EAL_PRIVATE_H_ */