cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
IP Receiver packet handler (IPRX) of the Network Transport Stack (NTS). More...
Modules | |
IPRX_TEST | |
Testbench for the IP Receiver packet handler (IPRX) of the Network Transport Stack (NTS). | |
Files | |
file | test_iprx.cpp |
: Testbench for the IP Receiver packet handler (IPRX). | |
file | test_iprx.hpp |
: Testbench for the IP Receiver packet handler (IPRX). | |
Classes | |
class | SubSums |
Macros | |
#define | THIS_NAME "IPRX" |
#define | TRACE_OFF 0x0000 |
#define | TRACE_IBUF 1 << 1 |
#define | TRACE_MPD 1 << 2 |
#define | TRACE_ILC 1 << 3 |
#define | TRACE_ICA 1 << 4 |
#define | TRACE_ICC 1 << 5 |
#define | TRACE_IID 1 << 6 |
#define | TRACE_ICL 1 << 7 |
#define | TRACE_IPR 1 << 8 |
#define | TRACE_ALL 0xFFFF |
#define | DEBUG_LEVEL (TRACE_OFF) |
Functions | |
void | pInputBuffer (stream< AxisEth > &siETH_Data, stream< AxisEth > &soMPd_Data) |
void | pMacProtocolDetector (EthAddr piMMIO_MacAddr, stream< AxisEth > &siIBuf_Data, stream< AxisArp > &soARP_Data, stream< AxisEth > &soILc_Data) |
void | pIpLengthChecker (stream< AxisEth > &siMPd_Data, stream< AxisEth > &soICa_Data) |
void | pIpChecksumAccumulator (Ip4Addr piMMIO_Ip4Address, stream< AxisEth > &siILc_Data, stream< AxisIp4 > &soIId_Data, stream< Ip4Version > &soIId_IpVer, stream< CmdBit > &soIId_DropCmd, stream< SubSums > &soICc_SubSums) |
void | pIpInvalidDropper (stream< AxisIp4 > &siICa_Data, stream< Ip4Version > &siICa_IpVer, stream< ValBit > &siICa_DropFrag, stream< ValBit > &siICc_CsumValid, stream< AxisIp4 > &soICl_Data) |
void | pIpCutLength (stream< AxisIp4 > &siIId_Data, stream< AxisIp4 > &soIPr_Data) |
void | pIpChecksumChecker (stream< SubSums > &siICa_SubSums, stream< ValBit > &soIId_CsumValid) |
void | pIpPacketRouter (stream< AxisIp4 > &siICl_Data, stream< AxisIp4 > &soICMP_Data, stream< AxisIp4 > &soICMP_Derr, stream< AxisIp4 > &soUOE_Data, stream< AxisIp4 > &soTOE_Data) |
void | iprx (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisEth > &siETH_Data, stream< AxisArp > &soARP_Data, stream< AxisIp4 > &soICMP_Data, stream< AxisIp4 > &soICMP_Derr, stream< AxisIp4 > &soUOE_Data, stream< AxisIp4 > &soTOE_Data) |
Main process of the IP Receive handler (IPRX). More... | |
void | iprx_top (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisRaw > &siETH_Data, stream< AxisRaw > &soARP_Data, stream< AxisRaw > &soICMP_Data, stream< AxisRaw > &soICMP_Derr, stream< AxisRaw > &soUOE_Data, stream< AxisRaw > &soTOE_Data) |
Top of IP Receive handler (IPRX) More... | |
Variables | |
bool | gTraceEvent |
const UdpLen | MaxDatagramSize = 32768 |
IP Receiver packet handler (IPRX) of the Network Transport Stack (NTS).
void iprx | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisEth > & | siETH_Data, | ||
stream< AxisArp > & | soARP_Data, | ||
stream< AxisIp4 > & | soICMP_Data, | ||
stream< AxisIp4 > & | soICMP_Derr, | ||
stream< AxisIp4 > & | soUOE_Data, | ||
stream< AxisIp4 > & | soTOE_Data | ||
) |
Main process of the IP Receive handler (IPRX).
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siETH_Data | Data stream from ETHernet MAC layer (ETH). |
[out] | soARP_Data | Data stream to Address Resolution Protocol (ARP) server. |
[out] | soICMP_Data | Data stream to Internet Control Message Protocol (ICMP) engine. |
[out] | soICMP_Derr | Data stream in error to [ICMP]. |
[out] | soUOE_Data | Data stream to UDP Offload Engine (UOE). |
[out] | soTOE_Data | Data stream to TCP Offload Engine (TOE). |
: This process connects to the Rx side of the Ethernet MAC core. It extracts the IPv4 and ARP packets from the incoming Ethernet frame and forwards them the TCP-offload-engine (TOE), the Internet Control Message Protocol (ICMP) engine, the UDP Offload Engine (UOE) or the Address Resolution Protocol (ARP) server.
Definition at line 826 of file iprx.cpp.
void iprx_top | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisRaw > & | siETH_Data, | ||
stream< AxisRaw > & | soARP_Data, | ||
stream< AxisRaw > & | soICMP_Data, | ||
stream< AxisRaw > & | soICMP_Derr, | ||
stream< AxisRaw > & | soUOE_Data, | ||
stream< AxisRaw > & | soTOE_Data | ||
) |
Top of IP Receive handler (IPRX)
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siETH_Data | Data stream from ETHernet MAC layer (ETH). |
[out] | soARP_Data | Data stream to Address Resolution Protocol (ARP) server. |
[out] | soICMP_Data | Data stream to Internet Control Message Protocol (ICMP) engine. |
[out] | soICMP_Derr | Data stream in error to [ICMP]. |
[out] | soUOE_Data | Data stream to UDP Offload Engine (UOE). |
[out] | soTOE_Data | Data stream to TCP Offload Engine (TOE). |
ENTITY - IP RX HANDLER (IPRX)
Definition at line 1032 of file iprx.cpp.
Input Buffer (IBuf)
[in] | siETH_Data | Data steam from the ETHernet interface (ETH). |
[out] | soMPd_Data | Data stream to MAC Protocol Detector (MPd). |
This process enqueues the incoming data traffic into a FiFo. [TOOD-FIXME - Do we really need this buffer? Can we get ride of it?].
Definition at line 94 of file iprx.cpp.
void pIpChecksumAccumulator | ( | Ip4Addr | piMMIO_Ip4Address, |
stream< AxisEth > & | siILc_Data, | ||
stream< AxisIp4 > & | soIId_Data, | ||
stream< Ip4Version > & | soIId_IpVer, | ||
stream< CmdBit > & | soIId_DropCmd, | ||
stream< SubSums > & | soICc_SubSums | ||
) |
IP Checksum Checker (ICa)
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siILc_Data | Data stream from IpLengthChecker (ILc). |
[out] | soIId_Data | Data stream to IpInvalidDropper (IId). |
[out] | soIId_IpVer | The IP version to [IId]. |
[out] | soIId_DropCmd | Tell [IId] to drop this IP packet. |
[out] | soICc_SubSums | Four sub-checksums to IpChecksumChecker (ICc). |
This process computes four sub-sums in parallel to later assess the checksum of the IPv4 header.
Definition at line 323 of file iprx.cpp.
IPv4 Checksum Checker (ICc)
[in] | siICa_SubSums | Four sub-checksums from IpChecksumAccumulator (ICa). |
[out] | soIId_CsumValid | Checksum valid information. |
This process computes the final IP header checksum by adding the 4 subsums.
Definition at line 643 of file iprx.cpp.
IPv4 Cut Length (ICl)
[in] | siIId_Data | Data stream from IpInvalidDropper (IId). |
[out] | soIPr_Data | Data stream to IpPacketRouter (IPr). |
This process intercepts and drops packets which are longer than the announced 'Ip4TotalLenght' field.
Definition at line 576 of file iprx.cpp.
void pIpInvalidDropper | ( | stream< AxisIp4 > & | siICa_Data, |
stream< Ip4Version > & | siICa_IpVer, | ||
stream< ValBit > & | siICa_DropFrag, | ||
stream< ValBit > & | siICc_CsumValid, | ||
stream< AxisIp4 > & | soICl_Data | ||
) |
IP Invalid Dropper (IId)
[in] | siICa_Data | Data stream from IpChecksumAccumulator (ICa). |
[in] | siICa_IpVer | The IP version from [ICa]. |
[in] | siICa_DropFrag | Drop this IP fragment from [ICA]. |
[out] | siICc_CsumValid | Checksum is valid from IpChecksumChecker (ICc). |
[out] | soICl_Data | Data stream to IP Cut Length (ICl). |
Drops an IP packet when its version is not '4' (siICa_IpVer), when it is a fragmented packet (siICa_DropFrag) or when its IP header checksum is not valid (siICc_CsumValid). Otherwise, the IPv4 packet is passed on.
Definition at line 504 of file iprx.cpp.
IP Length Checker (ILc)
[in] | siMPd_Data | Data steam from the MAC Protocol Detector (MPd). |
[out] | soICa_Data | Data stream to IP Checksum Accumulator (ICa). |
This process checks the length of the IPv4 packet and drops it if it is too long. [TODO:Remove this process. It makes no sense since we do not support fragmentation.]
Definition at line 226 of file iprx.cpp.
void pIpPacketRouter | ( | stream< AxisIp4 > & | siICl_Data, |
stream< AxisIp4 > & | soICMP_Data, | ||
stream< AxisIp4 > & | soICMP_Derr, | ||
stream< AxisIp4 > & | soUOE_Data, | ||
stream< AxisIp4 > & | soTOE_Data | ||
) |
IPv4 Packet Router (IPr)
[in] | siICl_Data | Data stream from IpCutLength (ICl). |
[out] | soICMP_Data | ICMP/IP data stream to ICMP. |
[out] | soICMP_Derr | Erroneous IP data stream to ICMP. |
[out] | soUOE_Data | UDP/IP data stream to UDP offload engine (UOE). |
[out] | soTOE_Data | TCP/IP data stream to TCP offload engine (TOE). |
This process routes the IPv4 packets to one of the 3 following engines: ICMP, TCP or UDP. If the TTL of the incoming IPv4 packet has expired, the packet is routed to the ICMP (over the 'soICMP_Derr' stream) in order for the ICMP engine to build the error messages which data section must include a copy of the erroneous IPv4 header plus at least the first eight bytes of data from the IPv4 packet that caused the error message.
Definition at line 689 of file iprx.cpp.
void pMacProtocolDetector | ( | EthAddr | piMMIO_MacAddr, |
stream< AxisEth > & | siIBuf_Data, | ||
stream< AxisArp > & | soARP_Data, | ||
stream< AxisEth > & | soILc_Data | ||
) |
MAC Protocol Detector (MPd)
[in] | piMMIO_MacAddr | The MAC address from MMIO. |
[in] | siIBuf_Data | Data steam from the Input Buffer (IBuf). |
[out] | soARP_Data | Data stream to ARP. |
[out] | soILc_Data | Data stream to the IPv4 Length Checker (ILc). |
This process parses the Ethernet header frame to detect embedded ARP and IPv4 packets. These two types of packets are forwarded accordingly, while other types of packets are dropped.
Definition at line 133 of file iprx.cpp.
|
extern |
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (TRACE_MPD | TRACE_IBUF)
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (MDL_TRACE | IPS_TRACE)
Definition at line 151 of file tb_nal.cpp.