FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
External region APIs
+ Collaboration diagram for External region APIs:

Typedefs

typedef uint32_t( memif_get_external_buffer_offset_t) (void *private_ctx)
 Get external buffer offset (optional) More...
 
typedef int( memif_add_external_region_t) (void **addr, uint32_t size, int *fd, void *private_ctx)
 Add external region. More...
 
typedef void *( memif_get_external_region_addr_t) (uint32_t size, int fd, void *private_ctx)
 Get external region address. More...
 
typedef int( memif_del_external_region_t) (void *addr, uint32_t size, int fd, void *private_ctx)
 Delete external region. More...
 

Functions

void memif_register_external_region (memif_add_external_region_t *ar, memif_get_external_region_addr_t *gr, memif_del_external_region_t *dr, memif_get_external_buffer_offset_t *go)
 Register external region. More...
 

Detailed Description

Typedef Documentation

typedef int( memif_add_external_region_t) (void **addr, uint32_t size, int *fd, void *private_ctx)

#include <extras/libmemif/src/libmemif.h>

Add external region.

Parameters
[out]addr- region address
size- requested region size
fd[out]- file descriptor
private_ctx- private context

Called by slave. Add external region created by client.

Definition at line 187 of file libmemif.h.

typedef int( memif_del_external_region_t) (void *addr, uint32_t size, int fd, void *private_ctx)

#include <extras/libmemif/src/libmemif.h>

Delete external region.

Parameters
addr- region address
size- region size
fd- file descriptor
private_ctx- private context

Delete external region.

Definition at line 210 of file libmemif.h.

typedef uint32_t( memif_get_external_buffer_offset_t) (void *private_ctx)

#include <extras/libmemif/src/libmemif.h>

Get external buffer offset (optional)

Parameters
private_ctx- private context

Find unallocated external buffer and return its offset.

Definition at line 177 of file libmemif.h.

typedef void*( memif_get_external_region_addr_t) (uint32_t size, int fd, void *private_ctx)

#include <extras/libmemif/src/libmemif.h>

Get external region address.

Parameters
size- requested region size
fd- file descriptor
private_ctx- private context

Called by master. Get region address from client.

Returns
region address

Definition at line 199 of file libmemif.h.

Function Documentation

#include <extras/libmemif/src/libmemif.h>

Register external region.

Parameters
ar- add external region callback
gr- get external region addr callback
dr- delete external region callback
go- get external buffer offset callback (optional)

Definition at line 421 of file main.c.

+ Here is the caller graph for this function: