FTP Server by muNVMe-IPG4 Demo Instruction

 

1      Overview. 2

2      PC Setup. 2

2.1   Setting the IP address. 2

2.2   Enabling Jumbo frame. 3

2.3   Disabling Flow Control and Interrupt Moderation. 4

2.4   Setting Number of RSS Queues and RSS Base Processor Number 5

2.5   Checking Power Options Plan. 6

2.6   Setting FTP Client Application (FileZilla) 7

3      FTP Server Demo. 8

3.1   System Initialization. 8

3.2   FPGA Main Menu. 11

3.2.1     Display FTP Client Setting. 11

3.2.2     Change FTP Client Setting. 12

3.2.3     Change Time Created by FTP. 13

3.2.4     Monitor FTP Transfer 14

3.2.5     Display Disk Information. 15

3.2.6     Write File. 16

3.2.7     Read File. 19

3.2.8     Shutdown. 22

3.3   FTP Client Operation. 23

3.3.1     Login FTP Server 23

3.3.2     Upload File. 24

3.3.3     Download File. 26

3.4   Error Condition. 27

3.4.1     File Transfer Collision. 27

3.4.2     Invalid Command. 29

4      Revision History. 30

 

1        Overview

This document provides instructions for operating the FTP Server by muNVMe-IP (Gen4) demo on FPGA development boards. The system integrates multiple IP cores from Design Gateway, including exFAT2-IP, TOE100G-IP, and muNVMe-IP (Gen4). Data transfer is facilitated between the FTP Client application on a remote PC and the FPGA logic via 100G Ethernet, with the NVMe Gen4 SSD serving as the primary storage attached to the FPGA board. The muNVMe-IP (Gen4) enables simultaneous write and read operations, allowing efficient, bi-directional data flow. An FPGA console is available, enabling users to configure test parameters and monitor the FTP Server system’s status.

This guide is divided into two sections. Section 2 covers the setup of the Ethernet card on the remote PC to ensure high performance and configuration of the FTP client to align the FTP server functions. Section 3 provides detailed instructions for conducting tests via the FPGA console and FTP client, along with an explanation of the test results. FileZilla is used throughout the guide as the FTP client application.

 

2        PC Setup

This section provides an example setting up the 100G Network Adapter on a remote PC to enable Jumbo frame and optimize network performance on Windows 10 OS.

 

2.1        Setting the IP address

To set the IP address of the Network Adapter, follow the steps below.

 

 

Figure 1 Setting IP address of the Network adapter

 

1)     Open the Local Area Connection Properties of the 100G Ethernet connection, as shown in the left window of Figure 1.

2)     Select “TCP/IPv4” and click on Properties.

3)     Set the IP address = 192.168.100.25 and the Subnet mask = 255.255.255.0, as shown in the right window of Figure 1.

 

2.2        Enabling Jumbo frame

To enable Jumbo Frame of the Network Adapter, follow the steps below.

 

 

Figure 2 Set frame size = Jumbo frame

 

1)     On the Local Area Connection Properties window, click on “Configure”, as shown in the left window of Figure 2.

2)     On the Advanced Tab, select “Jumbo Packet” and set the Value to “9014 Bytes” for Jumbo Frame support, as shown in the right window of Figure 2.

Note: Setting “Disabled” to disable Jumbo frame may reduce the performance, so it is advisable to enable it.

 

2.3        Disabling Flow Control and Interrupt Moderation

To disable the flow control and interrupt moderation of the Network Adapter, follow the steps below.

 

 

Figure 3 Disable Flow Control and Interrupt Moderation

 

1)     Select “Flow Control” and set the value to “Disabled”, as shown in the left window of Figure 3.

2)     Select “Interrupt Moderation” and set the value to “Disabled”, as shown in the right window of Figure 3.

3)     Click the “OK” button to save and exit all the setting windows.

 

2.4        Setting Number of RSS Queues and RSS Base Processor Number

This section outlines steps to optimize network performance when the Network Adapter supports multiple network connections.

 

 

Figure 4 Set Number of RSS Queues and RSS Base Processor Number

 

