cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
toe.hpp File Reference

: TCP Offload Engine (TOE) More...

#include <stdint.h>
#include "ap_int.h"
#include "../../../NTS/nts.hpp"
#include "../../../NTS/nts_utils.hpp"
#include "../../../NTS/SimNtsUtils.hpp"
#include "../../../MEM/mem.hpp"
Include dependency graph for toe.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ipTuple
 
class  SessionLookupQuery
 
class  SessionLookupReply
 
class  StateQuery
 
class  RxSarReply
 
class  RXeRxSarQuery
 
class  RAiRxSarQuery
 
class  RAiRxSarReply
 
class  RXeTxSarQuery
 
class  RXeTxSarReply
 
class  TXeTxSarQuery
 
class  TXeTxSarReply
 
class  TXeTxSarRtQuery
 
class  TAiTxSarPush
 
class  TStTxSarPush
 
class  TxAppTableQuery
 
class  TxAppTableReply
 
class  RXeReTransTimerCmd
 
class  TXeReTransTimerCmd
 
class  Event
 
class  ExtendedEvent
 
struct  rstEvent
 

Macros

#define TOE_SIZEOF_LISTEN_PORT_TABLE   0x8000
 
#define TOE_SIZEOF_ACTIVE_PORT_TABLE   0x8000
 
#define TOE_FIRST_EPHEMERAL_PORT_NUM   0x8000
 
#define TOE_FEATURE_USED_FOR_DEBUGGING   0
 
#define cIP4_ADDR_WIDTH   32
 
#define cTCP_PORT_WIDTH   16
 
#define cSHL_TOE_SESS_ID_WIDTH   16
 
#define cSHL_TOE_LSN_ACK_WIDTH   1
 
#define cSHL_TOE_LSN_REQ_WIDTH   cSHL_TOE_SESS_ID_WIDTH
 
#define cSHL_TOE_OPN_REQ_WIDTH   (cIP4_ADDR_WIDTH + cTCP_PORT_WIDTH)
 
#define cSHL_TOE_CLS_REQ_WIDTH   cSHL_TOE_SESS_ID_WIDTH
 
#define TLAST   1
 
#define RXMEMBUF   65536
 
#define TXMEMBUF   65536
 

Typedefs

typedef ap_uint< 16 > SessionId
 
typedef ap_uint< 1 > LsnAck
 
typedef ap_uint< 16 > LsnReq
 
typedef ap_uint<(32+16) > OpnReq
 
typedef ap_uint< 16 > ClsReq
 
typedef ap_uint< 64 > LE_tData
 
typedef ap_uint< 8 > LE_tKeep
 
typedef ap_uint< 64 > tData
 
typedef ap_uint< 32 > tDataHalf
 
typedef ap_uint< 8 > tKeep
 
typedef ap_uint< 1 > tLast
 
typedef TcpAppOpnRep SessState
 
typedef ap_uint< 15 > TcpStaPort
 
typedef ap_uint< 15 > TcpDynPort
 
typedef TcpSeqNum RxSeqNum
 
typedef TcpAckNum TxAckNum
 
typedef TcpWindow RemotWinSize
 
typedef TcpWindow LocalWinSize
 
typedef ap_uint< 32 > RxMemPtr
 
typedef ap_uint< 32 > TxMemPtr
 
typedef ap_uint< TOE_WINDOW_BITS > TcpBufAdr
 
typedef TcpBufAdr RxBufPtr
 
typedef TcpBufAdr TxBufPtr
 
typedef bool HitState
 

Enumerations

enum  notificationType { PKG , CLOSE , TIME_OUT , RESET }
 
enum  {
  WORD_0 , WORD_1 , WORD_2 , WORD_3 ,
  WORD_4 , WORD_5
}
 
enum  {
  CHUNK_0 , CHUNK_1 , CHUNK_2 , CHUNK_3 ,
  CHUNK_4 , CHUNK_5
}
 
enum  EventType {
  TX_EVENT =0 , RT_EVENT , ACK_EVENT , SYN_EVENT ,
  SYN_ACK_EVENT , FIN_EVENT , RST_EVENT , ACK_NODELAY_EVENT
}
 
enum  HitStates { SESSION_UNKNOWN = false , SESSION_EXISTS = true }
 
enum  TimerCmd { LOAD_TIMER = false , STOP_TIMER = true }
 

Functions

template<typename T >
void pStreamMux (stream< T > &si1, stream< T > &si2, stream< T > &so)
 A 2-to-1 generic Stream Multiplexer. More...
 
