253 Commits

Author SHA1 Message Date
Renato Botelho do Couto
893dacae3f build: Use $(MAKE) instead of direct call to make
No functional changes, just make it to respect original make binary
name used to start building

Type: improvement

Change-Id: Ic8568237fbb39c6a0d3b7405a9670e9410aeb752
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-06-10 13:13:31 +00:00
Tom Jones
26eec75f2b build: Detect number of CPUs for build processes on FreeBSD
Type: improvement
Change-Id: Ia3a00266f47f0c3e567efa143ef08bf4e8cffe35
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:09:39 +00:00
Tom Jones
0aa0d6ffbe build: Explicitly use gmake
VPP requires GNU Make to build, on GNU systems (such as Debian), GNU
Make is installed as 'make', typically with a symlink from 'gmake'.

On other systems (such as FreeBSD), 'make' is a BSD Make derriviative
and GNU Make is installed a 'gmake'.

Use $(MAKE) variable for make calls from within Makefiles.  This
variable is set to the path of the calling make program, i.e.,
/usr/local/bin/gmake on a bsd system.

This is the recommended way to call make from Makefiles in the GNU Make
documentation.

Type: improvement
Change-Id: Id9162a34a0f8358f22090718087918dae31c0fce
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-21 14:42:03 +00:00
Tom Jones
c3b416c492 build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.

Look up the location of bash for makefiles.

Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-19 12:30:01 +00:00
Damjan Marion
a5167edc66 build: remove unused files and sections
Type: make
Change-Id: Ia1d8c53c5fb02f7e5c86efab6e6ccd0fdb16bc96
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-02 16:18:33 +00:00
Damjan Marion
ac8f936fdc build: Makefile cleanup
Type: make
Change-Id: I751b0a25161c6eb8614ca19f7c77a4de82401f3d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27 23:42:02 +00:00
Mohammed Hawari
b78607b1db build: do not _FORTIFY_SOURCE in debug mode
When compiling in -O0, the glibc feature.h ignores _FORTIFY_SOURCE and,
in some distributions, throws a #warning, which fails the build. This
patch removes -D_FORTIFY_SOURCE in all debug configurations.

Change-Id: Ic30229c038353e49ff9419779e082a7083c1ea5f
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-28 08:38:21 +00:00
Neale Ranns
2a81d9a4cc build: add the missing leading underscore to FORTIFY_SOURCE
Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
2021-01-20 11:00:11 +00:00
Dave Barach
1b576e0aa0 ebuild: follow symbolic links in find_newer_filtered_fn
Otherwise, changes in source code symbolically-linked into the
workspace will not be considered when deciding whether to invoke
e.g. Ninja.

This change is strongly preferable to asking people to remove
.mu_build_build_timestamp to force a Ninja run.

Deals reasonably gracefully with symbolic link loops, at least in
trivial cases: "find: File system loop detected"

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I6666c84861de5e8b8aebcb94158f53526aded089
2021-01-05 17:08:54 +00:00
Damjan Marion
942542f7c1 misc: migrate from GNU indent to clang-format
Type: make
Change-Id: I085dcd6fe826da14d456f84a23355310bdc5d1e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-18 11:06:33 +01:00
Simon Chatterjee
810ad343de build: remove un-needed script
The move to cmake obviates the need for this build script (and its terminology).

Type: make

Signed-off-by: Simon Chatterjee <code@chatts.net>
Change-Id: Ie17429bfdf5a4b02ce2b70ba3568a7445c162d38
2020-06-15 18:46:38 +00:00
Dave Barach
119286ee52 build: reject merge conflict checkin attempts
Although attempts to build code containing merge conflict markers
USUALLY results in compile errors, this patch adds an explicit check
for the conflict end marker.

If for some unknown reason it's necessary to check in the text
'>>>>>>>', construct it by concatenation: ">>>"">>>>"
or '>>>' + '>>>>' depending on the language involved.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iaad2aa8b87a71137a3bb9a09f7f4159909bf79ab
2020-05-09 00:27:35 +00:00
Dave Barach
952ec0e0a6 ebuild: fix the distclean target
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I32142962cb70ea0d92cda1b0ffaac42b7de15974
2020-02-28 16:59:02 +00:00
Andrew Yourtchenko
56ac770df9 misc: fix the MAKE_PARALLEL_JOBS for 'make verify' target
MAKE_PARALLEL_JOBS was prepending "-j", which in case of nested targets like "verify"
resulted in ninja being executed with "-j -j" flags.

