Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
mpipe.h File Reference
#include <gxio/common.h>
#include <gxio/dma_queue.h>
#include <linux/time.h>
#include <arch/mpipe_def.h>
#include <arch/mpipe_shm.h>
#include <hv/drv_mpipe_intf.h>
#include <hv/iorpc.h>

Go to the source code of this file.

Data Structures

struct  gxio_mpipe_context_t
 
struct  gxio_mpipe_rules_t
 
struct  gxio_mpipe_iqueue_t
 
struct  gxio_mpipe_equeue_t
 
struct  gxio_mpipe_link_t
 

Typedefs

typedef MPIPE_PDESC_t gxio_mpipe_idesc_t
 
typedef MPIPE_EDMA_DESC_t gxio_mpipe_edesc_t
 
typedef gxio_mpipe_context_t gxio_mpipe_info_context_t
 

Enumerations

enum  gxio_mpipe_alloc_flags_e { GXIO_MPIPE_ALLOC_FIXED = HV_MPIPE_ALLOC_FIXED }
 
enum  gxio_mpipe_mem_flags_e { GXIO_MPIPE_MEM_FLAG_NT_HINT = IORPC_MEM_BUFFER_FLAG_NT_HINT, GXIO_MPIPE_MEM_FLAG_IO_PIN = IORPC_MEM_BUFFER_FLAG_IO_PIN }
 
enum  gxio_mpipe_buffer_size_enum_t {
  GXIO_MPIPE_BUFFER_SIZE_128 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_128, GXIO_MPIPE_BUFFER_SIZE_256 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_256, GXIO_MPIPE_BUFFER_SIZE_512 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_512, GXIO_MPIPE_BUFFER_SIZE_1024 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_1024,
  GXIO_MPIPE_BUFFER_SIZE_1664 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_1664, GXIO_MPIPE_BUFFER_SIZE_4096 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_4096, GXIO_MPIPE_BUFFER_SIZE_10368, GXIO_MPIPE_BUFFER_SIZE_16384 = MPIPE_BSM_INIT_DAT_1__SIZE_VAL_BSZ_16384
}
 
enum  gxio_mpipe_bucket_mode_t {
  GXIO_MPIPE_BUCKET_DYNAMIC_FLOW_AFFINITY, GXIO_MPIPE_BUCKET_STATIC_FLOW_AFFINITY, GXIO_MPIPE_BUCKET_ROUND_ROBIN, GXIO_MPIPE_BUCKET_STICKY_FLOW_LOCALITY,
  GXIO_MPIPE_BUCKET_PREFER_FLOW_LOCALITY
}
 

Functions

int gxio_mpipe_init (gxio_mpipe_context_t *context, unsigned int mpipe_instance)
 
int gxio_mpipe_destroy (gxio_mpipe_context_t *context)
 
int gxio_mpipe_alloc_buffer_stacks (gxio_mpipe_context_t *context, unsigned int count, unsigned int first, unsigned int flags)
 
gxio_mpipe_buffer_size_enum_t gxio_mpipe_buffer_size_to_buffer_size_enum (size_t size)
 
size_t gxio_mpipe_buffer_size_enum_to_buffer_size (gxio_mpipe_buffer_size_enum_t buffer_size_enum)
 
size_t gxio_mpipe_calc_buffer_stack_bytes (unsigned long buffers)
 
int gxio_mpipe_init_buffer_stack (gxio_mpipe_context_t *context, unsigned int stack, gxio_mpipe_buffer_size_enum_t buffer_size_enum, void *mem, size_t mem_size, unsigned int mem_flags)
 
int gxio_mpipe_alloc_notif_rings (gxio_mpipe_context_t *context, unsigned int count, unsigned int first, unsigned int flags)
 
int gxio_mpipe_init_notif_ring (gxio_mpipe_context_t *context, unsigned int ring, void *mem, size_t mem_size, unsigned int mem_flags)
 
