]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/lib/librte_eal/common/eal_private.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_eal / common / eal_private.h
index 798ede553b2170177c6a381742bce8e79e79fd1c..869ce183ad6b1d44c8b9b39d9cc1204a18e0d3fa 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).
@@ -354,31 +410,14 @@ int
 dev_sigbus_handler_unregister(void);
 
 /**
- * Check if the option is registered.
- *
- * @param option
- *  The option to be parsed.
- *
- * @return
- *  0 on success
- * @return
- *  -1 on fail
+ * Get OS-specific EAL mapping base address.
  */
-int
-rte_option_parse(const char *opt);
+uint64_t
+eal_get_baseaddr(void);
 
-/**
- * Iterate through the registered options and execute the associated
- * callback if enabled.
- */
-void
-rte_option_init(void);
+void *
+eal_malloc_no_trace(const char *type, size_t size, unsigned int align);
 
-/**
- * Iterate through the registered options and show the associated
- * usage string.
- */
-void
-rte_option_usage(void);
+void eal_free_no_trace(void *addr);
 
 #endif /* _EAL_PRIVATE_H_ */