1)     Set the Maximum Number of RSS Queues to a value greater than 4, such as 8 queues, to enhance performance.

2)     Assign each network connection a unique RSS Base Processor Number to prevent overlap. For instance, if both Network connections are configured with 8 RSS Queues, assign an RSS Base Processor Number of 0 to the first connection and 8 to the second.

3)     Click “OK” to save and exit all configuration windows.

 

2.5        Checking Power Options Plan

 

Figure 5 Power options

1)     Open Control Panel and select Power Options, as shown in the left window of Figure 5.

2)     Change the setting to “High Performance”, as shown in the right window of Figure 5.

 

2.6        Setting FTP Client Application (FileZilla)

The reference design supports a single connection for data transfer over 100G Ethernet. Therefore, FileZilla must be configured to use only one connection, as shown in Figure 6.

 

 

Figure 6 FileZilla Client Setting

1)     In the FileZilla application, go to Edit -> Settings.

2)     On the Transfers page, set “Maximum simultaneous transfer” to 1, then click the “OK” button to confirm the settings.

 

3        FTP Server Demo

3.1        System Initialization

Upon the completion of configuration file downloading to the FPGA, a welcome message will appear. This welcome screen outlines the demo’s name, IP’s name, and IP version number. This demo divides the part of initialization into two parts, disk initialization and network initialization.

 

 

Figure 7 Disk Initialization Message

 

The first initialization is disk initialization. This part outlines the confirmation of the completion for exFAT2-IP initialization and the SSD’s Secure Erase command compatibility. Users are prompted to format the disk, with three options: Format (F), Secure Format (S), or bypass the format process (other keys), as illustrated in Figure 7. In specific SSD that does not support Secure Erase command, the Secure Format cannot be executed.

For SSDs not previously formatted by the exFAT2-IP, selection of Format or Secure Format is mandatory. After formatting, disk system information is displayed, such as file size, maximum number of files in the disk, and total number of available files in the disk, as shown in Figure 8.

 

Execution steps for Format and Secure Format are as follows.

 

Figure 8 Disk Initialization Completion with/without Format Operation

 

1)     Select Format Type:

a)     Press ‘F’ for Format.

b)     Press ‘S’ for Secure Format.

c)     Press any other key to cancel the command. The action cancels the format operation and displays the current disk information.

If Format or Secure Format option is selected, the system will display the default created date and time which is configured to local test logic.

2)     Set Created Date and Time: This created date and time will be applied for empty directories created during (Secure) Format process.

a)     Press ‘y’ to input a new created date and time.

b)     Press any other key (e.g., ‘n’) to retain the default values.

After setting the date and time, the console will list all supported file sizes for the disk.

3)     Select the disk’s file size from the provided options. After a valid selection, Format or Secure Format process will begin.

During the format operation, the message “Format operation begin” will appear. The operation’s progress is indicated by a dot (.) printed on the console. Upon completion, “Format disk complete” will be displayed, along with the total duration of the format process.

Note: The Secure Format typically takes longer than the standard Format due to the additional erase operation.

 

 

Figure 9 Network initialization and Main menu

 

The next step in the initialization process is network initialization. The current network parameter values are displayed on the console. Press ‘x’ to retain these values, or press any other key to modify them. Once confirmed, the TOE100G-IP initialization process begins.

When TOE100G-IP initialization is complete, the message “TOE100G-IP initialization complete” will appear. Next, the current created date and time settings for FTP access are displayed.  Similar to the configuration for local test logic, the user can press ‘y’ to modify the created date and time, or press any other key (e.g., ‘n’) to keep the default settings.

Note: This FTP server demo allows simultaneous SSD access by two users: local test logic and the remote FTP client. The created date and time for file/directory creation by each user is configured independently. Figure 8 shows the created date and time configured for local test logic, while Figure 9 shows those for the remote FTP client.

After setting the created date and time, the FTP server information, including IP address, username, and password, is displayed, as shown in Figure 9. The remote FTP client uses this information to connect the FTP server. Following this, the FPGA console displays the main menu, which is described in detail below.

 

3.2        FPGA Main Menu

The main menu is divided into two groups: the FTP Client Menu and the Test Logic Menu. The FTP Client Menu is used to configure parameters and monitor the status of FTP client communication. The Test Logic Menu is used to configure parameters and monitor the status of the local logic that controls the SSD. Details for each menu are provided below.

 

3.2.1       Display FTP Client Setting

Select ‘0’ to display the current FTP settings. The console will show seven network parameters, the current created date and time configured for FTP, and the FTP server information, as shown in Figure 10.

 

 

Figure 10 Display FTP Client Setting

 

Here are the details of the network parameters.

1)     Window Update Gap: This sets the threshold value for transmitting a window update packet. The valid value range is 0x000 – 0x3FF (0-1023) and the threshold value unit is 1KB. The default value is 16.

2)     Reverse Packet: This flag enables the IP to send the retransmitted packet when the IP waits for a long time for the Window update packet returned from the target. The default value is ENABLE.

3)     FPGA MAC address: This parameter sets the 48-bit hex value to be the local MAC address. The default value is 0x000102030405.

4)     FPGA IP: This parameter sets the local IP address. The default value is 192.168.100.42.

Note: This value is used as a Server IP address parameter for the FTP client on PC.

5)     FPGA port number: This parameter sets the local port number. The default value is 60000.

Note: This value is used as a Server port parameter for the FTP client on PC.

6)     Target IP: This parameter sets the remote IP address (100G Ethernet connection of remote PC). The default value is 192.168.100.25.

7)     Target port number: This parameter sets the remote port number to transfer TCP payload data. The default value is 60001.

To modify any of the network parameters, the user can select menu option [1]. To change the created date and time by FTP, the user can simply select menu option [2].

 

3.2.2       Change FTP Client Setting

Select ‘1’ from the menu to reset and modify TOE100G-IP parameters. This menu allows user to change IP settings or reset the TOE100G-IP. Upon selection of this option, the current parameters are displayed on the console. Press ‘x’ to keep the same parameters, or press any other key to modify them. Once the parameters are confirmed, the TOE100G-IP is reset and the initialization process begins.

 

 

Figure 11 Change FTP Setting

 

This menu contains seven parameters that must be set. Each parameter is validated before being loaded into the TOE100G-IP. If the input is invalid, the parameter remains unchanged. Once all parameters have been loaded, the IP is reset. The details of each parameter are described in topic 3.2.1, and their valid ranges are given below.

1)     Reverse Packet: Set ‘0’ to disable or ‘1’ to enable this feature.

2)     Window Update Gap: Set threshold value for transmitting a window update packet. The valid range is 0x000 – 0x3FF (0-1023), and the unit size of the threshold value is 1KB. The default value is 16.

3)     FPGA MAC address: Input 12 digits of hex value, and add “0x” as a prefix to input it as a hex value.

4)     FPGA IP address: Input four decimal digits separated by “.”, where the valid range for each digit is 0-255.

5)     FPGA port number: The valid range is 0-65535.

6)     Target IP address: Similar to FPGA IP address, this value is a set of four decimal digits.

7)     Target port number: The valid range is 0-65535.

After finishing assigning the parameters, the final values are displayed on the console. Then, the reset signal is sent to the IP, and it initializes using the new parameters. Finally, “IP initialization complete” is displayed on the console once the initialization process is complete, as shown in Figure 11.

 

3.2.3       Change Time Created by FTP

Select option ‘2’ from the menu to modify the created date and time, configured for FTP. This date and time will be applied during the file transfer of STOR command, to be the created date and time of the uploaded files.

 

 

Figure 12 Change Time Created by FTP

 

Press ‘y’ to modify the created date and time for new files or use any other key for the default value. If updating, specify the following parameters.

1)     Year               : Range 1980 – 2107.

2)     Month             : Range 1 – 12.

3)     Date               : Range 1 – 31.

4)     Hour               : Range 0 – 23.

5)     Minute            : Range 0 – 59.

6)     Second           : Second multiplied by 2, range 0 – 29.

