Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
vnic_wq.h File Reference
#include <linux/pci.h>
#include "vnic_dev.h"
#include "vnic_cq.h"

Go to the source code of this file.

Data Structures

struct  vnic_wq_ctrl
 
struct  vnic_wq_buf
 
struct  vnic_wq
 

Macros

#define VNIC_WQ_BUF_MIN_BLK_ENTRIES   32
 
#define VNIC_WQ_BUF_DFLT_BLK_ENTRIES   64
 
#define VNIC_WQ_BUF_BLK_ENTRIES(entries)
 
#define VNIC_WQ_BUF_BLK_SZ(entries)   (VNIC_WQ_BUF_BLK_ENTRIES(entries) * sizeof(struct vnic_wq_buf))
 
#define VNIC_WQ_BUF_BLKS_NEEDED(entries)   DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES(entries))
 
#define VNIC_WQ_BUF_BLKS_MAX   VNIC_WQ_BUF_BLKS_NEEDED(4096)
 

Functions

void vnic_wq_free (struct vnic_wq *wq)
 
int vnic_wq_alloc (struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index, unsigned int desc_count, unsigned int desc_size)
 
void vnic_wq_init (struct vnic_wq *wq, unsigned int cq_index, unsigned int error_interrupt_enable, unsigned int error_interrupt_offset)
 
unsigned int vnic_wq_error_status (struct vnic_wq *wq)
 
void vnic_wq_enable (struct vnic_wq *wq)
 
int vnic_wq_disable (struct vnic_wq *wq)
 
void vnic_wq_clean (struct vnic_wq *wq, void(*buf_clean)(struct vnic_wq *wq, struct vnic_wq_buf *buf))
 

Macro Definition Documentation

#define VNIC_WQ_BUF_BLK_ENTRIES (   entries)
Value:
VNIC_WQ_BUF_MIN_BLK_ENTRIES : VNIC_WQ_BUF_DFLT_BLK_ENTRIES))

Definition at line 66 of file vnic_wq.h.

#define VNIC_WQ_BUF_BLK_SZ (   entries)    (VNIC_WQ_BUF_BLK_ENTRIES(entries) * sizeof(struct vnic_wq_buf))

Definition at line 69 of file vnic_wq.h.

#define VNIC_WQ_BUF_BLKS_MAX   VNIC_WQ_BUF_BLKS_NEEDED(4096)

Definition at line 73 of file vnic_wq.h.

#define VNIC_WQ_BUF_BLKS_NEEDED (   entries)    DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES(entries))

Definition at line 71 of file vnic_wq.h.

#define VNIC_WQ_BUF_DFLT_BLK_ENTRIES   64

Definition at line 65 of file vnic_wq.h.

#define VNIC_WQ_BUF_MIN_BLK_ENTRIES   32

Definition at line 64 of file vnic_wq.h.

Function Documentation

int vnic_wq_alloc ( struct vnic_dev vdev,
struct vnic_wq wq,
unsigned int  index,
unsigned int  desc_count,
unsigned int  desc_size 
)

Definition at line 87 of file vnic_wq.c.

void vnic_wq_clean ( struct vnic_wq wq,
void(*)(struct vnic_wq *wq, struct vnic_wq_buf *buf buf_clean 
)

Definition at line 176 of file vnic_wq.c.

int vnic_wq_disable ( struct vnic_wq wq)

Definition at line 158 of file vnic_wq.c.

void vnic_wq_enable ( struct vnic_wq wq)

Definition at line 153 of file vnic_wq.c.

unsigned int vnic_wq_error_status ( struct vnic_wq wq)

Definition at line 148 of file vnic_wq.c.

void vnic_wq_free ( struct vnic_wq wq)

Definition at line 68 of file vnic_wq.c.

void vnic_wq_init ( struct vnic_wq wq,
unsigned int  cq_index,
unsigned int  error_interrupt_enable,
unsigned int  error_interrupt_offset 
)

Definition at line 139 of file vnic_wq.c.