int gxio_mpipe_request_notif_ring_interrupt (gxio_mpipe_context_t *context, int x, int y, int i, int e, unsigned int ring)
 
int gxio_mpipe_enable_notif_ring_interrupt (gxio_mpipe_context_t *context, unsigned int ring)
 
int gxio_mpipe_register_client_memory (gxio_mpipe_context_t *context, unsigned int iotlb, HV_PTE pte, unsigned int flags)
 
int gxio_mpipe_alloc_notif_groups (gxio_mpipe_context_t *context, unsigned int count, unsigned int first, unsigned int flags)
 
int gxio_mpipe_init_notif_group (gxio_mpipe_context_t *context, unsigned int group, gxio_mpipe_notif_group_bits_t bits)
 
int gxio_mpipe_alloc_buckets (gxio_mpipe_context_t *context, unsigned int count, unsigned int first, unsigned int flags)
 
int gxio_mpipe_init_bucket (gxio_mpipe_context_t *context, unsigned int bucket, gxio_mpipe_bucket_info_t bucket_info)
 
int gxio_mpipe_init_notif_group_and_buckets (gxio_mpipe_context_t *context, unsigned int group, unsigned int ring, unsigned int num_rings, unsigned int bucket, unsigned int num_buckets, gxio_mpipe_bucket_mode_t mode)
 
int gxio_mpipe_alloc_edma_rings (gxio_mpipe_context_t *context, unsigned int count, unsigned int first, unsigned int flags)
 
int gxio_mpipe_init_edma_ring (gxio_mpipe_context_t *context, unsigned int ring, unsigned int channel, void *mem, size_t mem_size, unsigned int mem_flags)
 
void gxio_mpipe_rules_init (gxio_mpipe_rules_t *rules, gxio_mpipe_context_t *context)
 
int gxio_mpipe_rules_begin (gxio_mpipe_rules_t *rules, unsigned int bucket, unsigned int num_buckets, gxio_mpipe_rules_stacks_t *stacks)
 
int gxio_mpipe_rules_set_headroom (gxio_mpipe_rules_t *rules, uint8_t headroom)
 
int gxio_mpipe_rules_add_channel (gxio_mpipe_rules_t *rules, unsigned int channel)
 
int gxio_mpipe_rules_commit (gxio_mpipe_rules_t *rules)
 
int gxio_mpipe_iqueue_init (gxio_mpipe_iqueue_t *iqueue, gxio_mpipe_context_t *context, unsigned int ring, void *mem, size_t mem_size, unsigned int mem_flags)
 
int gxio_mpipe_equeue_init (gxio_mpipe_equeue_t *equeue, gxio_mpipe_context_t *context, unsigned int edma_ring_id, unsigned int channel, void *mem, unsigned int mem_size, unsigned int mem_flags)
 
int gxio_mpipe_link_enumerate_mac (int index, char *link_name, uint8_t *mac_addr)
 
int gxio_mpipe_link_open (gxio_mpipe_link_t *link, gxio_mpipe_context_t *context, const char *link_name, unsigned int flags)
 
int gxio_mpipe_link_close (gxio_mpipe_link_t *link)
 
int gxio_mpipe_get_timestamp (gxio_mpipe_context_t *context, struct timespec *ts)
 
int gxio_mpipe_set_timestamp (gxio_mpipe_context_t *context, const struct timespec *ts)
 
int gxio_mpipe_adjust_timestamp (gxio_mpipe_context_t *context, int64_t delta)
 

Typedef Documentation

Definition at line 221 of file mpipe.h.

Definition at line 214 of file mpipe.h.

Definition at line 326 of file mpipe.h.

Enumeration Type Documentation

Enumerator:
GXIO_MPIPE_ALLOC_FIXED 

Definition at line 197 of file mpipe.h.

