Commit Graph

11 Commits

Author SHA1 Message Date
Kefu Chai
c976f580e7 cmake: fix the build WITH_DPDK=ON
* add Findcryptopp.cmake back
  cryptopp support was dropped in #20015, but it's required by
  src/msg/async/dpdk/TCP.h, which `#include <cryptopp/md5.h>`
  so, to fix the FTBFS of WITH_DPDK=ON, we need to bring
  Findcryptopp.cmake back. it was also removed in #20015.
* pass "-march=core2" when building sources which include dpdk headers.
  i was wrong that the headers shipped by distro are generic.
  the headers use the sse instructions for speedup memcpy, see
  /usr/include/x86_64-linux-gnu/dpdk/rte_memcpy.h .
* also, we need to include the arch specific include directory
  for building with dpdk.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-05 13:53:57 +08:00
Kefu Chai
303e3c4a6c cmake: fix Finddpdk.cmake
* add dpdk::dpdk if dpdk is built or found, as seastar checks for
  it before adding its component libraries. if user installs libdpdk
  and builds WITH_SEASTAR=ON or WITH_DPDK=ON, cmake fails to configure
  the building system without this fix.
* add dpdk::cflags target for populating the -march=<arch> compile
  option.
* also use pkg-config for finding dpdk.
* link common_async_dpdk against dpdk::dpdk instead

please note, the reason why we can remove the "-march=native" compile
option from Finddpdk.cmake, is that the distro shipped header files
are "generic" in the sense of "-march=<ARCH>", they do not enable
the arch specific intrinsic by default, hence the source files
including them do not need specific compiler options.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-17 15:16:22 +08:00
Nathan Cutler
18dc98e3f0 cmake: do not build DPDK with -march=native
-march=native causes gcc to use opcodes according to whichever CPU happens to
be installed in the build host, which can be different for every build. This
makes it impossible to achieve a reproducible build.

Also, if the build host has a very new CPU, running the resulting binaries on
older CPUs (of the same family, i.e. x86_64) could result in segmentation
fault.

References: http://tracker.ceph.com/issues/24948
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-08-17 14:09:08 +08:00
Kefu Chai
be300380ce cmake: Finddpdk: add dpdk::${component} libs
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-22 09:55:23 +08:00
Kefu Chai
b3ceafe7d8 cmake,rpm,deb: update to accommodate SPDK v17.10
* cmake/modules/BuildSPDK.cmake: add lvol
* cmake/modules/BuildDPDK.cmake: add pci and bus_pci
* ceph.spec.in, cmake/modules/BuildSPDK.cmake, debian/control:
  re-introduce libuuid dependency, as 17.07 added lvol. and the latter
  depends on uuid.
* cmake/modules/BuildSPDK.cmake: avoid introducing local variable of
  `iface_libs`.
* cmake/modules/patch-dpdk-conf.sh: disable
  CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES, this option introduces the
  balanced allocation of memory. but it also requires libnuma-dev.
  let's disable it for now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-29 18:03:23 +08:00
Kefu Chai
e8add075ec cmake: add rte_mempool_{ring,stack} to Finddpdk.cmake
* also refactor it a little bit

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-18 10:44:56 +08:00
Ilsoo Byun
8134620ad4 os/bluestore: fix build errors when spdk is on
- remove pthread library link from dpdk cmake
- fix the bugs of NVMEDevice

Signed-off-by: Ilsoo Byun <ilsoo.byun@sk.com>
2017-07-05 01:42:10 -04:00
Pan Liu
2c2cae16cf dpdk: make compilation successful when use dpdk v16.11
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2017-01-02 16:41:08 +08:00
Pan Liu
1ed6a37611 bluestore: fixed compilation error when enable spdk
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2016-12-27 12:42:44 +08:00
Haomai Wang
eae7d5a645 msg/async: add dpdk stack plugin
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-11-09 11:39:20 +08:00
Kefu Chai
8c2bb7e5c6 cmake: add Find{dpdk,pciaccess}.cmake
to ready the SPDK support

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-02-04 14:03:21 +08:00