Compare commits

..

50 Commits

Author SHA1 Message Date
Florin Coras
e4a0f9fdc0 tcp: handle disconnects in rcv-process
Change-Id: I005f96480e81f3e750c18261e78d0e401da7528e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 79fdfd61245a112ff08f5c3bc3fb1afd5db55fb9)
2019-06-03 17:07:27 +00:00
Dave Barach
1662c9cd23 VPP-1692: move NULL pointer check
TBH, this looks like merge damage or some such. Perfectly fine NULL pointer
check, about three lines after it was needed.

Change-Id: I52831062e30533a59fb76b644ee5ae389676d2ae
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-31 12:47:05 +00:00
Dave Wallace
85ff806452 19.04.1 Release Notes
Change-Id: I2a69b29b9ecea2bfdf1832c184c7e63058a33b94
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-29 17:34:59 -04:00
Florin Coras
366b5a477c tcp: handle fin+rst in same frame
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-25 03:21:06 -07:00
Steven Luong
c2c89782d3 tap: crash in multi-thread environment
In tap tx routine, virtio_interface_tx_inline, there used to be an
interface spinlock to ensure packets are processed in an orderly fashion
  clib_spinlock_lock_if_init (&vif->lockp);

When virtio code was introduced in 19.04, that line is changed to
  clib_spinlock_lock_if_init (&vring->lockp);
to accommodate multi-queues.

Unfortunately, althrough the spinlock exists in the vring, it was never
initialized for tap, only for virtio. As a result, many nasty things can
happen when running tap interface in multi-thread environment. Crash is
inevitable.

The fix is to initialize vring->lockp for tap and remove vif->lockp as it
is not used anymore.

Change-Id: Ibc8f5c8192af550e3940597c06992dfdaccb4c49
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-23 09:49:32 -07:00
Mohsin Kazmi
55203e745f Tap: Fix the indirect buffers allocation VPP-1660
Indirect buffers are used to store indirect descriptors
to xmit big packets.
This patch moves the indirect buffer allocation from
interface creation to device node. Now it allocates
or deallocates buffers during tx for chained buffers.

Change-Id: I55cec208a2a7432e12fe9254a7f8ef84a9302bd5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-23 11:37:45 +00:00
Andrew Yourtchenko
f60be11516 19.01.2 Release Notes
Change-Id: Ia68372d397504ede789e40e9f7e1b939d09bc81a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-05-17 16:47:47 +00:00
Andrew Yourtchenko
36102c5b07 ipsec-mb: fix the "make test" on non-AESNI platforms
"make test" fails with invalid instruction on non-AESNI platform,
so do not register the ipsec-mb crypto backend in this case.

Change-Id: I61887e40ce3d39880e7da534b9dee00fd677d8fd
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit c74009dce1b2f1466112775a68a5608d754c7c76)
2019-05-17 13:47:46 +00:00
Sergio Gonzalez Monroy
d37b3d96c5 dpdk-ipsec: fix encrypt/decrypt single queue
When the same worker thread processes packet for encrypt and decrypt,
ie. single worker with bi-directional traffic, given that the queue is
shared results in packets to be decrypted being dropped as the encrypt
always happens first for each main loop.

With this change, each crypto device queue is logically split into two
queues, each half the real size, avoiding the described problem.

Change-Id: Ifd3f15e316c92fbd6ca05802456b10a7f73f85da
Signed-off-by: Sergio Gonzalez Monroy <sgmonroy@gmail.com>
(cherry picked from commit d8a34a57b12200000bb42d1c55f1a99a0a473f4b)
2019-05-17 12:43:56 +00:00
Benoît Ganne
ad62a0e91b rpm: VPP-1674: exclude external headers from rpm
External libraries headers such as DPDK, libibverb, quicly, etc. should
not be packaged in vpp-dev RPM.
Only package headers from vpp/ and vom/ subdirs.

Change-Id: Ief1454bd1261c8cf4dcd3b105e28f6852439e896
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-15 18:25:02 +02:00
Dave Wallace
fcbc0c64f3 plugins: clean up plugin descriptions
- Make plugin descriptions more consistent
  so the output of "show plugin" can be
  used in the wiki.

Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 1d1985de91833a5483a6b7ee96ef4090d530a7a6)
2019-05-13 13:48:44 +00:00
Florin Coras
725c6c4164 session: fix segment size rounding and size init
Change-Id: Iceb2a46802ed13f319cb16f1df236b11dc3c00f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-09 14:11:38 -07:00
Steven Luong
6f05f724f4 mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI

Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
2019-05-03 00:19:41 +00:00
Dave Barach
79ad20fc04 Clean up multi-thread barrier-sync hold-down timer
Main thread: don't bother with the barrier sync hold-down timer if
none of the worker threads are busy.

Worker threads: avoid epoll_pwait (10ms timeout) when the
control-plane has been active in the last half-second.

Change-Id: I82008d09968c65e2a4af0ebb7887389992e60603
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 9ae190e9d228bfc1358482d4f07da1f4cfd41c90)
2019-05-01 23:51:20 +00:00
Dave Wallace
7cbf2d154a DOCS: Add link to 19.04 make test documentation
Change-Id: Iffa44b6a20f8446c94f8412e937ca40273aa8f2f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-30 13:55:38 +00:00
Ole Troan
1cb333cdf5 stats: Add version defines in stat_client.h
Change-Id: I9894a0c613b0486112623920d49371ceec9e6111
Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-29 12:03:45 +00:00
Mohsin Kazmi
9896d55f7a tap: Fix the indirect buffer allocation VPP-1660
Change-Id: I73f76c25754f6fb14a49ae47b6404f3cbabbeeb5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-26 10:23:49 +00:00
Neale Ranns
873b9ed405 IPSEC; dpdk backend for tunnel interface encryption (VPP-1662)
Change-Id: Ide2a9df18db371c8428855d7f12f246006d7c04c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-24 18:35:02 -04:00
Dave Wallace
3d18a191aa VPP 19.04 Release Notes
Change-Id: I66b35c7c03303bc7200c01e9da926bce778b2d6b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-23 21:43:18 +00:00
Igor Mikhailov (imichail)
c0e614c88d RH7/Centos7: remove python-ply as it is not needed
Also remove double required packages

Change-Id: Ifcc7c9c0a4ce62d89a246019147d194610f5167a
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-04-22 19:14:37 -07:00
Florin Coras
2f61df5764 vlib epoll: handle file removal on EPOLLIN VPP-1656
Change-Id: I7a3526a8fdf17afb8cc2225bdfbd57f661680992
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-22 17:59:19 +00:00
Dave Wallace
facb4d4447 Sphinx docs: Fix security vulnerability (VPP-1655)
Change-Id: I9b11d15866d708eb843936ebfd120940d284a2de
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-21 18:20:18 -04:00
Dave Wallace
2ac1ddb59c DOCS-ONLY: Fix broken doxygen tag in BVI
Change-Id: Ia42e7c93ebe51a36470f1358827451bcb98da433
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 3b62e29c3adc8e4114cb10dc794f4b3f814015b0)
2019-04-19 15:16:24 +00:00
Neale Ranns
84ac8ac369 IPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654)
Change-Id: Ia3474e5bfea5764eae9b2987bf78296535df6778
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-19 04:02:59 +00:00
Neale Ranns
9fdfcf3274 IPSEC: ESP IPv6 transport mode payload length incorrect (VPP-1653)
Change-Id: I8977100d7a22b50260858bd1ea9db419b53284ff
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-19 02:36:45 +00:00
Florin Coras
fd2cd9c899 vlib epoll: protect against clib file pool expansion
Change-Id: I320e7c2fdacb3056bc448c73fec08d9e2978ee5e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit c67078e007c8a9b91def387ba345efa805e45fc5)
2019-04-18 18:18:05 +00:00
Dave Wallace
fd40fdec62 Fix list_api_changes script to start at v19.04-rc0
- Update Release Notes with correct output.

Change-Id: Iaa1a1cd6d166ff6894ebbd3758446d90b46cef7c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-18 16:58:29 +00:00
Artem Belov
8011ba5869 Fix memory corruption faulting [VPP-1639]
File pool may be reallocated on epoll events processing. 
*f* pointer shows to already freed address and corrupting 
memory chunk on clib_file_t property change.

Change-Id: I751bddce27325452862b939c1a3eec2ccd9b71bb
Signed-off-by: Artem Belov <artem.belov@xored.com>
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2019-04-18 14:38:37 +00:00
Neale Ranns
e57ae7a0f9 FIB: recursion casues path realloc
Change-Id: Ie9c2954eee90ca1a1fc1aa8280f93b2340b544c1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-18 13:58:34 +00:00
Neale Ranns
9ae8c8e23d IPSEC: tunnel rekey fix and test (VPP-1652)
Change-Id: I1c2b3e40c689bedcdcea7887792b6b6b6aeb48d5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-18 13:13:31 +00:00
Neale Ranns
2eef76b6d8 crypto-ipsecmb: enable GCM
Change-Id: I670d7899bcc63a419daf481167dc445a6386cce8
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d8cfbebce78e26a6ef7f6693e7c90dc3c6435d51)
2019-04-18 13:12:55 +00:00
Dave Barach
ee66c8d3ca Use template-specific key compare fn when deleting records
A simple memcmp won't work when comparing pointer-keys, such as those
used by the bihash_vec8_8.h template.

Change-Id: I77e59f3fd7f7740ef42908ace90ed4843e1c9ac7
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit a11bf45b1aba14246cc1259fff1dfb8e9c60581f)
2019-04-18 00:35:18 +00:00
Dave Wallace
11ee93f6ab Doxygen cleanup.
- Add subpages definitions in appropriate
  section (User or Dev docs) for doc files
  (*.rst, *.md) that being listed at the top
  level of the generated doc page.
- Generate and add API list to RELEASE doc.
- Fix list_api_changes script to use HEAD
  as the endtag so it doesn't need to be
  changed every release.

Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-17 17:28:45 -04:00
Steven Luong
0d7332e43f Revert "Revert "bond: problem switching from l2 to l3"" [VPP-1651]
This reverts commit 5d0d5494db58422eb528c0f8b39a86ea966505e9.

The csit crash was actually due to the test image missing the patch
https://gerrit.fd.io/r/#/c/17731/

It was a mistake to revert the original patch
https://gerrit.fd.io/r/#/c/15577/

Change-Id: I7fc563981aa13d308d55b25194fee21475ebc57d
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit a1f9ee8ea6b7e22a45d7b0cbf631bea3f91864b4)
2019-04-17 18:17:30 +00:00
Thomas F Herbert
6545df3b2c VPP-1650
Update spec file for new build and execution requirements.

Change-Id: Ia87abfe7b7080ecd07e485e6c32270fda56a496a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2019-04-17 17:53:53 +00:00
Neale Ranns
26f846ad11 ADJ: crash in format/show (VPP-1648)
Change-Id: I26279c19b879e59c68fda31426fe42dae62a858d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-17 08:38:35 +00:00
Neale Ranns
32b13bba2e IPSEC: support GCM in ESP
Change-Id: Id2ddb77b4ec3dd543d6e638bc882923f2bac011d
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 47feb1146ec3b0e1cf2ebd83cd5211e1df261194)
2019-04-17 00:12:05 +00:00
Filip Tehlar
07a4d675c8 crypto: add more AES-GCM test cases
Change-Id: Ibb3e2f3ba5f31482fc2f0dce53d68f8476608f4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 11a73973c98a5a10b78f7200e5681859354bb29a)
2019-04-16 23:28:04 +00:00
Neale Ranns
141dea23f4 IPSEC: ESP with ESN tests and fixes
Change-Id: Ie42b26e6d5cdb7b23f370ea2933c65079e8d1089
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 49e7ef60cb38d9f539d70d7a1e85cea5d350a203)
2019-04-16 22:12:11 +00:00
Neale Ranns
88db8b286e crypto: openssl - IV len not passed by caller. Callee knows from algo type
Change-Id: Ib80e9bfb19a79e1adc79aef90371a15954daa993
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 45df934daf89391a399651f171278a4c0cad30f7)
2019-04-16 15:54:57 +00:00
Mohsin Kazmi
6c2f821179 tap: fix the crash [VPP-1645]
Crash will happen when someone will try to setup a tap interface
in host namespace without providing the host side of tap interface
custom name. This patch fixes the problem by using the default name
in this case.

Change-Id: Ic1eaea5abd01bc6c766d0e0fcacae29ab7a7ec45
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 2a6861ff7bc90c1518b68459210830052774d429)
2019-04-16 15:53:49 +00:00
Neale Ranns
58dcf5c5e6 crypto-openssl-gcm: account for failed decrypts
Change-Id: I749c5a9d58128fd6d0fb8284e56b8f89cf91c609
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 1b1d1e9e84b007721a0c2ae2092df7cea662e09d)
2019-04-16 15:53:26 +00:00
Neale Ranns
8f63c2ebe6 IPSEC: crypto overflow
decrypting too many bytes.

Change-Id: I4663e70271d9734eda7f9a127967b9224c0e5efc
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 0a0c7eef787dbf29c8b018420cb9d244cbe8d2dd)
2019-04-15 19:58:31 +00:00
Hongjun Ni
740ef6d024 LB crash when receving packets with right dst IP and wrong dst port VPP-1643
Change-Id: Ifb322118349674b8ebee45d7644212ab5174a2ec
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2019-04-15 18:19:48 +00:00
Filip Tehlar
31398dfacd crypto: fix coverity warnings
Change-Id: Id9dfd912517c44cf812953bd05ac04c9e172a2b7
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-04-15 10:29:02 +00:00
Florin Coras
c0818bce92 session: drop lock on segment allocation error VPP-1644
Change-Id: Ib346570daa3e40f4f53100a05e9355ce60d533a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit bbf923fb52e8a9062ef4d740288cf5547c4dbde4)
2019-04-14 14:45:57 +00:00
Neale Ranns
2f3451992e IPSEC-MB: Use random & non-repeating IV (VPP-1642)
hard code IV and key lengths based on cipher.
Init IV from random data, use AES instruction to rotate.

