cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Address Resolution Protocol (ARS) server of the Network Transport Stack (NTS). More...
Modules | |
ARP_TEST | |
Testbench for the Address Resolution Protocol (ARS) server of the Network Transport Stack (NTS). | |
Files | |
file | test_arp.cpp |
: Testbench for the Address Resolution Protocol (ARP) server. | |
file | test_arp.cpp |
: Testbench for the Address Resolution Protocol (ARP) server. | |
Classes | |
class | ArpMeta |
class | RtlMacUpdateRequest |
class | RtlMacUpdateReply |
class | RtlMacLookupRequest |
class | RtlMacLookupReply |
Macros | |
#define | USE_DEPRECATED_DIRECTIVES |
#define | THIS_NAME "ARP" |
#define | TRACE_OFF 0x0000 |
#define | TRACE_APR 1 << 1 |
#define | TRACE_APS 1 << 2 |
#define | TRACE_ACC 1 << 3 |
#define | TRACE_ALL 0xFFFF |
#define | DEBUG_LEVEL (TRACE_OFF) |
Typedefs | |
typedef ap_uint< 1 > | ArpLkpOp |
Enumerations | |
enum | ArpLkpOpCodes { ARP_INSERT =0 , ARP_DELETE =1 } |
Functions | |
void | pArpPacketReceiver (Ip4Addr piMMIO_IpAddress, stream< AxisEth > &siIPRX_Data, stream< ArpMeta > &soAPs_Meta, stream< ArpBindPair > &soACc_UpdateReq) |
void | pArpPacketSender (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_IpAddress, stream< ArpMeta > &siAPr_Meta, stream< Ip4Addr > &siACc_Meta, stream< AxisEth > &soETH_Data) |
void | pArpCamController (stream< ArpBindPair > &siAPr_UpdateReq, stream< Ip4Addr > &soAPs_Meta, stream< Ip4Addr > &siIPTX_MacLkpReq, stream< ArpLkpReply > &soIPTX_MacLkpRep, stream< RtlMacLookupRequest > &soCAM_MacLkpReq, stream< RtlMacLookupReply > &siCAM_MacLkpRep, stream< RtlMacUpdateRequest > &soCAM_MacUpdReq, stream< RtlMacUpdateReply > &siCAM_MacUpdRep) |
void | arp (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisEth > &siIPRX_Data, stream< AxisEth > &soETH_Data, stream< Ip4Addr > &siIPTX_MacLkpReq, stream< ArpLkpReply > &soIPTX_MacLkpRep, stream< RtlMacLookupRequest > &soCAM_MacLkpReq, stream< RtlMacLookupReply > &siCAM_MacLkpRep, stream< RtlMacUpdateRequest > &soCAM_MacUpdReq, stream< RtlMacUpdateReply > &siCAM_MacUpdRep) |
Main process of the Address Resolution Protocol (ARP) Server. More... | |
void | arp_top (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisRaw > &siIPRX_Data, stream< AxisRaw > &soETH_Data, stream< Ip4Addr > &siIPTX_MacLkpReq, stream< ArpLkpReply > &soIPTX_MacLkpRep, stream< RtlMacLookupRequest > &soCAM_MacLkpReq, stream< RtlMacLookupReply > &siCAM_MacLkpRep, stream< RtlMacUpdateRequest > &soCAM_MacUpdReq, stream< RtlMacUpdateReply > &siCAM_MacUpdRep) |
Top of Address Resolution Protocol (ARP) Server. More... | |
Variables | |
bool | gTraceEvent |
Address Resolution Protocol (ARS) server of the Network Transport Stack (NTS).
cFDK / ShellLib / FMC : Submodules cFDK / ShellLib / NAL: Submodules cFDK / ShellLib / NTS : Submodules
enum ArpLkpOpCodes |
void arp | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisEth > & | siIPRX_Data, | ||
stream< AxisEth > & | soETH_Data, | ||
stream< Ip4Addr > & | siIPTX_MacLkpReq, | ||
stream< ArpLkpReply > & | soIPTX_MacLkpRep, | ||
stream< RtlMacLookupRequest > & | soCAM_MacLkpReq, | ||
stream< RtlMacLookupReply > & | siCAM_MacLkpRep, | ||
stream< RtlMacUpdateRequest > & | soCAM_MacUpdReq, | ||
stream< RtlMacUpdateReply > & | siCAM_MacUpdRep | ||
) |
Main process of the Address Resolution Protocol (ARP) Server.
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siIPRX_Data | Data stream from the IP Rx Handler (IPRX). |
[out] | soETH_Data | Data stream to Ethernet (ETH). |
[in] | siIPTX_MacLkpReq | MAC lookup request from [IPTX]. |
[out] | soIPTX_MacLkpRep | MAC lookup reply to [IPTX]. |
[out] | soCAM_MacLkpReq | MAC lookup request to [CAM]. |
[in] | siCAM_MacLkpRep | MAC lookup reply from [CAM]. |
[out] | soCAM_MacUpdReq | MAC update request to [CAM]. |
[in] | siCAM_MacUpdRep | MAC update reply from [CAM]. |
This process maintains a Content Addressable Memory (CAM) which holds the association of a layer-2 MAC address with a layer-3 IP address. The content of the CAM is continuously updated with any new {MAC_SA, IP_SA} binding seen by the IP Rx packet handler (IPRX) at the receive side of the FPGA. When an IP packet is transmitted by the FPGA, the 'IP_DA' is used as key to lookup the CAM and retrieve the associated 'MAC_DA' value to be used for building the outgoing Ethernet frame. If there is not a known binding for a given 'IP_DA', this process will build a broadcast ARP-REQUEST message that will be sent to every node of the local network, and will wait for the corresponding ARP-RESPONSE message to come back before forwarding the IP packet that is currently waiting for its address to be resolved. Conversely, if a broadcast ARP-REQUEST message that matches the ARP binding of the current FPGA, this process is in charge of building the corresponding ARP-REPLY message that is to be sent back in response to the incoming ARP request.
Definition at line 495 of file arp.cpp.
void arp_top | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisRaw > & | siIPRX_Data, | ||
stream< AxisRaw > & | soETH_Data, | ||
stream< Ip4Addr > & | siIPTX_MacLkpReq, | ||
stream< ArpLkpReply > & | soIPTX_MacLkpRep, | ||
stream< RtlMacLookupRequest > & | soCAM_MacLkpReq, | ||
stream< RtlMacLookupReply > & | siCAM_MacLkpRep, | ||
stream< RtlMacUpdateRequest > & | soCAM_MacUpdReq, | ||
stream< RtlMacUpdateReply > & | siCAM_MacUpdRep | ||
) |
Top of Address Resolution Protocol (ARP) Server.
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siIPRX_Data | Data stream from the IP Rx Handler (IPRX). |
[out] | soETH_Data | Data stream to Ethernet (ETH). |
[in] | siIPTX_MacLkpReq | MAC lookup request from [IPTX]. |
[out] | soIPTX_MacLkpRep | MAC lookup reply to [IPTX]. |
[out] | soCAM_MacLkpReq | MAC lookup request to [CAM]. |
[in] | siCAM_MacLkpRep | MAC lookup reply from [CAM]. |
[out] | soCAM_MacUpdReq | MAC update request to [CAM]. |
[in] | siCAM_MacUpdRep | MAC update reply from [CAM]. |
ENTITY - ADDRESS RESOLUTION PROTOCOL (ARP) SERVER
Definition at line 664 of file arp.cpp.
void pArpCamController | ( | stream< ArpBindPair > & | siAPr_UpdateReq, |
stream< Ip4Addr > & | soAPs_Meta, | ||
stream< Ip4Addr > & | siIPTX_MacLkpReq, | ||
stream< ArpLkpReply > & | soIPTX_MacLkpRep, | ||
stream< RtlMacLookupRequest > & | soCAM_MacLkpReq, | ||
stream< RtlMacLookupReply > & | siCAM_MacLkpRep, | ||
stream< RtlMacUpdateRequest > & | soCAM_MacUpdReq, | ||
stream< RtlMacUpdateReply > & | siCAM_MacUpdRep | ||
) |
ARP CAM Controller (ACc)
[in] | siAPr_UpdateReq | New {MAC,IP} update request from ArpPacketReceiver (APr). |
[out] | soAPs_Meta | Meta stream to ArpPacketSender (APs). |
[in] | siIPTX_MacLkpReq | MAC lookup request from [IPTX]. |
[out] | soIPTX_MacLkpRep | MAC lookup reply to [IPTX]. |
[out] | soCAM_MacLkpReq | MAC lookup request to [CAM]. |
[in] | siCAM_MacLkpRep | MAC lookup reply from [CAM]. |
[out] | soCAM_MacUpdReq | MAC update request to [CAM]. |
[in] | siCAM_MacUpdRep | MAC update reply from [CAM]. |
This is the front-end process of the RTL ContentAddressableMemory (CAM). It serves the MAC lookup requests from the IpTxHandler (IPTX) and MAC update requests from the ArpPacketReceiver (APr).
Definition at line 377 of file arp.cpp.
void pArpPacketReceiver | ( | Ip4Addr | piMMIO_IpAddress, |
stream< AxisEth > & | siIPRX_Data, | ||
stream< ArpMeta > & | soAPs_Meta, | ||
stream< ArpBindPair > & | soACc_UpdateReq | ||
) |
ARP Packet Receiver (APr)
[in] | piMMIO_IpAddress | My IPv4 address from [MMIO]. |
[in] | siIPRX_Data | Data stream from the IP Rx Handler (IPRX). |
[out] | soAPs_Meta | Meta stream to ARP Packet Sender (APs). |
[out] | soACc_UpdateReq | New {MAC,IP} update request to ArpCamController (ACc). |
This process parses the incoming ARP packet and extracts the relevant ARP fields as a metadata structure. If the 'OPERation' field is an ARP-REQUEST, the extracted metadata structure is forwarded to the ArpPacketSender (APs) which will use that information to to build an ARP-REPLY packet in response to the incoming ARP-REQUEST. Next, the {MAC,IP} binding of the ARP-Sender is systematically forwarded to the ARP-CAM for insertion.
Definition at line 116 of file arp.cpp.
void pArpPacketSender | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_IpAddress, | ||
stream< ArpMeta > & | siAPr_Meta, | ||
stream< Ip4Addr > & | siACc_Meta, | ||
stream< AxisEth > & | soETH_Data | ||
) |
ARP Packet Sender (APs)
[in] | piMMIO_MacAddress | My MAC address from MemoryMappedIOs (MMIO). |
[in] | piMMIO_IpAddress | My IPv4 address from [MMIO]. |
[in] | siAPr_Meta | Meta stream from ArpPacketReceiver (APr). |
[in] | siACc_Meta | Meta stream from ArpCamController (ACc). |
[out] | soETH_Data | Data stream to Ethernet (ETH). |
This process builds an ARP-REPLY packet upon request from the process ArpPacketReceiver (APr), or an ARP-REQUEST packet upon request from the process ArpCamController ACc). The generated ARP packet is then encapsulated into an Ethernet frame.
Definition at line 246 of file arp.cpp.
|
extern |
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (TRACE_APR | TRACE_APS)
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (MDL_TRACE | IPS_TRACE)
Definition at line 151 of file tb_nal.cpp.