Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
rte_eal_paging.h(3)		     DPDK		   rte_eal_paging.h(3)

NAME
       rte_eal_paging.h

SYNOPSIS
       #include	<stdint.h>
       #include	<rte_compat.h>

   Enumerations
       enum rte_mem_prot { RTE_PROT_READ = 1 <<	0, RTE_PROT_WRITE = 1 << 1,
	   RTE_PROT_EXECUTE = 1	<< 2 }
       enum rte_map_flags { RTE_MAP_SHARED = 1 << 0, RTE_MAP_ANONYMOUS = 1 <<
	   1, RTE_MAP_PRIVATE =	1 << 2,	RTE_MAP_FORCE_ADDRESS =	1 << 3,
	   RTE_MAP_FORCE_ADDRESS_NOREPLACE = 1 << 4 }

   Functions
       __rte_internal void * rte_mem_map (void *requested_addr,	size_t size,
	   int prot, int flags,	int fd,	uint64_t offset)
       __rte_internal int rte_mem_unmap	(void *virt, size_t size)
       __rte_internal size_t rte_mem_page_size (void)
       __rte_internal int rte_mem_lock (const void *virt, size_t size)

Enumeration Type Documentation
   enum	rte_mem_prot
       Memory protection flags.

       Enumerator

       RTE_PROT_READ
	      Read access.

       RTE_PROT_WRITE
	      Write access.

       RTE_PROT_EXECUTE
	      Code execution.

       Definition at line 20 of	file rte_eal_paging.h.

   enum	rte_map_flags
       Additional flags	for memory mapping.

       Enumerator

       RTE_MAP_SHARED
	      Changes to the mapped memory are visible to other	processes.

       RTE_MAP_ANONYMOUS
	      Mapping is not backed by a regular file.

       RTE_MAP_PRIVATE
	      Copy-on-write mapping, changes are invisible to other processes.

       RTE_MAP_FORCE_ADDRESS
	      Force mapping to the requested address. This flag	should be used
	      with  caution, because to	fulfill	the request implementation may
	      remove all other mappings	in the requested region.  However,  it
	      is not required to do so,	thus mapping with this flag may	fail.

       RTE_MAP_FORCE_ADDRESS_NOREPLACE
	      Force   mapping	to  the	 requested  address,  but  fail	 if  a
	      preexisting mapping collides with	the request.

       Definition at line 27 of	file rte_eal_paging.h.

Function Documentation
   __rte_internal void * rte_mem_map (void * requested_addr, size_t size,  int
       prot, int flags,	int fd,	uint64_t offset)
       Map a portion of	an opened file or the page file	into memory.

       This  function  is  similar  to POSIX mmap(3) with common MAP_ANONYMOUS
       extension, except for the return	value.

       Parameters
	   requested_addr Desired virtual address for mapping. Can be NULL  to
	   let OS choose.
	   size	Size of	the mapping in bytes.
	   prot	Protection flags, a combination	of rte_mem_prot	values.
	   flags Additional mapping flags, a combination of rte_map_flags.
	   fd Mapped file descriptor. Can be negative for anonymous mapping.
	   offset  Offset  of the mapped region	in fd. Must be 0 for anonymous
	   mappings.

       Returns
	   Mapped address or NULL on failure and rte_errno is set to OS	error.

   __rte_internal int rte_mem_unmap (void * virt, size_t size)
       OS-independent implementation of	POSIX munmap(3).

   __rte_internal size_t rte_mem_page_size (void)
       Get system page size. This function never fails.

       Returns
	   Page	size in	bytes.

   __rte_internal int rte_mem_lock (const void * virt, size_t size)
       Lock in physical	memory all pages crossed by the	address	region.

       Parameters
	   virt	Base virtual address of	the region.
	   size	Size of	the region.

       Returns
	   0 on	success, negative on error.

       See also
	   rte_mem_page_size() to retrieve the page size.

	   rte_mem_lock_page() to lock an entire single	page.

Author
       Generated automatically by Doxygen for DPDK from	the source code.

Version	25.11.0			Thu Jun	11 2026		   rte_eal_paging.h(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=RTE_MAP_SHARED&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help