Skip to contentSkip to conversation

Why secondary process can't receive the interrupt from NIC

DISCUSSION topperxin 1 participant 1 message Mar 22, 2017

lore
Share & tools
lore

topperxin

author
#0 lore raw

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;

                }

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

}