Change-Id: I13a6507d12267b823c528660a903787baeba47a0
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 21ada3bd7e9bc5cca7c2c8399adcbaa044bf8103)
2019-04-14 14:45:18 +00:00
Ole Troan
e0a04cf5ce stats: Off by one error in stats directory vector.
Change-Id: Ic75af8bbd52c8a08e34ff2a847f60be5479b814b
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 1c9a58decd525ad46487b120642883089fb5758f)
2019-04-12 18:57:37 +00:00
Dave Wallace
4736f6d943 Release notes: add 19.04 placeholder
Change-Id: I2eb04c295967af3eabab260f7f5feef75fb8c679
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-12 11:29:36 -04:00
Dave Wallace
e29b8228a2 Initial changes for stable/1904 branch
This patch adds an entry for the defaultbranch in .gitreview

Change-Id: I4bc5083a24cf3bc8c0498bb3421f8830483bd536
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-10 15:38:04 -04:00
4531 changed files with 333412 additions and 687772 deletions

View File

@ -1,48 +1,38 @@
# Minimal clang-format version is 11
BasedOnStyle: GNU
UseTab: Always
SpaceAfterCStyleCast: true
---
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BinPackParameters: true
BreakBeforeBraces: GNU
ColumnLimit: 79
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpacesBeforeTrailingComments: 1
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
Cpp11BracedListStyle: true
Standard: Cpp11
SortIncludes: false
AlignConsecutiveMacros: true
BreakBeforeTernaryOperators: false
BreakBeforeBinaryOperators: None
ContinuationIndentWidth: 2
ForEachMacros:
- 'clib_bitmap_foreach'
- 'pool_foreach'
- 'pool_foreach_index'
- 'pool_foreach_pointer'
- 'vec_foreach'
- 'vec_foreach_backwards'
- 'vec_foreach_index'
- 'vec_foreach_index_backwards'
- 'vec_foreach_pointer'
- 'vlib_foreach_rx_tx'
- 'foreach_int'
- 'foreach_pointer'
- 'foreach_vlib_main'
- 'foreach_set_bit_index'
- 'foreach_vlib_frame_bitmap_set_bit_index'
- 'FOREACH_ARRAY_ELT'
- 'RTE_ETH_FOREACH_DEV'
- 'foreach_vnet_dev_rx_queue_runtime'
- 'foreach_vnet_dev_counter'
- 'foreach_vnet_dev_port_rx_queue'
- 'foreach_vnet_dev_port_tx_queue'
- 'foreach_vnet_dev_port'
- 'foreach_vnet_dev_args'
- 'foreach_vnet_dev_port_args'
StatementMacros:
- 'CLIB_MULTIARCH_FN'
- 'VLIB_NODE_FN'
- 'VNET_DEV_NODE_FN'
- 'VNET_DEVICE_CLASS_TX_FN'
- '__clib_section'
- '__clib_aligned'
WhitespaceSensitiveMacros:
- 'WARN_ON'
- 'WARN_OFF'
IndentWidth: 2
TabWidth: 4
UseTab: Never
IndentFunctionDeclarationAfterType: false
ContinuationIndentWidth: 4
...

View File

@ -1,8 +0,0 @@
Checks: "-*,\
misc-*,\
bugprone-*,\
-bugprone-reserved-identifier,\
-performance-*,\
clang-analyzer-*,\
-clang-analyzer-valist.Uninitialized,\
"

View File

@ -1,48 +0,0 @@
# <feature-name>: <subject>
# |<---- Using a maximum of 50 characters ---->|
#
# Explain why this change is being made
# |<---- Try to limit each line to a maximum of 72 characters ---->|
# Ticket: <JIRA #id>
# Type: <type>
# Fixes: <offending-git-commit-id>
# Change-Id: <sha1>
# Signed-off-by: <email>
#
#
# --- COMMIT END ---
#
# Type can be
# feature (new feature)
# fix (bug fix)
# refactor (refactoring production code)
# improvement (minor improvements in existing feature)
# style (formatting, missing semi colons, etc; no code change)
# docs (changes to documentation)
# test (adding or refactoring tests; no production code change)
# make (change the build process, or tools, or infrastructure)
#
# feature-name: Is the name of the VPP feature, plugin or directory.
# Commits across multiple components should be split.
# E.g. ip, fib, nat, acl, host, api
#
# Fixes: If type is fix refers to the original commit (optional).
# Ticket: Refers to JIRA ticket if it exists (optional).
#
# --------------------
# Remember to:
# Lowercase the subject line.
# Use the imperative mood in the subject line.
# Not end the subject line with a period.
# Separate subject from body with a blank line.
# Use the body to explain what and why vs. how.
# Use multiple lines with "-" for bullet points in body.
# --------------------
# Usage:
#
# The template is automatically added to the current repository by
# make install-dep.
# (git config commit.template .git_commit_template.txt)
#
# --------------------

View File