Use decimal as default; prefix “0x” for hexadecimal. Invalid inputs will be ignored, keeping the previous value.

A “Date and Time changed” confirmation message will appear, followed by the display of the new values, as shown in Figure 12.

 

3.2.4       Monitor FTP Transfer

Select option ‘3’ from the menu to monitor the file transfer status of the FTP client during the execution of the STOR and RETR commands. The user can enter this menu and wait for the FTP client to begin transferring. While the FTP client is idle, the console will appear to freeze, and a blinking dash (-) in the transfer size field will indicate that the FTP client is still idle, as shown in Figure 13.

 

 

Figure 13 FTP File Transfer Status during Idle

 

The user can press ‘x’ at any time to return to the main menu. However, if the user returns to the main menu before the FTP client completes file transfer, no transfer result will be displayed.

During an FTP client file transfer, the console will display the current command (either STOR or RETR) along with the current transfer size. Once the transfer is complete, the result will be displayed, including the total file size, total transfer time, transfer speed, and the last existing file as shown in Figure 14.

 

 

Figure 14 FTP File Transfer Status during STOR and RETR commands

 

3.2.5       Display Disk Information

Select ‘4’ to display the disk information, which includes the file size on disk, the maximum number of files allowed, and the total number of files currently stored, as shown in Figure 15.

 

 

 

Figure 15 Disk Information

 

3.2.6       Write File

Select ‘5’ to initiate the Write file operation. This menu triggers the local test logic (DataGen) to write new files to the SSD. The user sets four parameters for this command, as described below.

 

 

Figure 16 Write File Menu

 

1)     Setting the Created Date and Time: Similar to section 3.2.3, this date and time will be applied to the files created during the Write File operation. The console will then suggest a Start file number based on the existing files on the SSD.

2)     Setting Start file number: Press any key other than ‘y’ to use the recommended number. To overwrite old files, press ‘y’ and input a new number that is less than the recommended value. Overwriting replaces the old data with new data.

3)     Number of files: Specify the total number of files to be written. Use a decimal value or prefix with “0x” for hexadecimal.

4)     Test pattern: Choose from 32-bit incremental, 32-bit decremental, all-0, all-1, and 32-bit LFSR counter.

Once all inputs are confirmed, the console previews the transfer parameters and begins the operation. While the DataGen writes the new files to the SSD, the console updates the amount of data written every second. When the operation is complete, the console displays the total size, total time usage, and test speed.

 

This demo supports simultaneous write and read operations. Therefore, while the DataGen writes new files to SSD using the Write File menu, the remote PC can read files via the FTP client using the RETR command, as shown in Figure 17.

 

 

Figure 17 Mixed Write File and RETR Commands

 

During the operation, the console displays both the amount of data written data by DataGen and the amount of data read by the FTP client every second. Once the operation is complete, the console shows the transfer results, including total transfer size, time usage, and average performance.

Note:

1)     When running write and read commands simultaneously, ensure that files for the read operation have been successfully written to the SSD by the write operation. For instance, start the FTP client on the remote PC to retrieve files after the Write file command has completed storing several files on the SSD, as shown in Figure 17. Additionally, note that the FTP client’s read speed in this example is slower than DataGen’s write speed, so the active file name for the read operation will always be less than for the write operation.

2)     When write and read commands are executed simultaneously on the same SSD, the performance of each command may be lower than when running a single command due to shared SSD resources.

 

Figure 18 provides an example of the error messages that appear when inputs of any parameter are out of the recommended range. After an “Invalid input” message is displayed on the console, the system will revert to the main menu.

 

 

Figure 18 Error Message from the Invalid Input during the Write File Command

 

3.2.7       Read File

Select ‘6’ to initiate the Read file operation. This menu triggers the local test logic (DataVer) to read files from the SSD. The user sets three parameters for this command, as described below.

 

 

Figure 19 Read File Menu

 

1)     Setting Start file number: Set the starting file number for the read operation, within the range of 0 to (total number of files on the disk – 1). Default input is decimal as default and prefix with “0x” for hexadecimal.

