All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Static Public Member Functions | List of all members
CCaviumAccess Class Reference

#include <caviumaccess.h>

Collaboration diagram for CCaviumAccess:
Collaboration graph

Classes

struct  TCfgVlan
 
struct  TDestination
 
struct  TMac
 
struct  TNetDtls
 
struct  TNetEth
 
struct  TNetIp
 
struct  TNetIpv6
 
struct  TNetRtp
 
struct  TNetStun
 
struct  TNetTcp
 
struct  TNetUdp
 
struct  TNetVlan
 
struct  TNetVutp
 
struct  TPacketInfo
 
struct  TPhyStatus
 
struct  TTypeLength
 
struct  TVsnNet
 

Public Types

enum  EMaskType { MSK_VLAN = 0xFFF, MSK_RTP = 0x80, MSK_STUN = 0x00, MSK_UDP_TYPE = 0xC0 }
 
enum  EPacketType {
  PT_UNKNOWN = 0, PT_VLAN = 0x8100, PT_IP = 0x0800, PT_IPV6 = 0x86DD,
  PT_ARP = 0x0806, PT_ICMP = 0x01, PT_ICMP_REQUEST = 0x08, PT_ICMP_REPLY = 0x00,
  PT_TCP = 0x06, PT_UDP = 0x11, PT_VOCALLO_NET = 0x5200, PT_VSN_NET = 0x5201
}
 
enum  EPacketInfo {
  GC_NET_ETH_SIZE = sizeof(TNetEth), GC_NET_VLAN_SIZE = sizeof(TNetVlan), GC_NET_IP_SIZE = sizeof(TNetIp), GC_NET_IPV6_SIZE = sizeof(TNetIpv6),
  GC_NET_UDP_SIZE = sizeof(TNetUdp), GC_NET_RTP_SIZE = sizeof(TNetRtp), GC_NET_STUN_SIZE = sizeof(TNetStun), GC_NET_DTLS_SIZE = sizeof(TNetDtls),
  GC_NET_VUTP_SIZE = sizeof(TNetVutp), GC_NET_TCP_SIZE = sizeof(TNetTcp), GC_TYPE_LENGTH_SIZE = sizeof(TTypeLength)
}
 
enum  EVsnNetType { VNT_DIAGNOSTIC = 10, VNT_MESSAGE = 11 }
 

Static Public Member Functions

static void MacRead (TMac *ptMac, uint8_t *pucUcCount)
 
static bool SendPacket (cvmx_wqe_t *ptWork, uint32_t ulPort, uint32_t QueueSelector)
 
static bool SendPacket (cvmx_wqe_t *ptWork, uint32_t ulPort, TPacketInfo *ptPacketInfo=NULL, uint8_t ucResendId=0, bool bOverruleQueue=false, uint32_t ulQueueSelector=0)
 
static void SendNewPacket (unsigned char *pcPacketFPA, uint32_t ui32Len, int iPort, TPacketInfo *ptPacketInfo=NULL, bool bOverruleQueue=false, uint32_t ulQueueSelector=0)
 
static bool ForwardNewPacket (unsigned char *pcPacketFPA, uint32_t ui32Len, int iPort, uint32_t ulGroup, uint32_t ulTag=0, cvmx_pow_tag_type_t tTagType=CVMX_POW_TAG_TYPE_ORDERED, uint32_t ulUnused=0)
 
static void ForwardPacket (cvmx_wqe_t *ptWork)
 
static void DropPacket (cvmx_wqe_t *ptWork)
 
static void TagSwitch (uint32_t ulTag)
 
static uint8_t * GetMemPacketPool (void)
 
static void ReturnMemPacketPool (uint8_t *pBuffer)
 
static void ReturnMemPool (uint8_t *pBuffer, uint64_t uxPool)
 
static cvmx_wqe_t * GetMemWqePool (void)
 
static void ReturnMemWqePool (cvmx_wqe_t *ptWork)
 
static void VlanChange (uint16_t usVlanId, cvmx_wqe_t *ptWork, TPacketInfo *ptPacketInfo)
 
static void VlanAdd (cvmx_wqe_t *ptWork, TPacketInfo *ptPacketInfo, uint16_t usVlanId)
 
static void VlanRemove (cvmx_wqe_t *ptWork, TPacketInfo *ptPacketInfo)
 
static void VlanChange (uint16_t usVlanId, uint8_t *pucData, uint16_t usSize, TPacketInfo *ptPacketInfo, uint16_t *pusNewSize)
 
static void VlanAdd (uint8_t *pucData, uint16_t usSize, TPacketInfo *ptPacketInfo, uint16_t usVlanId, uint16_t *pusNewSize)
 