@ -1,21 +0,0 @@
---
name: Close Pull Request
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
# Optional. Post a issue comment just before closing a pull request.
comment: "Thank you so much for your interest! VPP takes patches at https://gerrit.fd.io/
```
git clone https://gerrit.fd.io/r/vpp
```
Using [git review](https://www.mediawiki.org/wiki/Gerrit/git-review) to contribute patches is recommended"

62
.gitignore vendored
View File

@ -10,19 +10,21 @@
/build-root/path_setup
/build-root/deb/debian/vpp-plugins/
/build-root/deb/.pybuild/
/build-root/*.buildinfo
/build-root/*.deb
/build-root/*.rpm
/build-root/*.tar.xz
/build-root/*.changes
/build-root/rpmbuild/
/build-root/test-coverage/
/build-root/test/
/build-root/test-doc/
/build-root/test-cov/
/test/run/
/test/build/
/test/coverage/
/build-config.mk
/build/external/*.tar.gz
/build/external/*.tar.xz
/build/external/vpp-*
/build/external/dpdk_mlx_default.sh
/build/external/vpp-*.deb
/build/external/vpp-*.changes
/build/external/downloads/
/path_setup
/tools/
@ -37,6 +39,7 @@ config.log
config.guess
config.sub
config.status
configure
configure.scan
coverage_report
depcomp
@ -77,12 +80,9 @@ GTAGS
/build-root/docs
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
/docs/venv
# language servers
compile_commands.json
.clangd
.cache
/docs/_build
/sphinx_venv
!/docs/Makefile
# indent backup files
*.BAK
@ -94,46 +94,12 @@ compile_commands.json
/src/vpp-api/python/build
/src/vpp-api/python/dist
/src/vpp-api/python/vpp_papi.egg-info
/src/vpp_api/.tox
/src/vpp_api/.stestr
# Build files in the test directory
/test/*.ok
# vppctl command list
/src/scripts/vppctl-cmd-list
# No core files
**/core
# extra scripts config
/extras/scripts/.config/
# extras gomemif build files
/extras/gomemif/bazel*
# vpptop build files
/extras/vpptop/build/*
# debian packaging
.pc
# No test log files
**/test-run-*-*-*
# host stack test framework
/extras/hs-test/vpp-data
/extras/hs-test/hs-test
/extras/hs-test/http_server
/extras/hs-test/.build.ok
/extras/hs-test/summary/
# ./configure
/CMakeFiles
/bin
/lib
/.ninja_deps
/.ninja_log
/.cmake
/CMakeCache.txt
/build.ninja
/cmake_install.cmake
/startup.conf
/startup.vpp

View File

@ -2,4 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2406
defaultbranch=stable/1904

113
INFO.yaml
View File

@ -4,11 +4,11 @@ project_creation_date: '2015-12-08'
project_category: ''
lifecycle_state: 'Incubation'
project_lead: &vpp_ptl
name: 'Damjan Marion'
email: 'dmarion@me.com'
id: 'dmarion'
company: 'cisco'
timezone: 'Europe/Zagreb'
name: 'Dave Barach'
email: 'openvpp@barachs.net'
id: 'dbarach'
company: ''
timezone: ''
primary_contact: *vpp_ptl
issue_tracking:
type: 'jira'
@ -34,72 +34,73 @@ repositories:
- 'vpp'
committers:
- <<: *vpp_ptl
- name: 'Dave Barach'
company: 'cisco'
email: 'openvpp@barachs.net'
id: 'dbarach'
- name: 'Florin Coras'
company: 'cisco'
email: 'florin.coras@gmail.com'
id: 'florin.coras'
- name: 'Benoit Ganne'
company: 'cisco'
email: 'bganne@cisco.com'
id: 'bganne'
- name: 'John Lo'
company: 'cisco'
email: 'loj@cisco.com'
id: 'lojohn'
- name: 'Keith Burns'
company: 'gmail'
email: 'alagalah@gmail.com'
id: 'alagalah'
timezone: ''
- name: 'Chris Luke'
company: 'comcast'
email: 'chris_luke@comcast.com'
id: 'chrisluke'
- name: 'Neale Ranns'
timezone: ''
- name: 'Dave Barach'
company: 'barachs'
email: 'openvpp@barachs.net'
id: 'dbarach'
timezone: ''
- name: 'Damjan Marion'
company: 'cisco'
email: 'nranns@cisco.com'
id: 'nranns'
- name: 'Matthew Smith'
company: 'netgate'
email: 'mgsmith@netgate.com'
id: 'mgsmith'
- name: 'Ole Trøan'
company: 'employees'
email: 'otroan@employees.org'
id: 'otroan'
- name: 'Paul Vinciguerra'
company: 'vinciconsulting'
email: 'pvinci@vinciconsulting.com'
id: 'pvinci'
email: 'damarion@cisco.com'
id: 'dmarion'
timezone: ''
- name: 'Dave Wallace'
company: 'gmail'
email: 'dwallacelf@gmail.com'
id: 'dwallacelf'
timezone: ''
- name: 'Florin Coras'
company: 'gmail'
email: 'florin.coras@gmail.com'
id: 'florin.coras'
timezone: ''
- name: 'Ed Warnicke'
company: 'gmail'
email: 'hagbard@gmail.com'
id: 'hagbard'
- name: 'Andrew Yourtchenko'
timezone: ''
- name: 'John Lo'
company: 'cisco'
email: 'ayourtch@cisco.com'
id: 'ayourtch'
- name: 'Fan Zhang'
company: 'intel'
email: 'roy.fan.zhang@intel.com'
id: 'royzhang1980'
- name: 'Mohammed HAWARI'
email: 'loj@cisco.com'
id: 'lojohn'
timezone: ''
- name: 'Marco Varlese'
company: 'suse'
email: 'marco.varlese@suse.de'
id: 'marco.varlese'
timezone: ''
- name: 'Neale Ranns'
company: 'cisco'
email: 'momohawari@gmail.com'
id: 'momohawari'
email: 'nranns@cisco.com'
id: 'nranns'
timezone: ''
- name: 'Ole Trøan'
company: 'employees'
email: 'otroan@employees.org'
id: 'otroan'
timezone: ''
- name: 'Sergio Gonzalez Monroy'
company: 'outlook'
email: 'sergio.gonzalez.monroy@outlook.com'
id: 'smonroy'
timezone: ''
tsc:
# yamllint disable rule:line-length
approval: 'https://wiki.fd.io/view/TSC/Meeting_Minutes'
approval: ''
changes:
- type: 'Promotion'
name: 'Damjan Marion'
link: 'https://lists.fd.io/g/vpp-dev/message/17521'
- type: 'Addition'
name: 'Fan Zhang'
link: 'https://lists.fd.io/g/vpp-dev/message/19068'
- type: 'Approval'
name: 'Mohammed HAWARI'
link: 'https://ircbot.wl.linuxfoundation.org/meetings/fdio-meeting/2023/fd_io_tsc/fdio-meeting-fd_io_tsc.2023-06-01-15.00.html'
- type: 'removal'
name: ''
link: ''
- type: 'promotion'
name: ''
link: ''

File diff suppressed because it is too large Load Diff

689
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -19,32 +19,32 @@ For more information on VPP and its features please visit the
## Changes
Details of the changes leading up to this version of VPP can be found under
doc/releasenotes.
@ref release_notes.
## Directory layout
| Directory name | Description |
| ---------------------- | ------------------------------------------- |
| build-data | Build metadata |
| build-root | Build output directory |
| docs | Sphinx Documentation |
| dpdk | DPDK patches and build infrastructure |
| extras/libmemif | Client library for memif |
| src/examples | VPP example code |
| src/plugins | VPP bundled plugins directory |
| src/svm | Shared virtual memory allocation library |
| src/tests | Standalone tests (not part of test harness) |
| src/vat | VPP API test program |
| src/vlib | VPP application library |
| src/vlibapi | VPP API library |
| src/vlibmemory | VPP Memory management |
| src/vnet | VPP networking |
| src/vpp | VPP application |
| src/vpp-api | VPP application API bindings |
| src/vppinfra | VPP core library |
| src/vpp/api | Not-yet-relocated API bindings |
| test | Unit tests and Python test harness |
| build-data | Build metadata |
| build-root | Build output directory |
| doxygen | Documentation generator configuration |
| dpdk | DPDK patches and build infrastructure |
| @ref extras/libmemif | Client library for memif |
| @ref src/examples | VPP example code |
| @ref src/plugins | VPP bundled plugins directory |
| @ref src/svm | Shared virtual memory allocation library |
| src/tests | Standalone tests (not part of test harness) |
| src/vat | VPP API test program |
| @ref src/vlib | VPP application library |
| @ref src/vlibapi | VPP API library |
| @ref src/vlibmemory | VPP Memory management |
| @ref src/vnet | VPP networking |
| @ref src/vpp | VPP application |
| @ref src/vpp-api | VPP application API bindings |
| @ref src/vppinfra | VPP core library |
| @ref src/vpp/api | Not-yet-relocated API bindings |
| test | Unit tests and Python test harness |
## Getting started
@ -99,3 +99,8 @@ end-user-oriented information. Also see @subpage dev_doc for developer notes.
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
advanced building strategies and other development notes.
## Test Framework
There is PyDoc generated documentation available for the VPP test framework.
See @ref test_framework_doc for details.

4007
RELEASE.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -29,17 +29,28 @@ ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
DPDK_MLX_IBVERBS_DLOPEN=$(strip $($(PLATFORM)_uses_dpdk_ibverbs_link_dlopen))
ifneq ($(DPDK_MLX_IBVERBS_DLOPEN),)
DPDK_MAKE_ARGS += DPDK_MLX_IBVERBS_DLOPEN=y
endif
DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd))
ifneq ($(DPDK_MLX4_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y
endif
ifeq ("$(V)","1")
DPDK_MAKE_ARGS += DPDK_VERBOSE=1
DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
ifneq ($(DPDK_PLATFORM_TARGET),)
DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
endif
DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
endif
external_configure = echo
external_build = echo
external_make_args = $(DPDK_MAKE_ARGS) -C external ebuild-build
external_install = $(MAKE) $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install
external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-install

View File

@ -26,6 +26,11 @@ libmemif_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
libmemif_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
libmemif_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
libmemif_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
libmemif_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(libmemif_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)

View File

@ -30,6 +30,11 @@ sample-plugin_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
sample-plugin_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
sample-plugin_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
sample-plugin_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
sample-plugin_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(sample-plugin_cmake_args) \

View File

@ -28,8 +28,8 @@ vom_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
vom_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-9/enable),)
vom_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-9/root/bin"
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
vom_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
vom_configure = \

