Switch Mode

Handling FPGA Images

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

Description

The --switch command (see Syntax for the imgctrl Tool) is used for changing the running image of a working NT PCIe SmartNIC. Since all NT PCIe SmartNICs have dual-bank support, switching to a bank which contains a corrupt image, thereby loosing contact to the card, is simply reversed by rebooting the machine.

Quick switch and reboot switch

The image control tool can perform a quick switch of the SmartNIC, not requiring a reboot, or configure the SmartNIC to switch itself on the next reboot cycle. A power cycle will always invalidate any pending change event.

By default the image control tool tries a quick switch and fails if the currently running image lacks the necessary quick switch support. A quick switch operation causes the SmartNIC to switch image to the secondary image without requiring a reboot of the server. This method requires FPGA version 42 or larger to work. The tool automatically detects if proper support exists. Otherwise it issues an error.

The user can force the image control tool to configure the SmartNIC to switch on the next reboot event. This is done through the --pcirst argument to the --switch command.

Quick switch command example

This is an example of a --switch command for making a quick switch.

$ imgctrl --switch --adapter 0

Quick switch output example

This is an example of an output from the --switch command in Quick switch command example.

Scanning for Napatech adapters..
Switching image on adapter 0:
  OK. Image switched. Remember to issue --confirm or --discard to   accept/discard the change. Inquire the adapter via --query

If the SmartNIC is wholly unsupported or lacks the required FPGA version to perform a quick switch, an error message is output instead.

Reboot switch command example

This is an example of a --switch command for making a reboot switch.

$ imgctrl --switch --pcirst --adapter 0

Reboot switch output example

This is an example of an output from the --switch command in Reboot switch command example.

Scanning for Napatech adapters..
Switching image on adapter 0:
 OK. Reboot required to switch image. Do not forget to --confirm/--discard the adapter once rebooted!

If the SmartNIC is unsupported or lacks the required FPGA version to perform a quick switch, an error message is output instead.

Note: You are required to manually reboot the server if required to do so. The image control tool does not reboot automatically.
Note: After a reboot, the image must be confirmed or discarded by using the --confirm or --discard argument.

Acknowledging switch/boot events

The --switch command is also used to acknowledge a successful or failed switch/boot event. If the SmartNIC is in the IMAGE SWITCH EVENT IN PROGRESS state (see IMAGE SWITCH EVENT IN PROGRESS state), the primary image bank setting can be updated to reflect the currently running bank by issuing a --confirm argument to the --switch command. If the SmartNIC is in the IMAGE SWITCH EVENT ARMED state (see IMAGE SWITCH EVENT ARMED state) or the FAILED state (see FAILED state), the switch attempt can be reset back to NEUTRAL (see NEUTRAL state) by issuing a --discard argument to the --switch command.

It is required to either confirm or discard an image after a switch attempt by using the --confirm or --discard argument, or to acknowledge the boot load error if an FPGA boot failed at power cycling.

Updating the primary image bank setting: command example

This is an example of a --switch command for updating the primary image bank setting to reflect current running bank.

$ imgctrl --switch --confirm --adapter 0

Updating the primary image bank setting: output example

This is an example of an output from the --switch command in Updating the primary image bank setting: command example.

Applying current running image as safeboot image..
Switching image on adapter 0:
  OK. Adapter PrimaryImage has been updated to reflect current running image.

Canceling a pending switch-on-reboot: command example

This is an example of a --switch command for canceling a pending switch-on-reboot command, or to acknowledge a failed load attempt.

$ imgctrl --switch --discard --adapter 0

Canceling a pending switch-on-reboot: output example

This is an example of an output from the --switch command in Canceling a pending switch-on-reboot: command example.

Scanning for Napatech adapters..
Resetting bank switch statemachine back to neutral..
  OK. Adapter bank switch statemachine is reset back to neutral

Reloading the image from the primary image bank: command example

This is an example of a --switch command for reloading the FPGA image from the primary image bank.

$ imgctrl -a0 -s --reload

Reloading the image from the primary image bank: output example

This is an example of an output from the --switch command in Reloading the image from the primary image bank: command example.

imgctrl v3.4.6.29572 (Sep 20 2016 11:33:17) (Logfile: /tmp/imgctrl.log)
Scanning for Napatech adapters..
Reloading primary image..
  OK. Primary FPGA bank image has been reloaded