Solution: prepend -j only at the moment of setting the MAKE_PARALLEL_FLAGS variable,
this keeps MAKE_PARALLEL_JOBS intact regardless of depth of the job call tree.

Type: make
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I10a69fe527758e5a862852a9f2102aeaca30e88f
2020-02-08 14:21:58 +00:00
Benoît Ganne
30cca512ce build: remove valgrind leftovers
Valgrind never really worked well with VPP. Remove the partial support.

Type: refactor

Change-Id: Ic09773fd85f904fdd2240bc161e23a4c2b196cf6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-26 09:46:12 +00:00
juraj.linkes
664ec91fde ebuild: Unite default build platform to vpp
Top level makefile is using vpp as the default platform. The other place
where platform is specified has native as the default. Unite them to the
only currently supported platform - vpp.

Type: make

Change-Id: Idb12ccc3056dd6be640a2d6763dc30e4f789d2ac
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-10-03 16:56:38 +00:00
Ole Troan
6a3064fdf6 tools: FEATURE.yaml meta-data infrastructure
Add tooling for feature metadata configuration files.
The main tool is in src/scripts/fts.py

make checkfeaturelist to validate against schema.
make featurelist to dump all feature lists to stdout.

Example feature definition:

name: IP in IP tunnelling
maintainer: Ole Troan <ot@cisco.com>
features:
  - IPv4/IPv6 over IPv4/IPv6 encapsulation:
    - Fragmentation and Reassembly
    - Configurable MTU
    - Inner to outer Traffic Class / TOS copy
    - Configurable Traffic Class / TOS
  - ICMPv4 / ICMPv6 proxying
  - 6RD (RFC5969):
    - Border Relay

description: "Implements IP{v4,v6} over IP{v4,v6} tunnelling as
              described in RFC2473. This module also implement the border relay of
	      6RD (RFC5969)."

state: production
properties: [API, CLI, STATS, MULTITHREAD]
missing:
  - Tunnel PMTUD
  - Tracking of FIB state for tunnel state
  - IPv6 extension headers (Tunnel encapsulation limit option)

JSON schema is embedded in fts.py

Example markdown: https://github.com/otroan/scratch/blob/master/features.md

Change-Id: I903b4ee6b316a9378c259e86dc937092e5d4b7da
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-31 11:44:27 +00:00
Burt Silverman
e529732607 Run vpp-configure on change to cmake config files.
Modify the dirs assignment in configure_check_timestamp to
add the build-data/platforms/$(PLATFORM).mk file, all the CMakeLists.txt
files in the $(PACKAGE_SOURCE) tree, and the $(PACKAGE_SOURCE)/cmake
directory.
(For example, for package vpp, $(PACKAGE_SOURCE) is <Top of Tree>/src).
Note that in an earlier era there was no build-data/platforms directory and
no CMakeLists.txt files.
Also, we tacitly assume that $(SOURCE_PATH_BUILD_DATA_DIRS) is only one
directory whereas ebuild has been used in environments where there are two
treetops.

Change-Id: I761219adbdb4c7e675bb12b3e7f052db68f0294c
Signed-off-by: Burt Silverman <burtms@gmail.com>
2019-01-26 18:31:17 +00:00
Damjan Marion
4d2f86a1eb Rework of debian packaging
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-20 16:14:24 +00:00
Dave Barach
b2204671da Delete shared memory segment files when vpp starts
Should have been done this way years ago. My bad.

Change-Id: Ic7bf937fb6c4dc5c1b6ae64f2ecf8608b62e7039
Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-01 00:32:56 +00:00
Dave Barach
5f1fd46573 Add x86_64 perfmon tables
The license issue is resolved, so we can package the .json
files. Added to the vpp-dev package in .tar.xz form, which saves a lot
of space.

Updated the perfmon error log entry: tell folks where to find the
compressed tarball, and how to extract it.

Change-Id: I3ed351fbf154cc3ba22d5f9c666acff77a2a14cf
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-25 01:04:44 +00:00
Dave Barach
4d1a866aff X86_64 perf counter plugin
Change-Id: Ie5a00c15ee9536cc61afab57f6cadc1aa1972f3c
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22 12:02:04 +00:00
Damjan Marion
79dcbc74cd Always use 'lib' instead of 'lib64'
It is packaging responsibility to put libs in the right place.
Use of lib64 resulted in huge amount of files with hardcoded lib64.
This patch simplifies things...

Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 16:38:59 +00:00
Damjan Marion
cc4a5e8089 Move java api to extras/
Change-Id: Ibd5cbbdfb22a235442cddaebc9eae9a3c4e35ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-01 20:28:53 +00:00
Klement Sekera
8432e6e6f7 allow specifying number of concurrent jobs
If defined, Use MAKE_PARALLEL_JOBS as number of concurrent jobs for
build process instead of the internal calculation based on /proc/cpuinfo.

