FreeBSD kernel BXE device code
ecore_credit_pool_obj Struct Reference

#include <ecore_sp.h>

Data Fields

ecore_atomic_t credit
 
int pool_sz
 
uint64_t pool_mirror [ECORE_POOL_VEC_SIZE]
 
int base_pool_offset
 
bool(* get_entry )(struct ecore_credit_pool_obj *o, int *entry)
 
bool(* put_entry )(struct ecore_credit_pool_obj *o, int entry)
 
bool(* get )(struct ecore_credit_pool_obj *o, int cnt)
 
bool(* put )(struct ecore_credit_pool_obj *o, int cnt)
 
int(* check )(struct ecore_credit_pool_obj *o)
 

Detailed Description

Definition at line 1109 of file ecore_sp.h.

Field Documentation

◆ base_pool_offset

int ecore_credit_pool_obj::base_pool_offset

◆ check

int(* ecore_credit_pool_obj::check) (struct ecore_credit_pool_obj *o)

Reads the current amount of credit.

Definition at line 1163 of file ecore_sp.h.

Referenced by ecore_init_credit_pool().

◆ credit

ecore_atomic_t ecore_credit_pool_obj::credit

◆ get

bool(* ecore_credit_pool_obj::get) (struct ecore_credit_pool_obj *o, int cnt)

Get the requested amount of credit from the pool.

Parameters
cntAmount of requested credit
Returns
TRUE if the operation is successful

Definition at line 1150 of file ecore_sp.h.

Referenced by ecore_get_credit_mac(), ecore_get_credit_vlan(), ecore_get_credit_vlan_mac(), ecore_init_credit_pool(), and ecore_put_credit_vlan_mac().

◆ get_entry

bool(* ecore_credit_pool_obj::get_entry) (struct ecore_credit_pool_obj *o, int *entry)

Get the next free pool entry.

Returns
TRUE if there was a free entry in the pool

Definition at line 1134 of file ecore_sp.h.

Referenced by ecore_get_cam_offset_mac(), ecore_get_cam_offset_vlan(), and ecore_init_credit_pool().

◆ pool_mirror

uint64_t ecore_credit_pool_obj::pool_mirror[ECORE_POOL_VEC_SIZE]

◆ pool_sz

int ecore_credit_pool_obj::pool_sz

◆ put

bool(* ecore_credit_pool_obj::put) (struct ecore_credit_pool_obj *o, int cnt)

Returns the credit to the pool.

Parameters
cntAmount of credit to return
Returns
TRUE if the operation is successful

Definition at line 1158 of file ecore_sp.h.

Referenced by ecore_get_credit_vlan_mac(), ecore_init_credit_pool(), ecore_put_credit_mac(), ecore_put_credit_vlan(), and ecore_put_credit_vlan_mac().

◆ put_entry

bool(* ecore_credit_pool_obj::put_entry) (struct ecore_credit_pool_obj *o, int entry)

Return the entry back to the pool.

Returns
TRUE if entry is legal and has been successfully returned to the pool.

Definition at line 1142 of file ecore_sp.h.

Referenced by ecore_init_credit_pool(), ecore_put_cam_offset_mac(), and ecore_put_cam_offset_vlan().


The documentation for this struct was generated from the following file: