/INSTALL.md

https://github.com/pfq/PFQ · Markdown · 112 lines · 77 code · 35 blank · 0 comment · 0 complexity · 332c62331f3d59232432b60b1e005ce6 MD5 · raw file

  1. PFQ
  2. ===
  3. The following Guide is also available at [Getting-Starte-Guide](https://github.com/pfq/PFQ/wiki/Getting-Started-Guide).
  4. # Table of Contents
  5. This guide covers the following topics:
  6. 1. What is PFQ?
  7. 2. HW and SW Requirements.
  8. 3. Haskell and Linux Distributions.
  9. 4. Obtaining source codes.
  10. 5. Satisfy library dependencies.
  11. 6. Build the software.
  12. 7. Software components.
  13. ## What is PFQ
  14. PFQ is a multi-language network framework designed for the Linux Operating System and the Linux Kernel 3.x (or higher). It is highly optimized for multi-core processors,
  15. as well as for network devices equipped with multiple hardware queues (i.e. Intel 82599 10G).
  16. PFQ consists in a Linux Kernel module, user-space libraries, for the C, C++11/14, Haskell languages and native support for the accelerated libpcap library with programmable fanout.
  17. ## HW and SW Requirements
  18. * A 32/64-bit Linux operating system (Intel/AMD architectures are supported).
  19. * Linux Kernel 3.5 or higher.
  20. * Kernel headers, required to compile modules for your kernel.
  21. * A gcc compiler, the one used to compile the kernel in use.
  22. * A g++ compiler (g++-4.8/clang-3.4 or higher), for user-space tools and libraries.
  23. * The Haskell stack tool [haskell-stack](https://docs.haskellstack.org/en/stable/README/)
  24. * CMake, make, autoconf.
  25. * Flex and bison.
  26. ### Haskell and Linux Distributions (PIE)
  27. We recommend you to install the stack Haskell tool following the instructions at [Stackage](http://www.stackage.org/install) site.
  28. However, if you plan to install the Haskell platform from [Haskell-Platform](https://www.haskell.org/platform/), you may encounter compilation problems if you have a system with PIE (position independent executables) enabled by default (such as Ubuntu, Debian etc.).
  29. If it is your case, you have to edit the GHC settings file at:
  30. `/usr/local/haskell/ghc-___/lib/ghc-___/settings`
  31. and change the `compiler supports -no-pie` flag from "NO" to "YES".
  32. ## Obtaining the Source Codes
  33. Clone the source codes of PFQ from the GitHub repository with the following command:
  34. `git clone https://github.com/pfq/PFQ.git`
  35. ## Build the software
  36. * To build and install the framework:
  37. `stack Build.hs --build-type=Release install`
  38. The command will configure, compile and install the framework satisfying the dependencies of the libraries and the correct order for building the various components.
  39. * Alternatively, you can specify the list of components you want to build from the command line. The following command shows the targets available:
  40. ```
  41. stack Build.hs show
  42. targets:
  43. pfq.ko
  44. pfq-clib
  45. pfq-cpplib
  46. pfq-haskell-lib
  47. pfq-pcap-1.8.1-fanout
  48. pfq-hcounters
  49. pfq-lang
  50. pfq-affinity
  51. pfq-omatic
  52. pfq-load
  53. pfq-stress
  54. pfqd
  55. regression
  56. h-regression
  57. tools
  58. ```
  59. For example, to install pfq.ko and pfqd:
  60. `stack Build.hs -j3 --build-type=Release install pfq.ko pfqd`
  61. ## Software Components
  62. The following components are currently part of the framework:
  63. * pfq.ko
  64. * pfq-clib
  65. * pfq-cpplib
  66. * pfq-haskell-lib
  67. * pfq-pcap-1.8.1-fanout
  68. * pfq-hcounters
  69. * pfq-lang
  70. * pfq-affinity
  71. * pfq-omatic
  72. * pfq-load
  73. * pfq-stress
  74. * pfqd
  75. * regression
  76. * h-regression
  77. * tools