From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id A1BD67E96 for ; Tue, 28 Oct 2014 13:42:16 +0100 (CET) Received: by mail-wg0-f44.google.com with SMTP id y10so751359wgg.15 for ; Tue, 28 Oct 2014 05:51:03 -0700 (PDT) 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; bh=Gk+IVhHb9bn6LyG6wx+q6LiLOpbdDMf44hQgZAcEN3w=; b=CdpYLth4rhVNaFcfSXS0XQ0hbT26Q/d+WUvDGm0UxaCKb9GQpL0jogmdMUQfSKlIYu MMhZsVHPq/xAvAi3TiK9heX9Ha4d3pllmN/RapNMsz1CZbHSJnh/6pc+5ftZ03aA9+4D tJH+BMKrGeUTcq2BaAZOxY9A5HPXtZRQ/7tiftCYyvKUcrMTXyZ2r371ndFW3SKoXRS9 SDV9+YKfpAiVx7YBncy3rwIEVZJ9bGGRe9RzQdq9naCWro6Kz9AlGdrDrPXJ+T3R0GyM 7uQRN4zVetW4Y+4ujtvlKqrOHZBdpBp2Cn+lM4DaONXP62j6tWOCFOH0fEXGjN3Y+OUJ cItg== X-Gm-Message-State: ALoCoQm2R33hBfBXeHiwWIbgbWd7vx4UFzy1rmn/czKP9NyM3J9QxSB8pN0ZlsIRtFDNQZQyOh47 X-Received: by 10.194.203.201 with SMTP id ks9mr3832660wjc.105.1414500663744; Tue, 28 Oct 2014 05:51:03 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id ht9sm15314425wib.8.2014.10.28.05.51.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Oct 2014 05:51:03 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 28 Oct 2014 13:50:47 +0100 Message-Id: <1414500657-23774-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Cc: bjzhuc@cn.ibm.com Subject: [dpdk-dev] [PATCH v3 00/10] split architecture specific operations 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: Tue, 28 Oct 2014 12:42:16 -0000 The set of patches split x86 architecture specific operations from DPDK and put them to x86 arch directory. This will make the adoption 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 eal library can support it. Reviewing patchset from Chao, I ended up modifying it along the way, so here is a new iteration of this patchset. Changes since Chao v2 patchset : - added a preliminary patch for moving rte_atomic.h (for better readability) - fixed documentation generation - implemented a generic header for each arch specific header (cpuflags, memcpy, prefetch were missing) - removed C++ stuff from generic headers - centralised all doxygen stuff in generic headers (no need to have duplicates) - refactored rte_cycles functions - moved vmware tsc stuff to arch rte_cycles.h headers - finished x86 factorisation Little summary of current state : - all applications continue to include the eal headers as before, these headers are the arch-specific ones - the arch specific headers always include the generic ones. The generic headers contain the doxygen documentation and code common to all architectures - a x86 architecture has been defined which handles both 32bits and 64bits peculiarities It builds fine for 32/64 bits (w and w/o "force intrinsics"), but I really would like a lot of eyes on this (and I would say, especially, rte_cycles, rte_memcpy and rte_cpuflags). I still have some concerns about the use of intrinsics for architecture != x86 but I think Chao will be the best to look at this. -- David Marchand Chao Zhu (7): eal: split atomic operations to architecture specific eal: split byte order operations to architecture specific eal: split CPU cycle operation to architecture specific eal: split prefetch operations to architecture specific eal: split spinlock operations to architecture specific eal: split memcpy operation to architecture specific eal: split CPU flags operations to architecture specific David Marchand (3): eal: move rte_atomic.h header eal: install all arch headers eal: factorize x86 headers doc/api/doxy-api.conf | 1 + lib/librte_eal/common/Makefile | 24 +- lib/librte_eal/common/eal_common_cpuflags.c | 190 ---- .../common/include/arch/x86/rte_atomic.h | 216 ++++ .../common/include/arch/x86/rte_atomic_32.h | 222 ++++ .../common/include/arch/x86/rte_atomic_64.h | 191 ++++ .../common/include/arch/x86/rte_byteorder.h | 121 +++ .../common/include/arch/x86/rte_byteorder_32.h | 51 + .../common/include/arch/x86/rte_byteorder_64.h | 52 + .../common/include/arch/x86/rte_cpuflags.h | 310 ++++++ .../common/include/arch/x86/rte_cycles.h | 121 +++ .../common/include/arch/x86/rte_memcpy.h | 297 +++++ .../common/include/arch/x86/rte_prefetch.h | 62 ++ .../common/include/arch/x86/rte_spinlock.h | 94 ++ lib/librte_eal/common/include/generic/rte_atomic.h | 918 ++++++++++++++++ .../common/include/generic/rte_byteorder.h | 189 ++++ .../common/include/generic/rte_cpuflags.h | 110 ++ lib/librte_eal/common/include/generic/rte_cycles.h | 209 ++++ lib/librte_eal/common/include/generic/rte_memcpy.h | 144 +++ .../common/include/generic/rte_prefetch.h | 71 ++ .../common/include/generic/rte_spinlock.h | 226 ++++ .../common/include/i686/arch/rte_atomic.h | 373 ------- lib/librte_eal/common/include/rte_atomic.h | 1133 -------------------- lib/librte_eal/common/include/rte_byteorder.h | 270 ----- lib/librte_eal/common/include/rte_cpuflags.h | 182 ---- lib/librte_eal/common/include/rte_cycles.h | 266 ----- lib/librte_eal/common/include/rte_memcpy.h | 376 ------- lib/librte_eal/common/include/rte_prefetch.h | 88 -- lib/librte_eal/common/include/rte_spinlock.h | 258 ----- .../common/include/x86_64/arch/rte_atomic.h | 335 ------ mk/arch/i686/rte.vars.mk | 2 + mk/arch/x86_64/rte.vars.mk | 2 + 32 files changed, 3624 insertions(+), 3480 deletions(-) create mode 100644 lib/librte_eal/common/include/arch/x86/rte_atomic.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_atomic_32.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_atomic_64.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_byteorder.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_byteorder_32.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_cycles.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_memcpy.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_prefetch.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_spinlock.h create mode 100644 lib/librte_eal/common/include/generic/rte_atomic.h create mode 100644 lib/librte_eal/common/include/generic/rte_byteorder.h create mode 100644 lib/librte_eal/common/include/generic/rte_cpuflags.h create mode 100644 lib/librte_eal/common/include/generic/rte_cycles.h create mode 100644 lib/librte_eal/common/include/generic/rte_memcpy.h create mode 100644 lib/librte_eal/common/include/generic/rte_prefetch.h create mode 100644 lib/librte_eal/common/include/generic/rte_spinlock.h delete mode 100644 lib/librte_eal/common/include/i686/arch/rte_atomic.h delete mode 100644 lib/librte_eal/common/include/rte_atomic.h delete mode 100644 lib/librte_eal/common/include/rte_byteorder.h delete mode 100644 lib/librte_eal/common/include/rte_cpuflags.h delete mode 100644 lib/librte_eal/common/include/rte_cycles.h delete mode 100644 lib/librte_eal/common/include/rte_memcpy.h delete mode 100644 lib/librte_eal/common/include/rte_prefetch.h delete mode 100644 lib/librte_eal/common/include/rte_spinlock.h delete mode 100644 lib/librte_eal/common/include/x86_64/arch/rte_atomic.h -- 1.7.10.4