static void VlanAddAndMacChange (cvmx_wqe_t *ptWork, TPacketInfo *ptPacketInfo, uint16_t usVlanId, TMac tNewDstMac)
 
static void VlanRemove (uint8_t *pucData, uint16_t usSize, TPacketInfo *ptPacketInfo, uint16_t *pusNewSize)
 
static void CalcIpChecksum (TPacketInfo *ptPacketInfo)
 
static void GetPacketPointersOld (TPacketInfo *ptPacketInfo, uint8_t *pucBuffer, uint16_t usLength)
 
static void GetPacketPointers (TPacketInfo *ptPacketInfo, uint8_t *pucBuffer, uint16_t usLength)
 
static void SetPacketPointersEth (TPacketInfo *ptPacketInfo, uint8_t *pucBuffer, bool bVlan=false)
 
static void SetPacketPointersUdp (TPacketInfo *ptPacketInfo, uint8_t *pucBuffer, uint16_t usVlanId)
 
static void SetPacketPointersUdpIpV6 (TPacketInfo *ptPacketInfo, uint8_t *pucBuffer, uint16_t usVlanId)
 
static void PrintPacketPointerInfo (TPacketInfo *ptPacketInfo)
 
static void PrintPacketInfo (TPacketInfo *ptPacketInfo)
 
static void PrintDestination (TDestination *ptDestination)
 
static void PrintMemory (uint8_t *pucData, uint16_t usLength)
 
static uint16_t Crc16 (uint16_t usInitialValue, uint64_t uxData)
 
static uint32_t Crc32 (uint8_t *pucData, int iSize, uint32_t ulInitialValue, uint32_t ulPoly)
 
static uint32_t CalcTag (uint32_t laddr, uint16_t lport, uint32_t faddr, uint16_t fport)
 
static uint32_t CalcTag (const uint64_t *ptSrcIp, uint16_t usSrcPrt, const uint64_t *ptDstIp, uint16_t usDstPrt)
 
static uint32_t CalcTag (const uint64_t *ptDstIp, uint16_t usDstPrt)
 
static uint32_t CalcTag (uint32_t ulIp, uint16_t usPrt)
 
static uint32_t CalcTag (uint32_t ulIp, uint16_t usPrt, uint16_t usVlan)
 
static uint32_t CalcCRC (uint64_t *pdata, int size, uint32_t iv=0xffffffff)
 
static uint32_t CalcCRC (uint8_t *pdata, int size, int poly_width=32, uint32_t iv=0xffffffff)
 
static uint32_t CalcTag (uint16_t usPrt)
 
static uint32_t CalcTag (uint16_t usPrt, uint16_t usVlan)
 
static uint64_t PowGetGroupMask (uint64_t core_num)
 
static uint32_t WqeGetBufs (cvmx_wqe_t *pWQE)
 
static uint32_t WqeSetBufs (cvmx_wqe_t *pWQE, uint32_t bufs)
 
static bool WqeIsVlan (cvmx_wqe_t *pWQE)
 
static uint16_t WqeGetVlan (cvmx_wqe_t *pWQE)
 
static bool WqeIsArp (cvmx_wqe_t *pWQE)
 
static bool WqeIsICMP (cvmx_wqe_t *pWQE)
 
static bool WqeIsL4UDPTCP (cvmx_wqe_t *pWQE)
 
static bool WqeIsIP (cvmx_wqe_t *pWQE)
 
static bool WqeIsIPV4 (cvmx_wqe_t *pWQE)
 
static bool WqeIsIPV6 (cvmx_wqe_t *pWQE)
 
static bool WqeIsFragmented (cvmx_wqe_t *pWQE)
 
static cvmx_buf_ptr_t WqeGetBase (cvmx_wqe_t *pWQE)
 
static void * WqeGetStartOfIP (cvmx_wqe_t *pWQE)
 
static void * WqeGetStartOfL3 (cvmx_wqe_t *pWQE)
 
static bool WqeIsL1L2Error (cvmx_wqe_t *pWQE)
 
static bool WqeIsIPError (cvmx_wqe_t *pWQE)
 
static bool WqeIsL4Error (cvmx_wqe_t *pWQE)
 
static int WqeGetRcvError (cvmx_wqe_t *pWQE)
 
static void WqeFreeWqe (cvmx_wqe_t *pWQE)
 
static CCaviumAccess::TPhyStatus GetPhyStatus (int iPort)
 

Detailed Description

Definition at line 35 of file caviumaccess.h.

Member Enumeration Documentation

