From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) by dpdk.org (Postfix) with ESMTP id 001E95A9B for ; Wed, 25 Feb 2015 13:32:03 +0100 (CET) Received: by mail-ig0-f169.google.com with SMTP id hl2so35928721igb.0 for ; Wed, 25 Feb 2015 04:32:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=dh8TA/SLCZyr7hsfv3LNby/lcTdUz9mKgCjSgpTL2S4=; b=DFhgZ0Z+d9TVW6HkmDqj+I31PChsATowZN4g+eRtO2ShR8fpbrpCXUiLW+g2Gkx4za ZTWQF+ukFaRb96/4IH+U376HEsqR2o6NdATKEP45tRVUw4lefgPXG5cOp6KbatV5Nsrt Au+Co4OWfhUD/zP0aEnabImnhpiwnYoLy5KKeqtyza+64Bzubw25O2CdWUjRWxeVv4pL 2Rgm9DrAhZYLYZZ123ouFXMmS+7GzXe9eGTGT/HRs7rO/ENzQlxIReruEZrliTuCNV/v UEq/kHD+BEls0T8umXwtbdeXhkAZmM+8c54eXgGIzGAM5J7XjJTheu/u8QZQqYbrjJAT mR0g== X-Gm-Message-State: ALoCoQmpy6mFCbIcp9JUyRUDqRR7RDDwn66jBjCo3Xenqg+zCRDCmQbFoDGNaVvSus/meazRLNgo MIME-Version: 1.0 X-Received: by 10.107.33.11 with SMTP id h11mr4004495ioh.53.1424867523382; Wed, 25 Feb 2015 04:32:03 -0800 (PST) Received: by 10.64.15.5 with HTTP; Wed, 25 Feb 2015 04:32:03 -0800 (PST) In-Reply-To: <2987764.cYYQsyCFG8@xps13> References: <1424060073-23484-2-git-send-email-mukawa@igel.co.jp> <1424837093-5661-1-git-send-email-mukawa@igel.co.jp> <1424837093-5661-13-git-send-email-mukawa@igel.co.jp> <2987764.cYYQsyCFG8@xps13> Date: Wed, 25 Feb 2015 21:32:03 +0900 Message-ID: From: Tetsuya Mukawa To: Thomas Monjalon Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v14 12/13] eal/pci: Add rte_eal_dev_attach/detach() functions 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: Wed, 25 Feb 2015 12:32:04 -0000 2015-02-25 20:21 GMT+09:00 Thomas Monjalon : > 2015-02-25 13:04, Tetsuya Mukawa: >> --- a/lib/librte_eal/common/eal_common_dev.c >> +++ b/lib/librte_eal/common/eal_common_dev.c >> @@ -32,10 +32,13 @@ >> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >> */ >> >> +#include >> +#include >> #include >> #include >> #include >> >> +#include >> #include >> #include > > No, you must not include ethdev in EAL. > The ethdev layer is by design on top of EAL. > Maxime already asked why you did it. He was implicitly asking to remove it. > You said that you are calling ethdev_is_detachable() but you should > call a function eal_is_detachable() or something like that. > The detachable state must be only device-related, i.e. in EAL. > The ethdev API is only a wrapper (with port id) in such case. > Hi Thomas, If ethdev library is on top of EAL, hotplug functions like rte_eal_dev_attach/detach should be implemented in ethdev library. Is it right? If so, I will move rte_eal_dev_attach/detach to ethdev library. And I will change names like rte_eth_dev_attach/detach. Also, I will add "rte_dev.h" and "rte_pci.h" in rte_ethdev.h, and call below EAL functions from ethdev library. - For virtual device initialization and finalization -- rte_eth_vdev_init -- rte_eth_vdev_uninit() - For physical NIC initialization and finalization -- rte_eal_pci_probe_one() -- rte_eal_pci_close_one() I guess this will fix this design violation. Is this ok? Thanks, Tetsuya >> --- a/lib/librte_eal/linuxapp/eal/Makefile >> +++ b/lib/librte_eal/linuxapp/eal/Makefile >> @@ -45,6 +45,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include >> CFLAGS += -I$(RTE_SDK)/lib/librte_ring >> CFLAGS += -I$(RTE_SDK)/lib/librte_mempool >> CFLAGS += -I$(RTE_SDK)/lib/librte_malloc >> +CFLAGS += -I$(RTE_SDK)/lib/librte_mbuf > > By removing ethdev dependency, you can remove this ugly mbuf dependency. > > Thanks Tetsuya >