]> git.proxmox.com Git - mirror_ovs.git/blame - Documentation/intro/install/fedora.rst
rhel: Add option to enable AF_XDP on rpm package.
[mirror_ovs.git] / Documentation / intro / install / fedora.rst
CommitLineData
45742db4
SF
1..
2 Licensed under the Apache License, Version 2.0 (the "License"); you may
3 not use this file except in compliance with the License. You may obtain
4 a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 License for the specific language governing permissions and limitations
12 under the License.
13
14 Convention for heading levels in Open vSwitch documentation:
15
16 ======= Heading 0 (reserved for the title in a document)
17 ------- Heading 1
18 ~~~~~~~ Heading 2
19 +++++++ Heading 3
20 ''''''' Heading 4
21
22 Avoid deeper levels because they do not render well.
23
795752a3
SF
24===========================================
25Fedora, RHEL 7.x Packaging for Open vSwitch
26===========================================
45742db4
SF
27
28This document provides instructions for building and installing Open vSwitch
29RPM packages on a Fedora Linux host. Instructions for the installation of Open
30vSwitch on a Fedora Linux host without using RPM packages can be found in the
795752a3 31:doc:`general`.
45742db4
SF
32
33These instructions have been tested with Fedora 23, and are also applicable for
34RHEL 7.x and its derivatives, including CentOS 7.x and Scientific Linux 7.x.
35
36Build Requirements
37------------------
38
6806b962
FL
39You will need to install all required packages to build the RPMs.
40Newer distributions use ``dnf`` but if it's not available, then use
41``yum`` instructions.
42
43The command below will install RPM tools and generic build dependencies.
44And (optionally) include these packages: libcap-ng libcap-ng-devel dpdk-devel.
45
46DNF:
47::
48
49 $ dnf install @'Development Tools' rpm-build dnf-plugins-core
50
51YUM:
52::
53
54 $ yum install @'Development Tools' rpm-build yum-utils
55
56Then it is necessary to install Open vSwitch specific build dependencies.
57The dependencies are listed in the SPEC file, but first it is necessary
58to replace the VERSION tag to be a valid SPEC.
59
936cca17
BP
60The command below will create a temporary SPEC file::
61
6806b962
FL
62 $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in \
63 > /tmp/ovs.spec
64
65And to install specific dependencies, use the corresponding tool below.
daa867f6 66For some of the dependencies on RHEL you may need to add two additional
cf372495 67repositories to help yum-builddep, e.g.::
e3882e4d 68
cf372495
YHW
69 $ subscription-manager repos --enable=rhel-7-server-extras-rpms
70 $ subscription-manager repos --enable=rhel-7-server-optional-rpms
6806b962 71
a82083ee 72or for RHEL 8::
2eebece5 73
a82083ee
GR
74 $ subscription-manager repos \
75 --enable=codeready-builder-for-rhel-8-x86_64-rpms
76
936cca17
BP
77DNF::
78
6806b962
FL
79 $ dnf builddep /tmp/ovs.spec
80
936cca17
BP
81YUM::
82
6806b962
FL
83 $ yum-builddep /tmp/ovs.spec
84
85Once that is completed, remove the file ``/tmp/ovs.spec``.
45742db4
SF
86
87Bootstraping
88------------
89
795752a3 90Refer to :ref:`general-bootstrapping`.
45742db4
SF
91
92Configuring
93-----------
94
795752a3 95Refer to :ref:`general-configuring`.
45742db4
SF
96
97Building
98--------
99
100User Space RPMs
101~~~~~~~~~~~~~~~
102
103To build Open vSwitch user-space RPMs, execute the following from the directory
104in which `./configure` was executed:
105
106::
107
108 $ make rpm-fedora
109
1ca0323e 110This will create the RPMs `openvswitch`, `python3-openvswitch`,
78203a9c 111`openvswitch-test`, `openvswitch-devel` and `openvswitch-debuginfo`.
45742db4
SF
112
113To enable DPDK support in the openvswitch package, the ``--with dpdk`` option
114can be added:
115
116::
117
fb876c94 118 $ make rpm-fedora RPMBUILD_OPT="--with dpdk --without check"
45742db4 119
9acbdd65
YHW
120To enable AF_XDP support in the openvswitch package, the ``--with afxdp``
121option can be added:
122
123::
124
125 $ make rpm-fedora RPMBUILD_OPT="--with afxdp --without check"
126
fb876c94
RB
127You can also have the above commands automatically run the Open vSwitch unit
128tests. This can take several minutes.
45742db4
SF
129
130::
131
fb876c94 132 $ make rpm-fedora RPMBUILD_OPT="--with check"
45742db4 133
78203a9c 134
45742db4
SF
135Kernel OVS Tree Datapath RPM
136~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
138To build the Open vSwitch kernel module for the currently running kernel
139version, run:
140
141::
142
143 $ make rpm-fedora-kmod
144
145To build the Open vSwitch kernel module for another kernel version, the desired
146kernel version can be specified via the `kversion` macro. For example:
147
148::
149
150 $ make rpm-fedora-kmod \
151 RPMBUILD_OPT='-D "kversion 4.3.4-300.fc23.x86_64"'
152
153Installing
154----------
155
156RPM packages can be installed by using the command ``rpm -i``. Package
157installation requires superuser privileges.
158
159The `openvswitch-kmod` RPM should be installed first if the Linux OVS tree
160datapath module is to be used. The `openvswitch-kmod` RPM should not be
161installed if only the in-tree Linux datapath or user-space datapath is needed.
11e02906 162Refer to the :doc:`/faq/index` for more information about the various Open
45742db4
SF
163vSwitch datapath options.
164
165In most cases only the `openvswitch` RPM will need to be installed. The
1ca0323e 166`python3-openvswitch`, `openvswitch-test`, `openvswitch-devel`, and
45742db4
SF
167`openvswitch-debuginfo` RPMs are optional unless required for a specific
168purpose.
169
5813d810
SF
170Refer to the `RHEL README`__ for additional usage and configuration
171information.
172
173__ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst
45742db4
SF
174
175Reporting Bugs
176--------------
177
178Report problems to bugs@openvswitch.org.