[dpdk-dev] Why secondary process can't receive the interrupt from NIC

topperxin topperxin at 126.com
Wed Mar 22 15:53:16 CET 2017


HI list


          I'm using two processes in our program.
          The primary process to load config, init data
          The secondary process to receive and forward the package from NIC


           In order to reduce the cpu usage, we decide to use interrupt + poll mode.
           But I find in the dpdk lib, the secondary process can not setup and receive the interrupt.


           Who can tell me the reason, and if we want to let the secondary process receive the interrupt, what's the best practice?


           Thanks a lot.


=========================================

/*

 * map the PCI resources of a PCI device in virtual memory (VFIO version).

 * primary and secondary processes follow almost exactly the same path

 */

int

pci_vfio_map_resource(struct rte_pci_device *dev)

{

..........................................

        /* if secondary process, do not set up interrupts */

        if (internal_config.process_type == RTE_PROC_PRIMARY) {

                if (pci_vfio_setup_interrupts(dev, vfio_dev_fd) != 0) {

                        RTE_LOG(ERR, EAL, "  %s error setting up interrupts!\n", pci_addr);

                        close(vfio_dev_fd);

                        rte_free(vfio_res);

                        return -1;

                }




..........................................

}



 


More information about the dev mailing list