From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id B65A45953 for ; Mon, 23 Feb 2015 16:19:46 +0100 (CET) Received: by mail-wi0-f169.google.com with SMTP id em10so20537052wid.0 for ; Mon, 23 Feb 2015 07:19:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=C0Fpg02FZGj3JB/wv+3QjSczoKjM2UtGijkSk0s99vQ=; b=QbzOU7LKo7xygxuzh09v0F9WPXKMQUd5Po4o3c6YZO+4SPakxZcI+mKcRE0JMD1Sou Fun9aBYseEcj075RfYrUCNfDfQjsZO4q3egdz6FFBoC+GSdhGLZeTZVzxb71a9pXb+L8 BhE649igZlBlSJOBSbfdjS/cRE8VQwhfUB+Hne3jNF9d5qYHJrDTl0+a9BwAw884FUaM SZrHfaKXYlkkLRUKf5k4XJLofswd7qYwXS8w0d9EUTHgW2kaMLCUdwNDib9O8k468l5a D5DrZcM5qfAcpQuHjF2W7hqr3MeCW/iw0kTgkL10G/iEKl7Se3IQPiy/DW5RPp1NZxxc xJ1w== X-Gm-Message-State: ALoCoQnKKHbfyRil2+AOM6z3QDyae8TCXGwcH5FEhH7S1oFXSZOdFh5JvNfntVQxhTFmrRHPvr5m X-Received: by 10.194.109.9 with SMTP id ho9mr22849533wjb.29.1424704786371; Mon, 23 Feb 2015 07:19:46 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id fo8sm16314806wib.14.2015.02.23.07.19.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 07:19:45 -0800 (PST) From: Thomas Monjalon To: "Zhou, Danny" Date: Mon, 23 Feb 2015 16:19:15 +0100 Message-ID: <2740446.fpxNnYhYZp@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: References: <1424353698-29837-1-git-send-email-danny.zhou@intel.com> <3509738.2W4po8ncMD@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:19:46 -0000 2015-02-23 15:02, Zhou, Danny: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 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 += -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 I don't understand your assertion. rte_pci.h is part of EAL. > 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. Yes could be better.