The Switching Process

Handling FPGA Images

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link™ Capture Software 12.10

About this task

The switching process is described in this table:

Procedure

  1. The SmartNIC must be in the NEUTRAL state before a switch can be initiated (see NEUTRAL state).
  2. Executing a --switch command, sets the state to IMAGE SWITCH EVENT ARMED (see IMAGE SWITCH EVENT ARMED state). This state indicates that the SmartNIC will switch image when it receives the next PCI slot reset event.
  3. After the PCI slot reset event, the state is automatically forwarded by the support chip to the IMAGE SWITCH EVENT IN PROGRESS state, unless the secondary image was found to be corrupted. The IMAGE SWITCH EVENT IN PROGRESS state (see IMAGE SWITCH EVENT IN PROGRESS state) indicates that the SmartNIC has loaded an FPGA image from the secondary bank.
    Note: If the FPGA image loaded from the secondary bank failed, the state is automatically forwarded to FAILED instead (see FAILED state). This state indicates that the previous load attempt has failed. The --switch --discard command must then be executed to reset the state from FAILED to NEUTRAL.
  4. When the SmartNIC is in the IMAGE SWITCH EVENT IN PROGRESS state, the user must acknowledge the switch event as successful by executing a --switch command with the --confirm argument. This command sets the state back to NEUTRAL, and causes the primary image bank setting to be updated to reflect the currently running bank.
    Note: The --switch --confirm command must be executed before the SmartNIC receives the next PCI slot reset event. Otherwise the SmartNIC will automatically revert to the primary image that was used previously.

Results

Note: A server boot (whether warm or cold) always generates PCI reset events.
Note: A server cold boot event always sets the state to FAILED, if the state was other than NEUTRAL.
Note: For Windows, it is recommended to perform the warm reboot with the following steps:
  1. Switch using the --pcirst option as shown in the following command example.
    imgctrl -a0 -s --pcirst
  2. Restart the system: Click the Restart button. Do not recycle the power.
  3. Check the current IMAGE STATE.
    imgctrl -a0 -q
    The following state is shown in the output.
    IMAGE STATE : IMAGE SWITCH EVENT IN PROGRESS (code 2)
  4. Confirm.
    imgctrl -a0 -s --confirm
Note: If the SmartNIC is switched from a Link™ Capture to a Link-Virtualization™ Software FPGA image (or vice-versa), the server must be rebooted to initialize to a different set of PCI resources ; reloading the FPGA is not sufficient. Use the --pcirst option to perform a PCI Reset switch method which will execute on next system reboot. Remember to --confirm the switch after rebooting. An output example when switching to the new FPGA image is failed.
...
Error: You cannot quick switch image. New image requires different set of PCI resources,
       which must be assigned during the PCI resource enumeration at server reboot.
       Please use --pcirst command and reboot the entire host to switch image.
  FAIL. Switching failed. Use --query to examine adapter
This is an example command sequence to switch the FPGA image from a Link™ Capture to a Link-Virtualization™ Software image (or vice-versa) with a PCI Reset.
/opt/napatech3/bin/imgctrl -s -a 0 --pcirst
reboot
/opt/napatech3/bin/imgctrl -s -a 0 --confirm