Change-Id: I18d1f526dc5c156c1cd9c9cf6dbbfd9cb8dbbad7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-24 15:19:07 +00:00
Damjan Marion
55f99675e5 remove bootstrap from top-level Makefile
Change-Id: I9f2a1ba9153ff57958b230a1ba2afeb9df50fd45
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-15 22:14:55 +01:00
Damjan Marion
92b44ea50a use system provided ccache links
Change-Id: I0860bbd0cf368fc3638b861504ebf642ee9d3807
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-15 02:09:05 +01:00
Dave Barach
5a72e425f9 Clean up vpp build bootstrap step
Net of rewriting vppapigen in python-ply, there's no need to compile
vppinfra.

Install a copy of vppapigen in .../build-root/tools/bin, so
the sample plugin build will work. Rationalize suffix-rules.mk.

Add clang, clang++ links to .../build-root/ccache-bin.

Change-Id: Ib4017848b7767b6054238ea544ee5319667c3659
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-14 19:06:16 +00:00
Dave Barach
8d0f2f0031 License text cleanup
Change-Id: I105375c653b1a1dce8f0f71005b281ff137c6f42
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-12 15:08:44 +00:00
Jan Gelety
237d5aa0bf vpp-csit-verify: use latest verified CSIT branch by default
- align vpp code with ci-management change:
  https://gerrit.fd.io/r/#/c/10518/

Change-Id: I595e02e65db74c39801d8a7a98c5b24a18dbf8fc
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-02-21 15:36:17 +00:00
Billy McFall
28cf3b7da2 VPP-899: Run VPP under SELinux
Add an SELinux profile such that VPP can run under SELinux on RPM based
platforms. The SELinux Policy is currently only implemented for RPM
packages, specifically, Fedora, CentOS and RHEL. Doxygen User
Documentation has been included (selinux_doc.md). Once some discussion
on file locations has completed (see vpp-devlist), updates to the Debug
CLI documentation will also need to be updated.

Additional changes:
Patch Set 2:
- Rework selinux_doc.md such that each line is only 80 characters
  instead of each sentence on a line. Made additonal minor chnages
  to the text.
- Update vHost Debug CLI documentation to reflex new socket location.
  Cleaned up some text from when I originally wrote it, to better
  reflex proper use.
- Update exec Debug CLI documentation to be more inline with suggested
  helptext, added text regarding recommended script file location.
- For Debian builds, create the /var/log/vpp/ directory. I don't use
  Debian very much, so please pay extra attention to
  build-data/platforms.mk and build-root/deb/debian/.gitignore.
- Per discussion on VPP call, changed the default log location to
  /var/log/vpp/vpp.log.
- Changed the socket location for vHost in AutoConfig to
  /var/run/vpp/.
Patch Set 3:
- Update selinux_doc.md based on comments.

Change-Id: I400520dc33f1ca51012d09ef8fe5a7b7b96c631e
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2018-01-30 13:26:20 +00:00
Jan Gelety
7e6f8cc4b6 Update CSIT tests 180115 -> 180122
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I1a5afd49c37e1faf59311e16389b3b5deff015a3
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-01-25 16:31:42 +00:00
Ole Troan
9d42087149 VPPAPIGEN: vppapigen replacement in Python PLY.
This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.

Changes:
 - vl_api_version to option version = "major.minor.patch"
 - enum support
 - Added error checking and reporting
 - import support (removed the C pre-processor)
 - services (tying request/reply together)

Version:
 option version = "1.0.0";

Enum:
 enum colours {
   RED,
   BLUE = 50,
 };
 define foo {
  vl_api_colours_t colours;
 };

Services:
 service {
  rpc foo returns foo_reply;
  rpc foo_dump returns stream foo_details;
  rpc want_stats returns want_stats_reply
      events ip4_counters, ip6_counters;
 };

