From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1D0777E23 for ; Mon, 23 Feb 2015 16:03:03 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 23 Feb 2015 07:02:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,631,1418112000"; d="scan'208";a="655891546" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga001.jf.intel.com with ESMTP; 23 Feb 2015 07:02:35 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 23 Feb 2015 23:02:33 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0195.001; Mon, 23 Feb 2015 23:02:32 +0800 From: "Zhou, Danny" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO Thread-Index: AQHQTV7E/DHJ5wnUz0u1M4UeJBEYn5z+IH3Q//+XyACAAJywAA== Date: Mon, 23 Feb 2015 15:02:32 +0000 Message-ID: References: <1424353698-29837-1-git-send-email-danny.zhou@intel.com> <6417495.deEVoxQ023@xps13> <3509738.2W4po8ncMD@xps13> In-Reply-To: <3509738.2W4po8ncMD@xps13> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2015 15:03:04 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, February 23, 2015 9:28 PM > To: Zhou, Danny > Cc: Gonzalez Monroy, Sergio; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt ha= ndling based on VFIO >=20 > 2015-02-23 11:47, Zhou, Danny: > > From: Thomas Monjalon [mailto:thomas.monjalon@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 +=3D -I$(SRCDIR)/include > > > > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_eal/common > > > > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_eal/common/include > > > > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_ring > > > > +CFLAGS +=3D -I$(RTE_SDK)/lib/librte_mbuf > > > > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_mempool > > > > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_malloc > > > > CFLAGS +=3D -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. >=20 > I see. You are breaking layer isolation by introducing ethdev in EAL. > The cause seems to be: >=20 > + struct rte_intr_handle intr_handle =3D > + rte_eth_devices[port_id].pci_dev->intr_ha= ndle; >=20 > 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 inclu= de 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=20 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.