Enumerator
MSK_VLAN 
MSK_RTP 
MSK_STUN 
MSK_UDP_TYPE 

Definition at line 252 of file caviumaccess.h.

Enumerator
GC_NET_ETH_SIZE 
GC_NET_VLAN_SIZE 
GC_NET_IP_SIZE 
GC_NET_IPV6_SIZE 
GC_NET_UDP_SIZE 
GC_NET_RTP_SIZE 
GC_NET_STUN_SIZE 
GC_NET_DTLS_SIZE 
GC_NET_VUTP_SIZE 
GC_NET_TCP_SIZE 
GC_TYPE_LENGTH_SIZE 

Definition at line 276 of file caviumaccess.h.

Enumerator
PT_UNKNOWN 
PT_VLAN 
PT_IP 
PT_IPV6 
PT_ARP 
PT_ICMP 
PT_ICMP_REQUEST 
PT_ICMP_REPLY 
PT_TCP 
PT_UDP 
PT_VOCALLO_NET 
PT_VSN_NET 

Definition at line 260 of file caviumaccess.h.

Enumerator
VNT_DIAGNOSTIC 
VNT_MESSAGE 

Definition at line 291 of file caviumaccess.h.

Member Function Documentation

static uint32_t CCaviumAccess::CalcCRC ( uint64_t *  pdata,
int  size,
uint32_t  iv = 0xffffffff 
)
static
static uint32_t CCaviumAccess::CalcCRC ( uint8_t *  pdata,
int  size,
int  poly_width = 32,
uint32_t  iv = 0xffffffff 
)
static
static void CCaviumAccess::CalcIpChecksum ( TPacketInfo ptPacketInfo)
static
static uint32_t CCaviumAccess::CalcTag ( uint32_t  laddr,
uint16_t  lport,
uint32_t  faddr,
uint16_t  fport 
)
static
static uint32_t CCaviumAccess::CalcTag ( const uint64_t *  ptSrcIp,
uint16_t  usSrcPrt,
const uint64_t *  ptDstIp,
uint16_t  usDstPrt 
)
static
static uint32_t CCaviumAccess::CalcTag ( const uint64_t *  ptDstIp,
uint16_t  usDstPrt 
)
static
static uint32_t CCaviumAccess::CalcTag ( uint32_t  ulIp,
uint16_t  usPrt 
)
static
static uint32_t CCaviumAccess::CalcTag ( uint32_t  ulIp,
uint16_t  usPrt,
uint16_t  usVlan 
)
static
static uint32_t CCaviumAccess::CalcTag ( uint16_t  usPrt)
static
static uint32_t CCaviumAccess::CalcTag ( uint16_t  usPrt,
uint16_t  usVlan 
)
static
static uint16_t CCaviumAccess::Crc16 ( uint16_t  usInitialValue,
uint64_t  uxData 
)
static
static uint32_t CCaviumAccess::Crc32 ( uint8_t *  pucData,
int  iSize,
uint32_t  ulInitialValue,
uint32_t  ulPoly 
)
static
static void CCaviumAccess::DropPacket ( cvmx_wqe_t *  ptWork)
static
static bool CCaviumAccess::ForwardNewPacket ( unsigned char pcPacketFPA,
uint32_t  ui32Len,
int  iPort,
uint32_t  ulGroup,
uint32_t  ulTag = 0,
cvmx_pow_tag_type_t  tTagType = CVMX_POW_TAG_TYPE_ORDERED,
uint32_t  ulUnused = 0 
)
static
static void CCaviumAccess::ForwardPacket ( cvmx_wqe_t *  ptWork)
static
static uint8_t* CCaviumAccess::GetMemPacketPool ( void  )
static
static cvmx_wqe_t* CCaviumAccess::GetMemWqePool ( void  )
static
static void CCaviumAccess::GetPacketPointers ( TPacketInfo ptPacketInfo,
uint8_t *  pucBuffer,
uint16_t  usLength 
)
static
static void CCaviumAccess::GetPacketPointersOld ( TPacketInfo ptPacketInfo,
uint8_t *  pucBuffer,
uint16_t  usLength 
)
static
static CCaviumAccess::TPhyStatus CCaviumAccess::GetPhyStatus ( int  iPort)
static
static void CCaviumAccess::MacRead ( TMac ptMac,
uint8_t *  pucUcCount 
)
static
static uint64_t CCaviumAccess::PowGetGroupMask ( uint64_t  core_num)
static
static void CCaviumAccess::PrintDestination ( TDestination ptDestination)
static
static void CCaviumAccess::PrintMemory ( uint8_t *  pucData,
uint16_t  usLength 
)
static
static void CCaviumAccess::PrintPacketInfo ( TPacketInfo ptPacketInfo)
static
static void CCaviumAccess::PrintPacketPointerInfo ( TPacketInfo ptPacketInfo)
static
static void CCaviumAccess::ReturnMemPacketPool ( uint8_t *  pBuffer)
static
static void CCaviumAccess::ReturnMemPool ( uint8_t *  pBuffer,
uint64_t  uxPool 
)
static
static void CCaviumAccess::ReturnMemWqePool ( cvmx_wqe_t *  ptWork)
static
static void CCaviumAccess::SendNewPacket ( unsigned char pcPacketFPA,
uint32_t  ui32Len,
int  iPort,
TPacketInfo ptPacketInfo = NULL,
bool  bOverruleQueue = false,
uint32_t  ulQueueSelector = 0 
)
static
static bool CCaviumAccess::SendPacket ( cvmx_wqe_t *  ptWork,
uint32_t  ulPort,
uint32_t  QueueSelector 
)
static
static bool CCaviumAccess::SendPacket ( cvmx_wqe_t *  ptWork,
uint32_t  ulPort,
TPacketInfo ptPacketInfo = NULL,
uint8_t  ucResendId = 0,
bool  bOverruleQueue = false,
uint32_t  ulQueueSelector = 0 
)
static
static void CCaviumAccess::SetPacketPointersEth ( TPacketInfo ptPacketInfo,
uint8_t *  pucBuffer,
bool  bVlan = false 
)
static
static void CCaviumAccess::SetPacketPointersUdp ( TPacketInfo ptPacketInfo,
uint8_t *  pucBuffer,
uint16_t  usVlanId 
)
static
static void CCaviumAccess::SetPacketPointersUdpIpV6 ( TPacketInfo ptPacketInfo,
uint8_t *  pucBuffer,
uint16_t  usVlanId 
)
static
static void CCaviumAccess::TagSwitch ( uint32_t  ulTag)
static
static void CCaviumAccess::VlanAdd ( cvmx_wqe_t *  ptWork,
TPacketInfo ptPacketInfo,
uint16_t  usVlanId 
)
static
static void CCaviumAccess::VlanAdd ( uint8_t *  pucData,
uint16_t  usSize,
TPacketInfo ptPacketInfo,
uint16_t  usVlanId,
uint16_t *  pusNewSize 
)
static
static void CCaviumAccess::VlanAddAndMacChange ( cvmx_wqe_t *  ptWork,
TPacketInfo ptPacketInfo,
uint16_t  usVlanId,
TMac  tNewDstMac 
)
static
static void CCaviumAccess::VlanChange ( uint16_t  usVlanId,
cvmx_wqe_t *  ptWork,
TPacketInfo ptPacketInfo 
)
static
static void CCaviumAccess::VlanChange ( uint16_t  usVlanId,
uint8_t *  pucData,
uint16_t  usSize,
TPacketInfo ptPacketInfo,
uint16_t *  pusNewSize 
)
static
static void CCaviumAccess::VlanRemove ( cvmx_wqe_t *  ptWork,
TPacketInfo ptPacketInfo 
)
static
static void CCaviumAccess::VlanRemove ( uint8_t *  pucData,
uint16_t  usSize,
TPacketInfo ptPacketInfo,
uint16_t *  pusNewSize 
)
static
static void CCaviumAccess::WqeFreeWqe ( cvmx_wqe_t *  pWQE)
static
static cvmx_buf_ptr_t CCaviumAccess::WqeGetBase ( cvmx_wqe_t *  pWQE)
static
static uint32_t CCaviumAccess::WqeGetBufs ( cvmx_wqe_t *  pWQE)
static
static int CCaviumAccess::WqeGetRcvError ( cvmx_wqe_t *  pWQE)
static
static void* CCaviumAccess::WqeGetStartOfIP ( cvmx_wqe_t *  pWQE)
static
static void* CCaviumAccess::WqeGetStartOfL3 ( cvmx_wqe_t *  pWQE)
static
static uint16_t CCaviumAccess::WqeGetVlan ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsArp ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsFragmented ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsICMP ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsIP ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsIPError ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsIPV4 ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsIPV6 ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsL1L2Error ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsL4Error ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsL4UDPTCP ( cvmx_wqe_t *  pWQE)
static
static bool CCaviumAccess::WqeIsVlan ( cvmx_wqe_t *  pWQE)
static
static uint32_t CCaviumAccess::WqeSetBufs ( cvmx_wqe_t *  pWQE,
uint32_t  bufs 
)
static

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