Enumerator:
GXIO_MPIPE_BUCKET_DYNAMIC_FLOW_AFFINITY 
GXIO_MPIPE_BUCKET_STATIC_FLOW_AFFINITY 
GXIO_MPIPE_BUCKET_ROUND_ROBIN 
GXIO_MPIPE_BUCKET_STICKY_FLOW_LOCALITY 
GXIO_MPIPE_BUCKET_PREFER_FLOW_LOCALITY 

Definition at line 671 of file mpipe.h.

Enumerator:
GXIO_MPIPE_BUFFER_SIZE_128 
GXIO_MPIPE_BUFFER_SIZE_256 
GXIO_MPIPE_BUFFER_SIZE_512 
GXIO_MPIPE_BUFFER_SIZE_1024 
GXIO_MPIPE_BUFFER_SIZE_1664 
GXIO_MPIPE_BUFFER_SIZE_4096 
GXIO_MPIPE_BUFFER_SIZE_10368 
GXIO_MPIPE_BUFFER_SIZE_16384 

Definition at line 374 of file mpipe.h.

Enumerator:
GXIO_MPIPE_MEM_FLAG_NT_HINT 
GXIO_MPIPE_MEM_FLAG_IO_PIN 

Definition at line 203 of file mpipe.h.

Function Documentation

int gxio_mpipe_adjust_timestamp ( gxio_mpipe_context_t context,
int64_t  delta 
)

Definition at line 453 of file mpipe.c.

int gxio_mpipe_alloc_buckets ( gxio_mpipe_context_t context,
unsigned int  count,
unsigned int  first,
unsigned int  flags 
)

Definition at line 226 of file iorpc_mpipe.c.

int gxio_mpipe_alloc_buffer_stacks ( gxio_mpipe_context_t context,
unsigned int  count,
unsigned int  first,
unsigned int  flags 
)

Definition at line 24 of file iorpc_mpipe.c.

int gxio_mpipe_alloc_edma_rings ( gxio_mpipe_context_t context,
unsigned int  count,
unsigned int  first,
unsigned int  flags 
)

Definition at line 268 of file iorpc_mpipe.c.

int gxio_mpipe_alloc_notif_groups ( gxio_mpipe_context_t context,
unsigned int  count,
unsigned int  first,
unsigned int  flags 
)

Definition at line 182 of file iorpc_mpipe.c.

int gxio_mpipe_alloc_notif_rings ( gxio_mpipe_context_t context,
unsigned int  count,
unsigned int  first,
unsigned int  flags 
)

Definition at line 83 of file iorpc_mpipe.c.

size_t gxio_mpipe_buffer_size_enum_to_buffer_size ( gxio_mpipe_buffer_size_enum_t  buffer_size_enum)

Definition at line 102 of file mpipe.c.

gxio_mpipe_buffer_size_enum_t gxio_mpipe_buffer_size_to_buffer_size_enum ( size_t  size)

Definition at line 90 of file mpipe.c.

size_t gxio_mpipe_calc_buffer_stack_bytes ( unsigned long  buffers)

Definition at line 113 of file mpipe.c.

int gxio_mpipe_destroy ( gxio_mpipe_context_t context)

Definition at line 78 of file mpipe.c.

int gxio_mpipe_enable_notif_ring_interrupt ( gxio_mpipe_context_t context,
unsigned int  ring 
)

Definition at line 161 of file iorpc_mpipe.c.

int gxio_mpipe_equeue_init ( gxio_mpipe_equeue_t equeue,
gxio_mpipe_context_t context,
unsigned int  edma_ring_id,
unsigned int  channel,
void mem,
unsigned int  mem_size,
unsigned int  mem_flags 
)

Definition at line 384 of file mpipe.c.

int gxio_mpipe_get_timestamp ( gxio_mpipe_context_t context,
struct timespec ts 
)

Definition at line 431 of file mpipe.c.

int gxio_mpipe_init ( gxio_mpipe_context_t context,
unsigned int  mpipe_instance 
)

Definition at line 32 of file mpipe.c.