Future planned features:
 - unions
 - bool, text
 - array support (including length)
 - proto3 output plugin
 - Refactor C/C++ generator as a plugin
 - Refactor Java generator as a plugin

Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf
Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-23 13:03:53 +00:00
Jan Gelety
887ffb65fd Update CSIT tests 171218 -> 180115
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I25a69cf3c9a93754e0cbfc0c1bc62f10883d3027
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-01-16 08:37:50 +01:00
Neale Ranns
5ee623e789 makefile set CXXFLAGS so they are propageted to sub-builds
Change-Id: I55d9953851062f7106c66701d46bcd9073cf1ee4
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-10 07:27:17 -08:00
Jan Gelety
3df8728088 Update CSIT tests 171204 -> 171218
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5ad0e36fa40095cc107a31b32dd2bbf936636dc4
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-12-18 09:03:17 +01:00
Jan Gelety
87c30d9c10 Update CSIT tests 171127 -> 171204
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I9a154daa661fc5f2f1e7c2eeb77a4bb08d4e34be
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-12-04 11:26:26 +00:00
Jan Gelety
44c9f7e75f Update CSIT tests 171030 -> 171127
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I54f8d49f541102163964a41403ab993a51534e7e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-11-27 15:28:53 +00:00
Ed Kern
62b29a242c Makefile: make_parallel_flags via env variable
/proc/cpuinfo with container builds may lead to jenkins failures
    ability to pass in MAKE_PARALLEL_FLAGS via env directly for
    container builds

Change-Id: Id02acb542d5ffbe3f4dec7712ae2cb07512b236d
Signed-off-by: Ed Kern <ejk@cisco.com>
2017-11-22 20:19:00 +00:00
Damjan Marion
9324284af8 Reduce number of parallel builds
With recent introduction of C++ code required memory for each compiler
instance has significantly increased causing build issues.

Currently build system spins 2 compiler instances per logical CPU core.

As CPU can hardly execute more than one thread at a time, it should be
pretty safe to change that formula so it doesn't multiply number of cpu
cores by 2 and such change will signifucantly reduce amount of memory
needed.

Change-Id: Ic829fff6e45f4caf98a6d9c1c98c53ed003039ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-13 20:09:23 +01:00
Gabriel Ganne
addb55b9e0 fix debian packages generation (invalid warning silencing)
During dh_shlibdeps, we silence some plugin-related warnings using
"grep -v". grep is the last command of the line, and returns 1 on match.
Therefore, the whole make step fails.

This patch merges the two grep commands, and ignores the grep return
value.

Change-Id: I1237162ab3c9937dbc340e5a2fce7ec779a19f39
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-11-06 14:25:11 +01:00
Dave Barach
0c0fe27b9f Clean up a few historical anomalies
Change-Id: I5d36a8a54fa6f73ea2b3761413098867dae1df74
Signed-off-by: Dave Barach <dave@barachs.net>
2017-11-01 09:30:41 +00:00
Jan Gelety
4f68e042b7 Update CSIT tests 171017 -> 171030
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I818bb7f1778cd92716feeaeb9fc1af59c62bdbc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-31 19:25:49 +00:00
Jan Gelety
0178efd690 Update CSIT tests 171002 -> 171017
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ib098170bbcdbbb01c25ef197d9181cfd826d2854
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-17 08:08:22 +00:00
Klement Sekera
6b6bd9d0b2 checkstyle: add clang-format dependency, fix bug
Change-Id: I608d3b73700d57652b015a9fc09300e99386a37f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-04 15:02:29 +00:00
Jan Gelety
62549fec3b Update CSIT tests 170926 -> 171002
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I6331016b17b0811bf0ea1be03c5782428514a01a
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-04 09:44:53 +00:00
Jan Gelety
891c94d5d3 Update CSIT tests 1700906 -> 170926
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: If582dc7c5e37bd3cda7ba4858e98fc504e2b7b1e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-27 14:20:05 +00:00
Klement Sekera
8a398bbae2 checkstyle: ignore old clang-format (centos)
Change-Id: Iecf35bd9fd760856e32eb1c0c9542ffbed472379
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-26 16:11:31 +00:00
Klement Sekera
dc15be2ca7 Add C++ API
Change-Id: Iff634f22d43470e2dc028387b3816257fd7b4156
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-19 20:06:08 +00:00
Marco Varlese
7ba443706b The missing variable (added with this patch) was causing the build on AARCH64
platforms to default to lib (instead of lib64) when not explicitely defining
the --libdir through the configure script.

This patch fixes that.

Change-Id: Ia4c152e0f40acab7f098885d672ff9385f57b0fe
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-07 13:41:12 +00:00