Intel® Acceleration Stack User Guide: Intel FPGA Programmable Acceleration Card N3000

ID 683040
Date 6/14/2021
Document Table of Contents

11.2. DPDK Handling of SEU

When the SEU errors occur, an interrupt is generated in DPDK IFPGA Rawdev driver which supports FPGA management. The interrupt handler is defined in the file $RTE_SDK/drivers/raw/ifpga/ifpga_rawdev.c as:
static void
fme_interrupt_handler(void *param)
        struct opae_manager *mgr = (struct opae_manager *)param;
        IFPGA_RAWDEV_PMD_INFO("%s interrupt occurred\n", __func__);

The function fme_err_handle_catfatal_error(mgr) handles the SEU error by causing a panic through rte_panic() function call. The implementation of this interrupt handler is provided as reference code and can be customized.

When a SEU event occurs, you receive a panic message while running the DPDK application using the following command:
$ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -l 0,1,2,3,4,5,6,7 -n 4 \
--vdev 'ifpga_rawdev_cfg0,ifpga=15:00.0,port=0' -- -i --no-numa 
Figure 25. Panic Message
To recover from the SEU panic which is caused by the reference SEU event interrupt handler, follow these steps:
  1. Unbind from vfio driver:
    sudo rmmod vfio-pci
  2. Rebind to OPAE driver:
    modprobe intel-fpga-pci
    echo 0000:BB:DD.F > /sys/bus/pci/drivers/intel-fpga-pci/bind
  3. Re-configure the FPGA:
    1. Extract the which is provided as part of the Acceleration Stack Installer:
      $ unzip 
      $ cd N3000_supplemental_files/
    2. Find PCIe Root Port:
      $ chmod +x
      Sample output:
      0000:b2:00.0 -> intel-fpga-dev.0
      The first entry in the list is the PCIe Root port. The last entry is the Intel® FPGA PAC N3000.
    3. Record the RP AER value:
      $ sudo setpci -s ae:00.0 ECAP_AER+0x08.L
      $ sudo setpci -s ae:00.0 ECAP_AER+0x14.L
      Note: Your AER values may differ from the above responses.
    4. Disable AER:
      $ sudo setpci -s <RP BDF> ECAP_AER+0x08.L=0xffffffff
      $ sudo setpci -s <RP BDF> ECAP_AER+0x14.L=0xffffffff
    5. Trigger re-configure FPGA:
      $ sudo rsu fpga b2:00.0
    6. Enable AER , use the values obtained from step 3b:
      $ sudo setpci -s <RP BDF> ECAP_AER+0x08.L=0x00210000
      $ sudo setpci -s <RP BDF> ECAP_AER+0x14.L=0x000031c1
  4. Install vfio-pci driver.
    $ sudo modprobe vfio-pci
  5. Bind all ports to the vfio-pci driver and restart the DPDK application.