OFS / oneapi-asp

Intel® oneAPI Accelerator Support Package (ASP)
MIT License
2 stars 9 forks source link

same local_ip_address, local_mac_address for multi IO pipes #137

Closed umairsiddiqui-digitek closed 5 months ago

umairsiddiqui-digitek commented 7 months ago

i was trying to run the multi IO-pipe example

https://github.com/OFS/examples-afu/tree/main/oneapi-samples/io_streaming_multi_pipes

a/c to its readme file https://github.com/OFS/examples-afu/blob/main/oneapi-samples/io_streaming_multi_pipes/README.md

Before running the executable users need to set follwing env variables

export LOCAL_IP_ADDRESS = local ip address
export LOCAL_MAC_ADDRESS = local mac address
export LOCAL_NETMASK = netmask
export LOCAL_UDP_PORT = local udp port
export REMOTE_IP_ADDRESS = remote ip address , destination ip address
export REMOTE_MAC_ADDRESS= remote mac address , destination mac address
export REMOTE_UDP_PORT= remote udp port

I noticed that these enviroment variables are loaded in mmd_device.cpp.

https://github.com/OFS/oneapi-asp/blob/6a45e17ac8ba3ea6b39dc2f20750a979f67cd16d/common/source/host/mmd_device.cpp#L534

All IO-Pipe get same local_ip_address, local_mac_address from these enviroment variables.

Each IO Pipe is mapped to single HSSI (ethernet +UDP) instance and should have unique local_ip_address and local_mac_address. it would be better if user can have environment variable for each IO-PIPE:

# IO-PIPE-0
export LOCAL_IP_ADDRESS_0 = local ip address
export LOCAL_MAC_ADDRESS_0 = local mac address
export LOCAL_NETMASK_0 = netmask
export LOCAL_UDP_PORT_0 = local udp port
export REMOTE_IP_ADDRESS_0 = remote ip address , destination ip address
export REMOTE_MAC_ADDRESS_0= remote mac address , destination mac address
export REMOTE_UDP_PORT_0= remote udp port

# IO-PIPE-1
export LOCAL_IP_ADDRESS_1 = local ip address
export LOCAL_MAC_ADDRESS_1 = local mac address
export LOCAL_NETMASK_1 = netmask
export LOCAL_UDP_PORT_1 = local udp port
export REMOTE_IP_ADDRESS_1 = remote ip address , destination ip address
export REMOTE_MAC_ADDRESS_1= remote mac address , destination mac address
export REMOTE_UDP_PORT_1 = remote udp port

# IO-PIPE-2
export LOCAL_IP_ADDRESS_2 = local ip address
export LOCAL_MAC_ADDRESS_2 = local mac address
export LOCAL_NETMASK_2 = netmask
export LOCAL_UDP_PORT_2 = local udp port
export REMOTE_IP_ADDRESS_2 = remote ip address , destination ip address
export REMOTE_MAC_ADDRESS_2= remote mac address , destination mac address
export REMOTE_UDP_PORT_2 = remote udp port

# IO-PIPE-3
export LOCAL_IP_ADDRESS_3 = local ip address
export LOCAL_MAC_ADDRESS_3 = local mac address
export LOCAL_NETMASK_3 = netmask
export LOCAL_UDP_PORT_3 = local udp port
export REMOTE_IP_ADDRESS_3 = remote ip address , destination ip address
export REMOTE_MAC_ADDRESS_3= remote mac address , destination mac address
export REMOTE_UDP_PORT_3 = remote udp port
aktole commented 5 months ago

Hi,

Sorry for the delay in response. Thank you for the feedback. We currently do not have this enhancement planned for the oneapi-asp. The current reference design demonstrates UDP packet creation with 1 source and 1 destination address for the Intel® FPGA SmartNIC N6000-PL Platform HSSI interface.

If you would like to route data on channels each with its own addresses, changes will be required in both the oneapi-asp rtl code and the source code for the MMD library. The MMD library currently writes the MAC and IP addresses to a set of registers in the UDP offload engine. These registers are shared across all channels in the design (8 in reference FIM for Intel® FPGA SmartNIC N6000-PL Platform). The UDP engine will need to be updated to have separate registers for each channel and the MMD will need to be updated to write different values to each register.

Thank you.