ip_frag: add IPv4 options fragment
[dpdk.git] / lib / eal / include / rte_memory.h
index 4acb2a7..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
@@ -403,9 +407,6 @@ rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
                size_t *offset);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Register external memory chunk with DPDK.
  *
  * @note Using this API is mutually exclusive with ``rte_malloc`` family of
@@ -439,15 +440,11 @@ rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
  *     EEXIST - memory chunk is already registered
  *     ENOSPC - no more space in internal config to store a new memory chunk
  */
-__rte_experimental
 int
 rte_extmem_register(void *va_addr, size_t len, rte_iova_t iova_addrs[],
                unsigned int n_pages, size_t page_sz);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Unregister external memory chunk with DPDK.
  *
  * @note Using this API is mutually exclusive with ``rte_malloc`` family of
@@ -470,14 +467,10 @@ rte_extmem_register(void *va_addr, size_t len, rte_iova_t iova_addrs[],
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-__rte_experimental
 int
 rte_extmem_unregister(void *va_addr, size_t len);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Attach to external memory chunk registered in another process.
  *
  * @note Using this API is mutually exclusive with ``rte_malloc`` family of
@@ -497,14 +490,10 @@ rte_extmem_unregister(void *va_addr, size_t len);
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-__rte_experimental
 int
 rte_extmem_attach(void *va_addr, size_t len);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Detach from external memory chunk registered in another process.
  *
  * @note Using this API is mutually exclusive with ``rte_malloc`` family of
@@ -524,7 +513,6 @@ rte_extmem_attach(void *va_addr, size_t len);
  *     EINVAL - one of the parameters was invalid
  *     ENOENT - memory chunk was not found
  */
-__rte_experimental
 int
 rte_extmem_detach(void *va_addr, size_t len);
 
@@ -569,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
@@ -597,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);
 
 /**