View File

@ -25,35 +25,29 @@ vpp_cmake_prefix_path := $(subst $() $(),;,$(vpp_cmake_prefix_path))
vpp_cmake_args ?=
vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
vpp_cmake_args += -DCMAKE_BUILD_TYPE="$($(TAG)_TAG_BUILD_TYPE)"
vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
ifeq ("$(V)","1")
vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
endif
ifneq ($(VPP_PLATFORM),)
vpp_cmake_args += -DVPP_PLATFORM="$(VPP_PLATFORM)"
endif
ifneq ($(VPP_EXCLUDED_PLUGINS),)
vpp_cmake_args += -DVPP_EXCLUDED_PLUGINS="$(VPP_EXCLUDED_PLUGINS)"
endif
ifneq (${SOURCE_DATE_EPOCH}),)
vpp_cmake_args += -DVPP_SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
endif
ifneq ($(VPP_EXTRA_CMAKE_ARGS),)
vpp_cmake_args += $(VPP_EXTRA_CMAKE_ARGS)
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
vpp_configure_depend += external-install
vpp_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
#vpp_make_args = --no-print-directory
vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR)
vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'
vpp-package-deb: vpp-install
@$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vpp -- pkg-deb
@$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vpp -- package-deb
@find $(PACKAGE_BUILD_DIR) \
-maxdepth 2 \
-maxdepth 1 \
\( -name '*.changes' -o -name '*.deb' -o -name '*.buildinfo' \) \
-exec mv {} $(CURDIR) \;

View File

@ -0,0 +1,45 @@
# Copyright (c) 2016 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# vector packet processor
arm32_arch = native
arm32_native_tools = vppapigen
arm32_uses_dpdk = yes
arm32_uses_openssl = no
arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
gmod
vlib_configure_args_arm32 = --with-pre-data=128
vnet_configure_args_arm32 = --with-dpdk --without-libssl
vpp_configure_args_arm32 = --with-dpdk --without-libssl
arm32_dpdk_arch = "armv7a"
arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
CONFIG_RTE_EAL_IGB_UIO=y \
CONFIG_RTE_LIBRTE_E1000_PMD=y \
CONFIG_RTE_MAX_LCORE=4 \
CONFIG_RTE_MAX_NUMA_NODES=1"
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror
arm32_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror

View File

@ -0,0 +1,87 @@
# Copyright 2018 NXP
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration for NXP DPAA1/DPAA2 ARM64 based platform
MACHINE=$(shell uname -m)
dpaa_mtune = cortex-A72
dpaa_march = "armv8-a+fp+simd+crc+crypto"
ifeq ($(MACHINE),aarch64)
dpaa_arch = native
else
dpaa_arch = aarch64
dpaa_os = linux-gnu
dpaa_target = aarch64-fsl-linux
dpaa_cross_ldflags = \
-Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
-Wl,-rpath=/usr/lib64 \
-Wl,-rpath=./.libs \
-Wl,-rpath=$(OPENSSL_PATH)/lib
endif
# Re-write Default configuration, if requied
ifneq ($(CROSS_PREFIX),)
# like: aarch64-linux-gnu
dpaa_target = $(CROSS_PREFIX)
endif
ifneq ($(CPU_MTUNE),)
# like: cortex-A53
dpaa_mtune = $(CPU_MTUNE)
endif
dpaa_native_tools = vppapigen
dpaa_root_packages = vpp
# DPDK configuration parameters
dpaa_uses_dpdk = yes
# Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
# installed DPDK libraries and headers.
ifeq ($(PLATFORM),dpaa)
ifneq ($(DPDK_PATH),)
#dpaa_dpdk_shared_lib = yes
dpaa_uses_external_dpdk = yes
dpaa_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
dpaa_dpdk_lib_dir = $(DPDK_PATH)/lib
else
# compile using internal DPDK + NXP DPAA2 Driver patch
dpaa_dpdk_arch = "armv8a"
dpaa_dpdk_target = "arm64-dpaa-linuxapp-gcc"
dpaa_dpdk_make_extra_args = "CONFIG_RTE_KNI_KMOD=n"
endif
endif
# Disable the unused plugins in order to decrease the VPP pacakage size.
vpp_configure_args_dpaa = --without-ipv6sr --with-pre-data=128 --without-libnuma
# Other optional vpp_configure_args
ifneq ($(VPP_CFG_ARGS),)
vpp_configure_args_dpaa += $(VPP_CFG_ARGS)
endif
dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 -mtls-dialect=trad \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -DFORTIFY_SOURCE=2 \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib
# Use -rdynamic is for stack tracing, O0 for debugging....default is O2
# Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
dpaa_TAG_CFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) -mtls-dialect=trad \
-mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
dpaa_TAG_LDFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) \
-mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib

View File

@ -0,0 +1,47 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Qemu "p-series" powerpc64
qppc_os = linux-gnu
qppc_cross_ldflags = \
-Wl,--dynamic-linker=/lib64/ld64.so.1
qppc_arch = powerpc
qppc_root_packages = vppinfra vlib vlib-api vnet svm \
vpp vpp-api-test
vnet_configure_args_qppc = \
--without-libssl
vpp_configure_args_qppc = \
--without-libssl
vlib_configure_args_qppc = --with-pre-data=128
qppc_march=powerpc64
# native tool chain additions for this platform
qppc_native_tools = vppapigen
qppc_uses_dpdk = no
qppc_debug_TAG_CFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_debug_TAG_LDFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_TAG_CFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_TAG_LDFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec

View File

