229 Commits

Author SHA1 Message Date
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
Jan Gelety
20754e6667 Update CSIT tests 170814 -> 170906
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I23c6b5cb9bab6e295ff145531eabc2d51df49a94
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-07 13:38:15 +00:00
Jan Gelety
b17f4c3ca7 Update CSIT tests 170731 -> 170814
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I09c8551e47dc78567e591ace1e552d3c534e5aab
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-18 13:27:40 +00:00
Jan Gelety
83d8fdabca Update CSIT tests 170724 -> 170731
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3ec322a71764d6d3e8aaeeabd4464fd6bde2880e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-02 13:04:37 +00:00
Jan Gelety
50b81e0703 Update CSIT tests 170626 -> 170724
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5837921208bfdfe604c187c103e78b0924d802b9
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-07-24 14:19:14 +00:00
Jan Gelety
75c3995b21 Update CSIT tests 170622 -> 170626
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3e429f3884953908209e5f2d4e7a254dc7ccb720
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-26 21:48:26 +00:00
Chris Luke
b2861e8fb6 make: Fix parallel building with some container platforms (VPP-880)
With some Linux container platforms /proc/cpuinfo reads as an empty
file. (Aside: stat on /proc/cpuinfo always indicates a length of
zero bytes, regardless of its content).

This has the effect that the make '-j' parameter being passed the
unhelpful value of '0' both in build-root/Makefile and dpdk/Makefile.
Make complains with the error:

  make: the '-j' option requires a positive integer argument

This patch checks for '0' and replaces it with '2' as a reasonable
number of jobs to run in parallel when the CPU count isn't known
(and assumed to be one). It also makes the value determination
consistent between VPP and DPDK (2*ncpu).

Change-Id: I78b89420114a825fab4d339e4f9291d486b7b9c8
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-06-24 14:02:37 +00:00
Jan Gelety
d36346afb7 Update CSIT tests 170612 -> 170622
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5645ebfaa32599797e4edf83b2281270ea4a8376
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-22 13:41:19 +00:00
Jan Gelety
0fc6595add Update CSIT tests 170605 -> 170612
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I0e19f085153ca00ddb46e016cff742b42eca15a0
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-12 11:59:40 +00:00
Jan Gelety
1728d4a81e Update CSIT tests 170529 -> 170605
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I49396105470609422f28a49211012fcd9f252587
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-06 09:41:06 +02:00
Peter Mikus
64543be4d4 Update CSIT tests 170518 -> 170529
Change-Id: I33de2948019683961b5ab576db2c3303c8d2bd5e
Signed-off-by: Peter Mikus <pmikus@cisco.com>
2017-06-02 09:47:24 +00:00
Dave Wallace
79ea7ec3b3 Revert "Update CSIT tests 170518 -> 170529"
This reverts commit 9757325c52c223d85abfad834b071077365d4808.

Change-Id: I3bee0fe7d48be723334f2bd9fffd3240658b9e71
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-05-31 01:59:48 +00:00
Chris Luke
cd76436097 Relocate Coverity scripts
- Move Coverity scripts from build-root/scripts to extras/scripts
- Update coverity-build with new path and add some comments

Change-Id: I1be8069fb574aaacbac9b7f2c9c80b9aad1790ec
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-05-29 22:30:44 +00:00
Jan Gelety
9757325c52 Update CSIT tests 170518 -> 170529
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I66357690f41e23dd1b924cc50a951a6c3696e071
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-05-29 22:16:41 +00:00
Chris Luke
aaeb341086 Simple script to 'git blame' on new Coverity issues
- Pass an email in to stdin and the script produces output similar
to:

Hi,

Please find the latest report on new defect(s) introduced to fd.io VPP
found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)

** CID 167726:  Resource leaks  (RESOURCE_LEAK)
/src/vnet/devices/af_packet/device.c: 215 in
af_packet_interface_admin_up_down()