void toe_top (Ip4Addr piMMIO_IpAddr, stream< StsBit > &soMMIO_RxMemWrErr, stream< ap_uint< 8 > > &soMMIO_NotifDropCnt, stream< ap_uint< 8 > > &soMMIO_MetaDropCnt, stream< ap_uint< 8 > > &soMMIO_DataDropCnt, stream< ap_uint< 8 > > &soMMIO_CrcDropCnt, stream< ap_uint< 8 > > &soMMIO_SessDropCnt, stream< ap_uint< 8 > > &soMMIO_OooDropCnt, StsBit &poNTS_Ready, stream< AxisRaw > &siIPRX_Data, stream< AxisRaw > &soIPTX_Data, stream< TcpAppNotif > &soTAIF_Notif, stream< TcpAppRdReq > &siTAIF_DReq, stream< TcpAppData > &soTAIF_Data, stream< TcpAppMeta > &soTAIF_Meta, stream< TcpAppLsnReq > &siTAIF_LsnReq, stream< TcpAppLsnRep > &soTAIF_LsnRep, stream< TcpAppData > &siTAIF_Data, stream< TcpAppSndReq > &siTAIF_SndReq, stream< TcpAppSndRep > &soTAIF_SndRep, stream< TcpAppOpnReq > &siTAIF_OpnReq, stream< TcpAppOpnRep > &soTAIF_OpnRep, stream< TcpAppClsReq > &siTAIF_ClsReq, stream< DmCmd > &soMEM_RxP_RdCmd, stream< AxisApp > &siMEM_RxP_Data, stream< DmSts > &siMEM_RxP_WrSts, stream< DmCmd > &soMEM_RxP_WrCmd, stream< AxisApp > &soMEM_RxP_Data, stream< DmCmd > &soMEM_TxP_RdCmd, stream< AxisApp > &siMEM_TxP_Data, stream< DmSts > &siMEM_TxP_WrSts, stream< DmCmd > &soMEM_TxP_WrCmd, stream< AxisApp > &soMEM_TxP_Data, stream< CamSessionLookupRequest > &soCAM_SssLkpReq, stream< CamSessionLookupReply > &siCAM_SssLkpRep, stream< CamSessionUpdateRequest > &soCAM_SssUpdReq, stream< CamSessionUpdateReply > &siCAM_SssUpdRep, stream< ap_uint< 16 > > &soDBG_SssRelCnt, stream< ap_uint< 16 > > &soDBG_SssRegCnt, stream< RxBufPtr > &soDBG_RxFreeSpace, stream< ap_uint< 32 > > &soDBG_TcpIpRxByteCnt, stream< ap_uint< 8 > > &soDBG_OooDebug)
 Top of TCP Offload Engine (TOE) More...
 

Variables

uint32_t packetCounter
 
uint32_t idleCycCnt
 
unsigned int gSimCycCnt
 
const int cDepth_AKdToEVe_Event = 8
 
const int cDepth_AKdToTXe_Event = 16
 
const int cDepth_EVeToAKd_Event = 8
 
const int cDepth_RAiToRSt_Qry = 4
 
const int cDepth_RXeToEVe_Event = 64
 
const int cDepth_RXeToRSt_Qry = 4
 
const int cDepth_RXeToTSt_Qry = 4
 
const int cDepth_STtToRXe_Rep = 2
 
const int cDepth_STtToTAi_Rep = 2
 
const int cDepth_TAiToEVe_Event = 8
 
const int cDepth_TAiToTSt_Cmd = 4
 
const int cDepth_TStToRXe_Rep = 2
 
const int cDepth_TStToTAi_Cmd = 4
 
const int cDepth_TStToTXe_Rep = 2
 
const int cDepth_TImToEVe_Event = 4
 
const int cDepth_TXeToEVe_Event = 8
 
const int cDepth_TXeToRSt_Req = 4
 
const int cDepth_TXeToTSt_Qry = 4
 

Detailed Description

: TCP Offload Engine (TOE)

Copyright 2016 – 2021 IBM Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright (c) 2015, Xilinx, Inc.

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    System: : cloudFPGA Component : Shell, Network Transport Stack (NTS) Language : Vivado HLS


: Data structures, types and prototypes definitions for the TCP offload engine.

Remarks
: In telecommunications, a protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network. A PDU is therefore composed of a protocol specific control information (e.g a header) and a user data section. This source code uses the following terminology:
  • a SEGMENT (or TCP Packet) refers to the TCP protocol data unit.
  • a PACKET (or IP Packet) refers to the IP protocol data unit.
  • a FRAME (or MAC Frame) refers to the Ethernet data link layer.

Definition in file toe.hpp.