int gxio_mpipe_init_bucket ( gxio_mpipe_context_t context,
unsigned int  bucket,
gxio_mpipe_bucket_info_t  bucket_info 
)

Definition at line 247 of file iorpc_mpipe.c.

int gxio_mpipe_init_buffer_stack ( gxio_mpipe_context_t context,
unsigned int  stack,
gxio_mpipe_buffer_size_enum_t  buffer_size_enum,
void mem,
size_t  mem_size,
unsigned int  mem_flags 
)

Definition at line 127 of file mpipe.c.

int gxio_mpipe_init_edma_ring ( gxio_mpipe_context_t context,
unsigned int  ring,
unsigned int  channel,
void mem,
size_t  mem_size,
unsigned int  mem_flags 
)

Definition at line 202 of file mpipe.c.

int gxio_mpipe_init_notif_group ( gxio_mpipe_context_t context,
unsigned int  group,
gxio_mpipe_notif_group_bits_t  bits 
)

Definition at line 204 of file iorpc_mpipe.c.

int gxio_mpipe_init_notif_group_and_buckets ( gxio_mpipe_context_t context,
unsigned int  group,
unsigned int  ring,
unsigned int  num_rings,
unsigned int  bucket,
unsigned int  num_buckets,
gxio_mpipe_bucket_mode_t  mode 
)

Definition at line 162 of file mpipe.c.

int gxio_mpipe_init_notif_ring ( gxio_mpipe_context_t context,
unsigned int  ring,
void mem,
size_t  mem_size,
unsigned int  mem_flags 
)

Definition at line 151 of file mpipe.c.

int gxio_mpipe_iqueue_init ( gxio_mpipe_iqueue_t iqueue,
gxio_mpipe_context_t context,
unsigned int  ring,
void mem,
size_t  mem_size,
unsigned int  mem_flags 
)

Definition at line 356 of file mpipe.c.

int gxio_mpipe_link_close ( gxio_mpipe_link_t link)

Definition at line 540 of file mpipe.c.

int gxio_mpipe_link_enumerate_mac ( int  index,
char link_name,
uint8_t mac_addr 
)

Definition at line 496 of file mpipe.c.

int gxio_mpipe_link_open ( gxio_mpipe_link_t link,
gxio_mpipe_context_t context,
const char link_name,
unsigned int  flags 
)

Definition at line 517 of file mpipe.c.

int gxio_mpipe_register_client_memory ( gxio_mpipe_context_t context,
unsigned int  iotlb,
HV_PTE  pte,
unsigned int  flags 
)

Definition at line 335 of file iorpc_mpipe.c.

int gxio_mpipe_request_notif_ring_interrupt ( gxio_mpipe_context_t context,
int  x,
int  y,
int  i,
int  e,
unsigned int  ring 
)

Definition at line 136 of file iorpc_mpipe.c.

int gxio_mpipe_rules_add_channel ( gxio_mpipe_rules_t rules,
unsigned int  channel 
)

Definition at line 305 of file mpipe.c.

int gxio_mpipe_rules_begin ( gxio_mpipe_rules_t rules,
unsigned int  bucket,
unsigned int  num_buckets,
gxio_mpipe_rules_stacks_t stacks 
)

Definition at line 224 of file mpipe.c.

int gxio_mpipe_rules_commit ( gxio_mpipe_rules_t rules)

Definition at line 346 of file mpipe.c.

void gxio_mpipe_rules_init ( gxio_mpipe_rules_t rules,
gxio_mpipe_context_t context 
)

Definition at line 215 of file mpipe.c.

int gxio_mpipe_rules_set_headroom ( gxio_mpipe_rules_t rules,
uint8_t  headroom 
)

Definition at line 328 of file mpipe.c.

int gxio_mpipe_set_timestamp ( gxio_mpipe_context_t context,
const struct timespec ts 
)

Definition at line 422 of file mpipe.c.