2)     Number of files: Specify the total number of files to read. Input decimal value or prefix with “0x” for hexadecimal.

3)     Test pattern: Select a verification pattern that corresponds with the one used in the Write file command. Five options include 32-bit incremental, 32-bit decremental, all-0, all-1, and 32-bit LFSR counter.

Once all inputs are confirmed, the console previews the transfer parameters and begins the operation, similar to the Write file menu. While the DataVer reads the files from the SSD, the console updates the amount of data read every second. When the operation is complete, the console displays the total size, total time usage, and test speed.

If invalid inputs are entered, an “Invalid input” message is displayed, and the command is canceled, similar to the Write File command’s behavior.

 

If the Read file command encounters a data verification failure, the console will display an error message, as depicted in Figure 20. The error message includes the name of the first file where the error occurred, the specific address within the first error file, and the expected data.

 

 

Figure 20 Data Verification Failure

 

Figure 21 illustrates an example where the FTP client uploads new files using the STOR command while DataVer verifies another file using the Read File command. Similar to Figure 17, both operations display the amount of transferred data every second. The transfer performance when running both commands simultaneously is lower than when running a single command.

 

 

Figure 21 Mixed Read file and STOR Commands

 

3.2.8       Shutdown

Select option ‘7’ to initiate the Shutdown command. This command forces the system and the connected SSD inactive.

 

 

Figure 22 Shutdown Command

 

When initiating the shutdown operation, a confirmation message will appear on the console. To proceed with the shutdown, the user inputs ‘y’ or ‘Y’. Any other key will cancel the operation. After the command executes successfully, the console will display the message “Shutdown command is complete”, indicating the system has been properly shut down.

 

3.3        FTP Client Operation

This section describes the sequence of operations for running an FTP client application on the remote PC to access the FTP server system on the FPGA board. FileZilla is used as the FTP client in this instruction.

 

3.3.1       Login FTP Server

To log in FTP Server, follow these steps.

 

 

Figure 23 Login FTP Server

 

1)     Input the server parameters as recommended on the console.

a)     Host IP     : Set to FPGA IP address specified during initialization (default is 192.168.100.42).

b)     Username : dgftp

c)     Password  : admin

2)     Click the “Quickconnect” button.

After setting the server parameters, the console will display login successful. The directory name indicates the file size configured in the FTP server system. For example, a directory name of F032GB indicates that the file size for transferring with the FTP server is fixed at 32 GB. If the FTP server storage is not empty, the available files are displayed in the directory. The created date and time of each file are retrieved from the SSD.

Note: The time zone displayed on the FPGA console is based on UTC+0, while the time zone displayed on the FTP client depends on the user’s local time zone. Therefore, timestamps may differ between the FPGA console and the FTP client. For example, if the user’s time zone is UTC+7, a created time of 9:30 AM on the FPGA console will appear as 4:30 PM on the FTP client.

 

3.3.2       Upload File

This section outlines the steps for uploading files from the FTP client on the remote PC to the FTP server. The uploaded file size is fixed, matching the directory name on the FTP server. For example, if the directory name on the FTP server is “F032GB”, the uploaded file size must be exactly 32x1024x1024x1024 bytes. Additionally, the file name for uploading must follow the format “HHHHHHH.BIN”, where each ‘H’ represents a hex value. Follow these steps to upload a file to the FTP server.

 

 

Figure 24 Upload File

 

1)     Select the file to upload on the remote PC. Multiple files can be selected, but only one file can be transferred at a time. The file size must match the directory name on FTP server, and the file name can be set as either the highest current file name plus one or lower. For example, as shown in Figure 24, the highest file name is “0000002.BIN”, the valid range of the uploaded file is “0000000.BIN” to “0000003.BIN”. The user may upload “0000003.BIN” as a new file or use other names to replace existing files.

2)     Right-click on the selected file and select “Upload”.

3)     During the upload process, the user can monitor the progress in the FTP client or on the FPGA console using the “[3] Monitor FTP Transfer” menu. The FPGA console updates the total transfer size every second and displays the transfer speed upon completion. The FTP client application shows the total time and a success message once the upload finishes, and the new file will appear in the FTP server storage.

 

 