@ -16,11 +16,30 @@
MACHINE=$(shell uname -m)
vpp_arch = native
ifeq ($(TARGET_PLATFORM),thunderx)
vpp_dpdk_target = arm64-thunderx-linuxapp-gcc
endif
vpp_root_packages = vpp
vpp_root_packages = vpp vom
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -pie
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -Werror -fprofile-arcs -ftest-coverage
vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -Werror -coverage
vpp_coverity_TAG_CFLAGS = -g -O2 -fPIC -Werror -D__COVERITY__
vpp_coverity_TAG_LDFLAGS = -g -O2 -fPIC -Werror -D__COVERITY__
vpp_debug_TAG_BUILD_TYPE = debug
vpp_TAG_BUILD_TYPE = release
vpp_clang_TAG_BUILD_TYPE = release
vpp_gcov_TAG_BUILD_TYPE = gcov
vpp_coverity_TAG_BUILD_TYPE = coverity

View File

@ -39,7 +39,7 @@
######################################################################
# Scripts require non-POSIX parts of bash
SHELL := $(shell which bash)
SHELL := /bin/bash
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
@ -190,7 +190,7 @@ ARCH_TARGET_tmp = $(call ifdef_fn,$(ARCH)_target,$(ARCH)-$(OS))
TARGET = $(call ifdef_fn,$(PLATFORM)_target,$(ARCH_TARGET_tmp))
TARGET_PREFIX = $(if $(not_native),$(TARGET)-,)
# CPU microarchitecture detection.
# CPU microarchitecture detection.
# Either set <platform>_march in build-data/platforms/<platform>.mk,
# or detect and use the build-host instruction set
@ -236,18 +236,18 @@ PACKAGE = $*
# Build/install tags. This lets you have different CFLAGS/CPPFLAGS/LDFLAGS
# for e.g. debug versus optimized compiles. Each tag has its own set of build/install
# areas.
TAG =
TAG =
TAG_PREFIX = $(if $(TAG),$(TAG)-)
# yes you need the space
tag_var_with_added_space_fn = $(if $($(TAG)_TAG_$(1)),$($(TAG)_TAG_$(1)) )
# TAG=debug for debugging
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
BUILD_PREFIX_package = build-$(TAG_PREFIX)
@ -309,8 +309,8 @@ endif
# Always prefer our own tools to those installed on system.
# Note: ccache-bin must be before tool bin.
#
# Removed LD_LIBRARY_PATH from BUILD_ENV (drb, 10/31/17):
#
# Removed LD_LIBRARY_PATH from BUILD_ENV (drb, 10/31/17):
# export LD_LIBRARY_PATH=$(TOOL_INSTALL_DIR)/lib64:$(TOOL_INSTALL_DIR)/lib
# Reported to cause trouble. Only of historical interest, since we no longer
# build a full tool chain from source.
@ -365,7 +365,7 @@ NATIVE_TOOLS_$(IS_LINUX) += $(NATIVE_TOOLS_LINUX)
CROSS_TOOLS_$(IS_LINUX) += glibc gcc
# must be first for bootstrapping
NATIVE_TOOLS = findutils $(MAKE)
NATIVE_TOOLS = findutils make
# basic tools needed for build system
NATIVE_TOOLS += git automake autoconf libtool texinfo tar
@ -416,7 +416,7 @@ find_filter += -and -not -path '*/.mu_build_*'
find_newer_filtered_fn = \
(! -f $(1) \
|| -n $(call find_newer_files_fn,$(1),$(3)) \
|| -n "`find -L $(2) \
|| -n "`find -H $(2) \
-type f \
-and -newer $(1) \
-and \( $(4) \) \
@ -614,10 +614,10 @@ check_platform = \
-a ! -x "`which 2> /dev/null $${target_gcc}`" ] ; then \
$(call build_msg_fn, \
No cross-compiler found for platform $(PLATFORM) target $(TARGET); \
try $(MAKE) PLATFORM=$(PLATFORM) install-tools) ; \
try make PLATFORM=$(PLATFORM) install-tools) ; \
exit 1 ; \
fi
configure_check_timestamp = \
@$(BUILD_ENV) ; \
$(check_platform) ; \
@ -650,20 +650,15 @@ configure_check_timestamp = \
# /proc/cpuinfo does not exist on platforms without a /proc and on some
# platforms, notably inside containers, it has no content. In those cases
# we assume there's 1 processor; we use 2*ncpu for the -j option.
#
# On FreeBSD we can call nproc to get the number of processors.
#
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
# for file presence and content; for now this will have to do.
ifndef MAKE_PARALLEL_JOBS
ifeq ($(shell uname), FreeBSD)
MAKE_PARALLEL_JOBS = $(shell nproc)
else
MAKE_PARALLEL_JOBS = $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
MAKE_PARALLEL_JOBS = -j $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
$(shell grep -c ^processor /proc/cpuinfo), 2)
endif # FreeBSD
else
MAKE_PARALLEL_JOBS := -j $(MAKE_PARALLEL_JOBS)
endif
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,-j $(MAKE_PARALLEL_JOBS))
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
# Make command shorthand for packages & tools.
PACKAGE_MAKE = \
@ -772,7 +767,7 @@ find_source_for_package = \
exit 1; \
fi ; \
$(call build_msg_fn,Fix file dates in $${g}/$(PACKAGE_SOURCE)) ; \
: the timestamp-adjustment script used to be invoked at this point ; \
(cd $${s} ; $(MU_BUILD_ROOT_DIR)/autowank --touch) ; \
fi ; \
s=`cd $${s} && pwd` ; \
$(call build_msg_fn,Source found in $${s})
@ -807,10 +802,10 @@ pull-all:
$(call build_msg_fn,Git pull build tools) ; \
$(call tool_make_target_fn,pull-all) ; \
$(call build_msg_fn,Git pull packages for platform $(PLATFORM)) ; \
$(MAKE) PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
make PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
.PHONY: %-diff
%-diff:
%-diff:
@$(BUILD_ENV) ; \
d=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
$(call build_msg_fn,Git diff $(PACKAGE)) ; \
@ -819,12 +814,12 @@ pull-all:
else \
$(call build_msg_fn, $(PACKAGE) not a git directory) ; \
fi
# generate diffs for everything in source path
.PHONY: diff-all
diff-all:
diff-all:
@$(BUILD_ENV) ; \
$(call build_msg_fn,Generate diffs) ; \
for r in $(ABSOLUTE_SOURCE_PATH); do \
@ -922,7 +917,7 @@ basic_system_image_install = \
mkdir -p bin lib mnt proc root sbin sys tmp etc ; \
mkdir -p usr usr/{bin,sbin} usr/lib ; \
mkdir -p var var/{lib,lock,log,run,tmp} ; \
mkdir -p var/lock/subsys var/lib/urandom
mkdir -p var/lock/subsys var/lib/urandom
.PHONY: basic_system-image_install
basic_system-image_install: # linuxrc-install
@ -932,7 +927,7 @@ basic_system-image_install: # linuxrc-install
ROOT_PACKAGES = $(if $($(PLATFORM)_root_packages),$($(PLATFORM)_root_packages),$(default_root_packages))
.PHONY: install-packages
install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
@$(BUILD_ENV) ; \
set -eu$(BUILD_DEBUG) ; \
d=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM) ; \
@ -954,7 +949,7 @@ install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
>& /dev/null ; \
else \
$(call build_msg_fn, NOT stripping symbols) ; \
fi
fi
# readonly root squashfs image
# Note: $(call build_msg_fn) does not seem to work inside of fakeroot so we use echo
@ -969,13 +964,13 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot $(SHELL) -c "{ \
fakeroot /bin/bash -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
basic_system \
$(ROOT_PACKAGES)) ; \
: $(MAKE) dev directory ; \
: make dev directory ; \
$(linuxrc_makedev) ; \
echo @@@@ Relocating ELF executables to run in / @@@@ ; \
scripts/set-rpath /$(arch_lib_dir):/lib ; \
@ -1061,7 +1056,7 @@ rw-image: rw-image-check-type ro-image
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot $(SHELL) -c "{ \
fakeroot /bin/bash -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \
@ -1094,7 +1089,7 @@ ccache-install:
$(MAKE) -C $(MU_BUILD_ROOT_DIR) ccache-build
mkdir -p $(TOOL_INSTALL_DIR)/ccache-bin
ln -sf $(MU_BUILD_ROOT_DIR)/build-tool-native/ccache/ccache \
$(TOOL_INSTALL_DIR)/ccache-bin/$(TARGET_PREFIX)gcc
$(TOOL_INSTALL_DIR)/ccache-bin/$(TARGET_PREFIX)gcc
TOOL_MAKE = $(MAKE) is_build_tool=yes
@ -1158,4 +1153,7 @@ distclean:
rm -rf $(MU_BUILD_ROOT_DIR)/*.deb
rm -rf $(MU_BUILD_ROOT_DIR)/*.rpm
rm -rf $(MU_BUILD_ROOT_DIR)/*.changes
rm -rf $(MU_BUILD_ROOT_DIR)/*.buildinfo
rm -rf $(MU_BUILD_ROOT_DIR)/python
if [ -e /usr/bin/dh ];then (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean); fi
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.install
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/changelog

307
build-root/autowank Executable file

File diff suppressed because it is too large Load Diff

119
build-root/config.site Normal file
View File

@ -0,0 +1,119 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
######################################################################
# glibc
######################################################################
# glibc needs this for cross compiling
libc_cv_forced_unwind=yes
libc_cv_c_cleanup=yes
libc_cv_ssp=no
# fixes gentoo build; not sure why?
libc_cv_uname_release=""
libc_cv_uname_version=""
ac_cv_header_cpuid_h=yes
######################################################################
# bash
######################################################################
# Bash configure.in uses this to work around an autoconf 2.53 bug
ac_cv_func_setvbuf_reversed=no
ac_cv_rl_version=5.1
bash_cv_termcap_lib=libncurses
# These mostly come from debian bash-2.05b changes
# They are needed to make a functioning bash. Without these
# settings gdbserver exiting would cause the invoking bash to
# exit also.
bash_cv_have_mbstate_t=yes
bash_cv_dup2_broken=no
bash_cv_pgrp_pipe=no
bash_cv_sys_siglist=yes
bash_cv_under_sys_siglist=yes
bash_cv_opendir_not_robust=no
bash_cv_printf_declared=yes
bash_cv_ulimit_maxfds=yes
bash_cv_getenv_redef=yes
bash_cv_getcwd_calls_popen=no
bash_cv_func_strcoll_broken=no
bash_cv_must_reinstall_sighandlers=no
bash_cv_type_quad_t=yes
bash_cv_func_sigsetjmp=present
bash_cv_job_control_missing=present
bash_cv_sys_named_pipes=present
bash_cv_type_rlimit=long
bash_cv_printf_a_format=yes
bash_cv_unusable_rtsigs=no
######################################################################
# Apache
######################################################################
ac_cv_func_setpgrp_void=yes
apr_cv_process_shared_works=yes
apr_cv_tcp_nodelay_with_cork=yes
ap_void_ptr_lt_long=no
case ${host_cpu} in
x86_64 | alpha)
ac_cv_sizeof_ssize_t=8
ac_cv_sizeof_size_t=8
ac_cv_sizeof_pid_t=4
;;
*)
ac_cv_sizeof_ssize_t=4
ac_cv_sizeof_size_t=4
ac_cv_sizeof_pid_t=4
;;
esac
######################################################################
# gdb
######################################################################
gdb_cv_func_ptrace_args=int,int,long,long
######################################################################
# dpkg
######################################################################
dpkg_cv_va_copy=yes
######################################################################
# coreutils
######################################################################
ac_cv_search_clock_gettime=no
gl_cv_fs_space=yes
######################################################################
# valgrind
######################################################################
ac_cv_file__proc_self_fd=yes
ac_cv_file__proc_self_exe=yes
ac_cv_file__proc_self_maps=yes
######################################################################
# tcpdump
######################################################################
ac_cv_linux_vers=2
ac_cv_func_pcap_findalldevs=no
######################################################################
# flex
######################################################################
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
######################################################################
# tar
######################################################################
tar_gl_cv_func_mknod_works=yes

View File

@ -35,7 +35,7 @@
#
# Platform selects e.g. Linux config file
PLATFORM = vpp
PLATFORM = native
native_arch = native

150
build-root/scripts/checkstyle.sh Executable file
View File

@ -0,0 +1,150 @@
#!/bin/bash
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
VPP_DIR=`dirname $0`/../../
EXIT_CODE=0
FIX="0"
FULL="0"
CHECKSTYLED_FILES=""
UNCHECKSTYLED_FILES=""
# If the user provides --fix, then actually fix things
# Note: this is meant for use outside of the CI Jobs, by users cleaning things up
while true; do
case ${1} in
--fix)
FIX="1"
;;
--full)
FULL="1"
;;
esac
shift || break
done
if [ "${FULL}" == "1" ]; then
FILELIST=$(git ls-tree -r HEAD --name-only)
else
FILELIST=$((git diff HEAD~1.. --name-only; git ls-files -m ) | sort -u)
fi
# Check to make sure we have indent. Exit if we don't with an error message, but
# don't *fail*.
command -v indent > /dev/null
if [ $? != 0 ]; then
echo "Cound not find required command \"indent\". Checkstyle aborted"
exit ${EXIT_CODE}
fi
indent --version
# Check to make sure we have clang-format. Exit if we don't with an error message, but
# don't *fail*.
HAVE_CLANG_FORMAT=0
command -v clang-format > /dev/null
if [ $? != 0 ]; then
echo "Could not find command \"clang-format\". Checking C++ files will cause abort"
else
clang-format --version
x=$(echo "" | clang-format 2>&1)
if [[ "$x" == "" ]]; then
HAVE_CLANG_FORMAT=1
else
echo "Output produced while formatting empty file (expected empty string):"
echo "$x"
echo "Could not find working \"clang-format\". Checking C++ files will cause abort"
fi
fi
cd ${VPP_DIR}
git status
for i in ${FILELIST}; do
if [ -f ${i} ] && [ ${i} != "build-root/scripts/checkstyle.sh" ] && [ ${i} != "extras/emacs/fix-coding-style.el" ]; then
grep -q "fd.io coding-style-patch-verification: ON" ${i}
if [ $? == 0 ]; then
EXTENSION=`basename ${i} | sed 's/^\w\+.//'`
case ${EXTENSION} in
hpp|cpp|cc|hh)
CMD="clang-format"
if [ ${HAVE_CLANG_FORMAT} == 0 ]; then
echo "C++ file detected. Abort. (missing clang-format)"
exit ${EXIT_CODE}
fi
;;
*)
CMD="indent"
;;
esac
CHECKSTYLED_FILES="${CHECKSTYLED_FILES} ${i}"
if [ ${FIX} == 0 ]; then
if [ "${CMD}" == "clang-format" ]
then
clang-format ${i} > ${i}.out2
else
indent ${i} -o ${i}.out1 > /dev/null 2>&1
indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1
fi
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}.out2
diff -q ${i} ${i}.out2
else
if [ "${CMD}" == "clang-format" ]; then
clang-format -i ${i} > /dev/null 2>&1
else
indent ${i}
indent ${i}
fi
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}
fi
if [ $? != 0 ]; then
EXIT_CODE=1
echo
echo "Checkstyle failed for ${i}."
if [ "${CMD}" == "clang-format" ]; then
echo "Run clang-format as shown to fix the problem:"
echo "clang-format -i ${VPP_DIR}${i}"
else
echo "Run indent (twice!) as shown to fix the problem:"
echo "indent ${VPP_DIR}${i}"
echo "indent ${VPP_DIR}${i}"
fi
fi
if [ -f ${i}.out1 ]; then
rm ${i}.out1
fi
if [ -f ${i}.out2 ]; then
rm ${i}.out2
fi
else
UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}"
fi
else
UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}"
fi
done
if [ ${EXIT_CODE} == 0 ]; then
echo "*******************************************************************"
echo "* VPP CHECKSTYLE SUCCESSFULLY COMPLETED"
echo "*******************************************************************"
else
echo "*******************************************************************"
echo "* VPP CHECKSTYLE FAILED"
echo "* CONSULT FAILURE LOG ABOVE"
echo "* NOTE: Running 'build-root/scripts/checkstyle.sh --fix' *MAY* fix the issue"
echo "*******************************************************************"
fi
exit ${EXIT_CODE}

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -12,21 +12,17 @@
# limitations under the License.
# Scripts require non-POSIX parts of bash
SHELL := $(shell which bash)
SHELL := /bin/bash
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
MAKE_ARGS ?= -j
BUILD_DIR ?= $(CURDIR)/_build
INSTALL_DIR ?= $(CURDIR)/_install
PKG_VERSION ?= $(shell git describe --abbrev=0 --match 'v[0-9]*' | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2)
PKG_VERSION ?= $(shell git describe --abbrev=0 | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2)
PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l)
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct .)
ifeq ($shell(uname), FreeBSD)
JOBS := $(shell nproc)
else
JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell grep -c ^processor /proc/cpuinfo), 2)
endif # FreeBSD
B := $(BUILD_DIR)
I := $(INSTALL_DIR)
@ -37,36 +33,22 @@ else
CMAKE?=cmake
endif
ARCH_X86_64=$(filter x86_64,$(shell uname -m))
AARCH64=$(filter aarch64,$(shell uname -m))
include packages.mk
include packages/nasm.mk
include packages/ipsec-mb.mk
include packages/quicly.mk
ifneq ($(shell uname), FreeBSD)
include packages/rdma-core.mk
include packages/dpdk.mk
include packages/xdp-tools.mk
include packages/octeon-roc.mk
endif # FreeBSD
include packages/rdma-core.mk
.PHONY: clean
clean:
@rm -rf $(B) $(I)
.PHONY: install
ifeq ($(shell uname), FreeBSD)
install: $(if $(ARCH_X86_64), ipsec-mb-install) quicly-install
else
install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install $(if $(AARCH64), octeon-roc-install)
endif # FreeBSD
install: dpdk-install rdma-core-install quicly-install
.PHONY: config
ifeq ($(shell uname), FreeBSD)
config: $(if $(ARCH_X86_64), ipsec-mb-config) quicly-build
else
config: $(if $(ARCH_X86_64), ipsec-mb-config) dpdk-config rdma-core-config quicly-build
endif # FreeBSD
config: dpdk-config rdma-core-config
##############################################################################
# .deb packaging
@ -84,7 +66,7 @@ deb/debian/changelog: Makefile
@echo "" >> $@
@echo " * Version $(DEB_VER)" >> $@
@echo "" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R --date=@${SOURCE_DATE_EPOCH})" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
$(DEV_DEB): deb/debian/changelog
@cd deb && dpkg-buildpackage -b -uc -us
@ -121,7 +103,7 @@ endif
RPM_VER := $(PKG_VERSION)
RPM_ARCH=$(shell rpm --eval "%{_arch}" 2> /dev/null)
DEV_RPM=vpp-ext-deps-$(RPM_VER)-$(PKG_SUFFIX).$(RPM_ARCH).rpm
INSTALLED_RPM_VER=$(shell rpm -q --queryformat '%{VERSION}-%{RELEASE}' vpp-ext-deps 2> /dev/null | grep -v "vpp-ext-deps")
INSTALLED_RPM_VER=$(shell rpm -q --queryformat '%{VERSION}-%{RELEASE}' vpp-ext-deps 2> /dev/null | grep -v "not inst")
.PHONY: build-rpm install-rpm check-rpm
@ -139,7 +121,6 @@ build-rpm: $(DEV_RPM)
install-rpm:
ifneq ($(INSTALLED_RPM_VER),$(RPM_VER)-$(PKG_SUFFIX))
@$(MAKE) $(DEV_RPM)
sudo rpm -e vpp-ext-deps || true
sudo rpm -Uih --force $(DEV_RPM)
else
@echo "=========================================================="
@ -172,17 +153,17 @@ ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
@echo "development package by invoking 'make install-ext-deps'"
@echo "from the top level directory"
@echo "=========================================================="
$(MAKE) config
make config
else
ifneq ($(INSTALLED_VER),)
make check-deb
endif
ifneq ($(INSTALLED_RPM_VER),)
$(MAKE) check-rpm
make check-rpm
endif
endif
ebuild-install:
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
$(MAKE) install
make install
endif

View File

@ -1 +1 @@
10
9

View File

@ -1,9 +1,6 @@
#!/usr/bin/make -f
DH_VERBOSE = 1
DEB_BUILD_OPTIONS = noddebs
DEB_CFLAGS_MAINT_STRIP = -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -O2
DEB_LDFLAGS_MAINT_STRIP = -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects
DEB_CFLAGS_MAINT_APPEND = -O3
PKG=vpp-ext-deps
VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
@ -26,8 +23,5 @@ override_dh_auto_configure:
override_dh_install:
make $(MAKE_ARGS) install
@mkdir -p $(INSTALL_DIR)
dh_install -p$(PKG) --autodest /opt
override_dh_shlibdeps:
dh_shlibdeps -l$(INSTALL_DIR)lib/

View File

@ -1,2 +0,0 @@
rdma=49.0 dpdk=23.11
rdma=51.0 dpdk=24.03

Some files were not shown because too many files have changed in this diff Show More