________________________________________________________________________________________________________
*** CID 167726:  Resource leaks  (RESOURCE_LEAK)
/src/vnet/devices/af_packet/device.c: 215 in
af_packet_interface_admin_up_down()
>>>     CID 167726:  Resource leaks  (RESOURCE_LEAK)
>>>     Handle variable "fd" going out of scope leaks the handle.
00a9dcad vnet/vnet/devices/af_packet/device.c (Damjan Marion 2016-08-17
209)   af_packet_if_t *apif =
00a9dcad vnet/vnet/devices/af_packet/device.c (Damjan Marion 2016-08-17
210)     pool_elt_at_index (apm->interfaces, hw->dev_instance);
83cc4e14 vnet/vnet/devices/af_packet/device.c (Alpesh Patel  2016-04-05
211)   u32 hw_flags;
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
212)   int rv, fd = socket (AF_UNIX, SOCK_DGRAM, 0);
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
213)   struct ifreq ifr;
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
214)
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
215)   /* if interface is a bridge ignore */
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
216)   if (apif->host_if_index < 0)
2038ad01 src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-05-18
217)     goto error;			/* no error */
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
218)
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
219)   /* use host_if_index in case host name has changed */
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
220)   ifr.ifr_ifindex = apif->host_if_index;
** CID 167725:  Error handling issues  (NEGATIVE_RETURNS)
/src/vnet/devices/af_packet/device.c: 252 in
af_packet_interface_admin_up_down()

________________________________________________________________________________________________________
*** CID 167725:  Error handling issues  (NEGATIVE_RETURNS)
/src/vnet/devices/af_packet/device.c: 252 in
af_packet_interface_admin_up_down()
>>>     CID 167725:  Error handling issues  (NEGATIVE_RETURNS)
>>>     "fd" is passed to a parameter that cannot be negative.
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
246)     }
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
247)
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
248)   if ((rv = ioctl (fd, SIOCSIFFLAGS, &ifr)) < 0)
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
249)     {
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
250)       clib_unix_warning ("af_packet_%s error: %d",
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
251) 			 apif->is_admin_up ? "up" : "down", rv);
2038ad01 src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-05-18
252)       goto error;
c855b73f src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-04-21
253)     }
83cc4e14 vnet/vnet/devices/af_packet/device.c (Alpesh Patel  2016-04-05
254)
00a9dcad vnet/vnet/devices/af_packet/device.c (Damjan Marion 2016-08-17
255)   vnet_hw_interface_set_flags (vnm, hw_if_index, hw_flags);
83cc4e14 vnet/vnet/devices/af_packet/device.c (Alpesh Patel  2016-04-05
256)
2038ad01 src/vnet/devices/af_packet/device.c  (Ray Kinsella  2017-05-18
257) error:

Change-Id: I9756c16ea24e7520704155ae1f6c5f132087e3bc
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-05-24 07:39:43 +00:00
Jan Gelety
287ca3c916 Update CSIT tests 170504 -> 170518
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I916427584df514088f2d8cbcc3483c397ca4d6f5
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-05-18 14:55:14 +02:00
Neale Ranns
8aa1879651 move to CSIT 170504
Change-Id: I8b636ff57b6e6c3f4cfd2d77d930524559046dd9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-15 14:43:33 +00:00
Damjan Marion
5ef1fef692 Move scripts to extras/
Change-Id: I2abd6367915d4652fcf45025bd251046f3f206ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-26 15:39:18 +00:00
Damjan Marion
757585db71 Move emacs stuff to extras/
Change-Id: Ibbb7d8500e9064215cf912bd00bdf72a748f8a27
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-24 14:49:00 +00:00
Damjan Marion
48009e4c57 Move vagrant stuff to extras/
Change-Id: I7e3d6ecc3f23d862004c273e23e36e234ceb6015
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-20 12:57:33 +00:00
Damjan Marion
686c1c8454 Extend ebuild to specify "configure" subdir, enable verify for sample-plugin
Change-Id: I2056e5d19bc3713e7a13e015dabf3b2431800973
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-20 11:30:28 +00:00
Damjan Marion
c06eeb0e3c Fix "make dist" to include version number, docouple it from rpm packaging
Change-Id: If2f9976d668089026c97b897cf449bff09050631
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-19 20:16:14 +00:00
Jan Gelety
c4ba20fe05 Update CSIT tests 170313 -> 170403
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I4bf32bc12c7417f7c19b23287a2b2899eb8fb02d
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-04-03 10:05:34 +00:00
Ole Troan
afaa85f873 Python API: Fixup of debian package after cFFI changes.
Change-Id: I4c2a1a818f28d4c6cf52af45f3b7dbfa41d77ccb
Signed-off-by: Ole Troan <ot@cisco.com>
2017-03-27 18:58:11 +00:00
Ole Troan
c60f557590 Python API: Fix RPM packaging (again).
Change-Id: I5c510cde1227a131ddda58d090cd5dbf112ce1fb
Signed-off-by: Ole Troan <ot@cisco.com>
2017-03-17 14:24:21 +00:00