Figure 25 Upload File Result

 

Figure 25 shows the results after uploading the new file “0000003.BIN” to the FTP server. The modified date and time reflect the values configured in the “Change Time Created by FTP” menu on the FPGA console, though this timestamp must be adjusted for time zone differences.

Note:

1)     Transfer speed in this demo depends on the remote PC’s resources for handling both the 100G Ethernet and the storage for the uploaded file. Additionally, data allocation in the uploaded file significantly impacts transfer performance. If the file data is allocated in a contiguous area, performance will be higher than if it is fragmented. To ensure contiguous allocation, users can prepare the uploaded file to the SSD using the exFAT2-IP demo. For more information about the exFAT2-IP demo, refer to the following link: https://dgway.com/products/IP/NVMe-IP/dg_exfat2ip_instruction_g4_amd/

2)     For optimal performance, use high-performance SSDs on both the FTP server on FPGA and the remote PC.

 

3.3.3       Download File

This section outlines the steps for downloading files from the FTP server to the remote PC’s storage via the FTP client. Follow these steps to download a file from the FTP server.

 

 

Figure 26 Download File

 

1)     Select the file to be downloaded from the FTP Server. Multiple files can be selected, but only one file will transfer at a time.

2)     Right-click on the selected file and select “Download”.

3)     During the download process, the user can monitor progress in the FTP client or on the FPGA console, similar to the upload process. The FPGA console updates the total transfer size every second and displays the transfer speed upon completion. The FTP client application shows the total time and a success message once the download finishes. The new file will then appear in the remote PC’s storage, as shown in Figure 27.

 

 

Figure 27 Download File Result

 

3.4        Error Condition

3.4.1       File Transfer Collision

This FTP server system supports simultaneous write and read operations to the same SSD by providing separate user interfaces for each operation. Write and read commands can be initiated independently by either the remote PC via the FTP client application or the local test logic (DataGen and DataVer). To prevent conflicts, the system includes a protection mechanism that triggers an error message when both the FTP client and the local test logic attempt to perform a write or read operation simultaneously, resulting in a file transfer collision. This section describes the error messages displayed on the FTP client and the local test logic during these collisions.

 

 

Figure 28 Error message when FTP client attempts to upload a file while DataGen is active

 

 

Figure 29 Error message when FTP client attempts to download a file while DataVer is active

 

Figure 28 illustrates an example where the user starts DataGen to write file on the FPGA console. If the user then attempts to upload a file from the remote PC to the FTP server via the FTP client application, the system rejects the write request from the FTP client since DataGen was initiated first. As a result, the FTP client displays a “500 Syntax error” message on the console.

Figure 29 shows an example where the user starts DataVer to read file on the FPGA console. If the user then attempts to download a file from the FTP server via the FTP client, the system rejects the FTP client’s read request, maintaining the read operation by DataVer. Consequently, the FTP client displays “500 Syntax error” message on the console.

 

Similarly, if the FTP client begins uploading a file and the user then selects the Write File menu to start DataGen operation, the system will reject the request and display a “Write I/F is busy” message on the FPGA console. Likewise, if the FTP client starts downloading a file and the user then selects the Read File menu to start DataVer operation, the system will reject the request and display a “Read I/F is busy” message on the FPGA console, as shown in Figure 30.

 

 

Figure 30 Error message when a file transfer request in the same direction as the FTP client is attempted

 

3.4.2       Invalid Command

While the FTP client is transferring a file, the system disables the following menus: “[1] Change FTP Client Setting”, “[2] Change Time Created by FTP”, and “[7] Shutdown”. If the user attempts to execute any of these commands during a transfer, a warning message, “FTP is transferring” will be displayed, and the selected command will be canceled, returning the user to the main menu, as shown in Figure 31.

 

 

Figure 31 Error message for invalid command attempted during FTP client transfer

 

4        Revision History

Revision

Date (D-M-Y)

Description

1.00

8-Nov-24

Initial version release