Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
vnic_rq.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_rq_ctrl
 
struct  vnic_rq_buf
 
struct  vnic_rq
 

Macros

#define VNIC_RQ_BUF_MIN_BLK_ENTRIES   32
 
#define VNIC_RQ_BUF_DFLT_BLK_ENTRIES   64
 
#define VNIC_RQ_BUF_BLK_ENTRIES(entries)
 
#define VNIC_RQ_BUF_BLK_SZ(entries)   (VNIC_RQ_BUF_BLK_ENTRIES(entries) * sizeof(struct vnic_rq_buf))
 
#define VNIC_RQ_BUF_BLKS_NEEDED(entries)   DIV_ROUND_UP(entries, VNIC_RQ_BUF_BLK_ENTRIES(entries))
 
#define VNIC_RQ_BUF_BLKS_MAX   VNIC_RQ_BUF_BLKS_NEEDED(4096)
 
#define VNIC_RQ_RETURN_RATE   0xf /* keep 2^n - 1 */
 

Enumerations

enum  desc_return_options { VNIC_RQ_RETURN_DESC, VNIC_RQ_DEFER_RETURN_DESC, VNIC_RQ_RETURN_DESC, VNIC_RQ_DEFER_RETURN_DESC }
 

Functions

void vnic_rq_free (struct vnic_rq *rq)
 
int vnic_rq_alloc (struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index, unsigned int desc_count, unsigned int desc_size)
 
void vnic_rq_init (struct vnic_rq *rq, unsigned int cq_index, unsigned int error_interrupt_enable, unsigned int error_interrupt_offset)
 
unsigned int vnic_rq_error_status (struct vnic_rq *rq)
 
void vnic_rq_enable (struct vnic_rq *rq)
 
int vnic_rq_disable (struct vnic_rq *rq)
 
void vnic_rq_clean (struct vnic_rq *rq, void(*buf_clean)(struct vnic_rq *rq, struct vnic_rq_buf *buf))
 

Macro Definition Documentation

#define VNIC_RQ_BUF_BLK_ENTRIES (   entries)
Value:
VNIC_RQ_BUF_MIN_BLK_ENTRIES : VNIC_RQ_BUF_DFLT_BLK_ENTRIES))

Definition at line 58 of file vnic_rq.h.

#define VNIC_RQ_BUF_BLK_SZ (   entries)    (VNIC_RQ_BUF_BLK_ENTRIES(entries) * sizeof(struct vnic_rq_buf))

Definition at line 61 of file vnic_rq.h.

#define VNIC_RQ_BUF_BLKS_MAX   VNIC_RQ_BUF_BLKS_NEEDED(4096)

Definition at line 65 of file vnic_rq.h.

#define VNIC_RQ_BUF_BLKS_NEEDED (   entries)    DIV_ROUND_UP(entries, VNIC_RQ_BUF_BLK_ENTRIES(entries))

Definition at line 63 of file vnic_rq.h.

#define VNIC_RQ_BUF_DFLT_BLK_ENTRIES   64

Definition at line 57 of file vnic_rq.h.

#define VNIC_RQ_BUF_MIN_BLK_ENTRIES   32

Definition at line 56 of file vnic_rq.h.

#define VNIC_RQ_RETURN_RATE   0xf /* keep 2^n - 1 */

Enumeration Type Documentation

Enumerator:
VNIC_RQ_RETURN_DESC 
VNIC_RQ_DEFER_RETURN_DESC 
VNIC_RQ_RETURN_DESC 
VNIC_RQ_DEFER_RETURN_DESC 

Definition at line 149 of file vnic_rq.h.

Function Documentation

int vnic_rq_alloc ( struct vnic_dev vdev,
struct vnic_rq rq,
unsigned int  index,
unsigned int  desc_count,
unsigned int  desc_size 
)

Definition at line 87 of file vnic_rq.c.

void vnic_rq_clean ( struct vnic_rq rq,
void(*)(struct vnic_rq *rq, struct vnic_rq_buf *buf buf_clean 
)

Definition at line 188 of file vnic_rq.c.

int vnic_rq_disable ( struct vnic_rq rq)

Definition at line 170 of file vnic_rq.c.

void vnic_rq_enable ( struct vnic_rq rq)

Definition at line 165 of file vnic_rq.c.

unsigned int vnic_rq_error_status ( struct vnic_rq rq)

Definition at line 160 of file vnic_rq.c.

void vnic_rq_free ( struct vnic_rq rq)

Definition at line 68 of file vnic_rq.c.

void vnic_rq_init ( struct vnic_rq rq,
unsigned int  cq_index,
unsigned int  error_interrupt_enable,
unsigned int  error_interrupt_offset 
)

Definition at line 140 of file vnic_rq.c.