doc: adjust line lengths in freebsd guide
[dpdk.git] / doc / guides / freebsd_gsg / sys_reqs.rst
1 ..  BSD LICENSE
2     Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
3     All rights reserved.
4
5     Redistribution and use in source and binary forms, with or without
6     modification, are permitted provided that the following conditions
7     are met:
8
9     * Redistributions of source code must retain the above copyright
10     notice, this list of conditions and the following disclaimer.
11     * Redistributions in binary form must reproduce the above copyright
12     notice, this list of conditions and the following disclaimer in
13     the documentation and/or other materials provided with the
14     distribution.
15     * Neither the name of Intel Corporation nor the names of its
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23     OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 System Requirements
32 ===================
33
34 This chapter describes the packages required to compile the Intel® DPDK.
35
36 Compilationofthe Intel® DPDK
37 ----------------------------
38
39 .. note::
40
41     The Intel® DPDK and its applications requires the GNU make system (gmake)
42     and the GNU Compiler Collection (gcc) to build on FreeBSD*.  The
43     installation of these tools is covered in this section.
44
45 **Required Tools:**
46
47 .. note::
48
49     Testing has been performed using FreeBSD* 9.2-RELEASE (x86_64), FreeBSD*
50     10.0-RELEASE (x86_64) and requires the installation of the kernel sources,
51     which should be included during the installation of FreeBSD*.  The Intel®
52     DPDK also requires the use of FreeBSD* ports to compile and function.
53
54 To use the FreeBSD* ports system, it is required to update and extract the FreeBSD*
55 ports tree by issuing the following commands:
56
57 .. code-block:: console
58
59     root@host:~ # portsnap fetch
60     root@host:~ # portsnap extract
61
62 If the environment requires proxies for external communication, these can be set
63 using:
64
65 .. code-block:: console
66
67     root@host:~ # setenv http_proxy <my_proxy_host>:<port>
68     root@host:~ # setenv ftp_proxy <my_proxy_host>:<port>
69
70 The FreeBSD* ports below need to be installed prior to building the Intel® DPDK.
71 In general these can be installed using the following set of commands:
72
73 #.  cd /usr/ports/<port_location>
74
75 #.  make config-recursive
76
77 #.  make install
78
79 #.  make clean
80
81 Each port location can be found using:
82
83 .. code-block:: console
84
85     user@host:~ # whereis <port_name>
86
87 The ports required and their locations are as follows:
88
89 *   dialog4ports
90
91 *   /usr/ports/ports-mgmt/dialog4ports
92
93 *   gcc: version 4.8 is recommended
94
95 *   /usr/ports/lang/gcc48
96
97 *   Ensure that CPU_OPTS is selected (default is OFF)
98
99 *   GNU make(gmake)
100
101 *   Installed automatically with gcc48
102
103 *   coreutils
104
105 *   /usr/ports/sysutils/coreutils
106
107 *   libexecinfo  (Not required for FreeBSD* 10)
108
109 *   /usr/src/contrib/libexecinfo
110
111 When running the make config-recursive command, a dialog may be presented to the
112 user. For the installation of the Intel® DPDK, the default options were used.
113
114 .. note::
115
116     To avoid multiple dialogs being presented to the user during make install,
117     it is advisable before running the make install command to re-run the
118     make config -recursive command until no more dialogs are seen.
119
120 Running Intel® DPDK Applications
121 --------------------------------
122
123 To run an Intel® DPDK application, physically contiguous memory is required.
124 In the absence of non-transparent superpages, the included sources for the
125 contigmem kernel module provides the ability to present contiguous blocks of
126 memory for the Intel® DPDK to use.  Section 3.4, “Loading the Intel® DPDK
127 Contigmem Module” on page 8 for details on the loading of this module.
128
129 Using Intel® DPDK Contigmem Module
130 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131
132 The amount of physically contiguous memory along with the number of physically
133 contiguous blocks can be set at runtime and prior to module loading using:
134
135 .. code-block:: console
136
137     root@host:~ # kenv hw.contigmem.num_buffers=n
138     root@host:~ # kenv hw.contigmem.buffer_size=m
139
140 The kernel environment variables can also be specified during boot by placing the
141 following in /boot/loader.conf:
142
143 ::
144
145     hw.contigmem.num_buffers=n hw.contigmem.buffer_size=m
146
147 The variables can be inspected using the following command:
148
149 .. code-block:: console
150
151     root@host:~ # sysctl -a hw.contigmem
152
153 Where n is the number of blocks and m is the size in bytes of each area of
154 contiguous memory.  A default of two buffers of size 1073741824 bytes (1 Gigabyte)
155 each is set during module load if they are not specified in the environment.
156
157 .. note::
158
159     The /boot/loader.conf file may not exist, but can be created as a root user
160     and should be given permissions as follows:
161
162 .. code-block:: console
163
164         root@host:~ # chmod 644 /boot/loader.conf