From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by dpdk.org (Postfix) with ESMTP id D52EBE82 for ; Fri, 3 Oct 2014 15:14:59 +0200 (CEST) Received: by mail-ob0-f169.google.com with SMTP id m8so815809obr.28 for ; Fri, 03 Oct 2014 06:21:53 -0700 (PDT) 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=SMxLN6CnZMDI70x63a71op73qH/mOmho1bxe1EFNRW4=; b=lWvDE6EpFG1KJUG7TWk/FpKCBXxVmqZMFOHyU4/EsTVAZW/lMZ4VDuLjAsmqs1ho1x sYREGhPk+lg83PdD3UB94AEgCw6JEu1YIXPyz+CNu9yCGMQGak6tAdRL/OnO1Lte5K9q 4SZ4Cft+wJjqjZG/MMcn3b0kaCfsvEtcuQgmJhGXssJ0jA5dU+RH2zJRwO5LlmLblbbC +a8Ykius26qogtWu+r5A0+14rh2bwKZfhIUHX0CNf8OYBC1Q8WuAErECmx0wwmrqFvr/ K4jyn9/wkhAso3U3dME9EQtez41TysNJmqPy9YfZ4TT4jVeEuR2UfDOcZ6Z30+5qqLVp IEuQ== X-Gm-Message-State: ALoCoQm+vn8bPkKjuJmW2PY9r217EIo3ID1k8VQgjk7KLGQKouAVuxG06NF0AgXXF1og7MLOfgTt MIME-Version: 1.0 X-Received: by 10.182.86.72 with SMTP id n8mr6782188obz.68.1412342513401; Fri, 03 Oct 2014 06:21:53 -0700 (PDT) Received: by 10.202.57.139 with HTTP; Fri, 3 Oct 2014 06:21:53 -0700 (PDT) In-Reply-To: <1411724018-7738-1-git-send-email-bjzhuc@cn.ibm.com> References: <1411724018-7738-1-git-send-email-bjzhuc@cn.ibm.com> Date: Fri, 3 Oct 2014 15:21:53 +0200 Message-ID: From: David Marchand To: Chao Zhu Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 0/7] Patches to split architecture specific operations from DPDK 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: Fri, 03 Oct 2014 13:15:00 -0000 Hello Chao, On Fri, Sep 26, 2014 at 11:33 AM, Chao Zhu wrote: > The set of patches split x86 architecture specific operations from DPDK > and put them to the > arch directories of i686 and x86_64 architecture. This will make the > adpotion of DPDK much easier > on other computer architecture. For a new architecture, just add an > architecture specific > directory and necessary building configuration files, then DPDK can > support it. > > Here is a different approach for the headers splitting. If we are going to support multiple architectures, the best would be to have a specific header for each arch which implements a common API (no need for any _arch suffix). These headers would be located in lib/librte_eal/common/include/arch/$arch/ rather than lib/librte_eal/common/include/$arch/arch/ (which looks odd to me). Makefiles can add some -I for dpdk to build itself (and we can remove those symlinks from the makefiles). Makefiles only install the specific headers in RTE_SDK/include for use by applications. For common code and documentation, we can add a "generic" directory in lib/librte_eal/common/include (or "arch-generic", or "shared" ... any better idea ?). DPDK makefiles installs the generic headers in RTE_SDK/include/generic. arch headers (like rte_atomic.h) include the generic one (). These generic headers can be implemented using compiler intrinsics when possible. They also include the doxygen stuff in a single place. This would look like something like this, for rte_atomic.h : - in DPDK sources $ ls lib/librte_eal/common/include/*/rte_atomic.h lib/librte_eal/common/include/i686/rte_atomic.h lib/librte_eal/common/include/x86_64/rte_atomic.h lib/librte_eal/common/include/generic/rte_atomic.h - in installed RTE_SDK $ ls RTE_SDK/include/{,*/}rte_atomic.h RTE_SDK/include/rte_atomic.h RTE_SDK/include/generic/rte_atomic.h Comments ? I am only focusing on the first patchset at the moment, but if we can find consensus here, a respin of the two patchsets would be great. Thanks. -- David Marchand