eal: emit warning for unused trylock return value
[dpdk.git] / lib / eal / include / rte_memory.h
index c68b9d5..68b069f 100644 (file)
@@ -19,6 +19,7 @@
 extern "C" {
 #endif
 
+#include <rte_bitops.h>
 #include <rte_common.h>
 #include <rte_compat.h>
 #include <rte_config.h>
@@ -37,11 +38,14 @@ extern "C" {
 
 #define SOCKET_ID_ANY -1                    /**< Any NUMA socket. */
 
+/** Prevent this segment from being freed back to the OS. */
+#define RTE_MEMSEG_FLAG_DO_NOT_FREE RTE_BIT32(0)
+/** This segment is not filled with zeros. */
+#define RTE_MEMSEG_FLAG_DIRTY RTE_BIT32(1)
+
 /**
  * Physical memory segment descriptor.
  */
-#define RTE_MEMSEG_FLAG_DO_NOT_FREE (1 << 0)
-/**< Prevent this segment from being freed back to the OS. */
 struct rte_memseg {
        rte_iova_t iova;            /**< Start IO address. */
        RTE_STD_C11
@@ -553,22 +557,15 @@ unsigned rte_memory_get_nchannel(void);
 unsigned rte_memory_get_nrank(void);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Check if all currently allocated memory segments are compliant with
  * supplied DMA address width.
  *
  *  @param maskbits
  *    Address width to check against.
  */
-__rte_experimental
 int rte_mem_check_dma_mask(uint8_t maskbits);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Check if all currently allocated memory segments are compliant with
  * supplied DMA address width. This function will use
  * rte_memseg_walk_thread_unsafe instead of rte_memseg_walk implying
@@ -581,18 +578,13 @@ int rte_mem_check_dma_mask(uint8_t maskbits);
  *  @param maskbits
  *    Address width to check against.
  */
-__rte_experimental
 int rte_mem_check_dma_mask_thread_unsafe(uint8_t maskbits);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  *  Set dma mask to use once memory initialization is done. Previous functions
  *  rte_mem_check_dma_mask and rte_mem_check_dma_mask_thread_unsafe can not be
  *  used safely until memory has been initialized.
  */
-__rte_experimental
 void rte_mem_set_dma_mask(uint8_t maskbits);
 
 /**