> -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 9:28 PM > To: Zhou, Danny > Cc: Gonzalez Monroy, Sergio; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt > handling based on VFIO > > 2015-02-23 11:47, Zhou, Danny: > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > > 2015-02-19 21:48, Zhou Danny: > > > > --- a/lib/librte_eal/linuxapp/eal/Makefile > > > > +++ b/lib/librte_eal/linuxapp/eal/Makefile > > > > @@ -43,6 +43,7 @@ CFLAGS += -I$(SRCDIR)/include > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_ring > > > > +CFLAGS += -I$(RTE_SDK)/lib/librte_mbuf > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_mempool > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_malloc > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_ether > > > > > > Why do we need mbuf in EAL? > > > > The file eal_interrupts.c includes rte_ethdev.h which defines structure > > rte_eth_devices that > > eal needs to use in order to get per-port intr_handle. The rte_ethdev.h > > includes the rte_mbuf.h > > so the Makefile is updated here. > > I see. You are breaking layer isolation by introducing ethdev in EAL. > The cause seems to be: > > + struct rte_intr_handle intr_handle = > + rte_eth_devices[port_id].pci_dev->intr_handle; > > Maybe that pci_dev should be a parameter of the function.
Adding pci_dev as a parameter has similar problem due to eal does not include rte_pci.h which defines struct rte_pci_device. It looks the new-added function rte_eal_wait_rx_intr(uint8_t port_id, uint8_t queue_id); is not proper to be declared in rte_eal.h, will rename it to rte_intr_wait_rx (struct rte_intr_handle *intr_handle, uint8_t queue_id); and then move declaration from rte_eal.h to rte_interrupts.h. So isolation can be avoided and no need to includes rte_ethdev.h and change Makefile.