Compare commits

...

32 Commits

Author SHA1 Message Date
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
48 changed files with 1388 additions and 177 deletions

View File

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

View File

@ -1,5 +1,6 @@
# Release Notes {#release_notes} # Release Notes {#release_notes}
* @subpage release_notes_1904
* @subpage release_notes_19011 * @subpage release_notes_19011
* @subpage release_notes_1901 * @subpage release_notes_1901
* @subpage release_notes_1810 * @subpage release_notes_1810
@ -16,6 +17,284 @@
* @subpage release_notes_1609 * @subpage release_notes_1609
* @subpage release_notes_1606 * @subpage release_notes_1606
@page release_notes_1904 Release notes for VPP 19.04
More than 700 commits since the 19.01 release.
## Features
### Infrastructure
- DPDK 19.02 integration
- Buffer manager rework and improvements
- Python3 migration (work in progress)
- vppapigen
- Python API wrappers
- Docs generation
- vpp_config
- "make test" python3 readiness and refactoring
- Add "make test-gcov" target to main Makefile
- Refactor multiarch code
- vfctl script: bind VF to vfio-pci after VF is created
- cmake cross-compilation support
- CLI control of graph dispatch elogs
- AppImage packaging (disabled by default)
- Complete upstreaming of wireshark dissector
- Remove JVPP which is now an FD.io project
- Punt infra: manage dispatch of exception packets
### VNET & Plugins
- BVI Interface
- Deprecate TAP cli
- Experimental TAP interface TCP segmentation offload
- Vmxnet3 driver plugin
- LACP passive mode
- ACL plugin refactoring
- RDMA (ibverb) driver plugin - MLX5 with multiqueue
- IPSEC
- Intel IPSEC-MB engine plugin
- Tunnel fragmentation
- CLI improvements
- Performance improvements
- API modernisation and improvements
- New Tests and test refactoring
- Crypto
- Introduce crypto infra
- crypto_ia32 plugin
- Add support for AEAD and AES-GCM
- Implement rfc4231 test cases
- Implement crypto tests per RFC2202
- Perfmon improvements
- Python to C parser for intel CPUs
- 2-way parallel stat collection
- Collect data on selected thread(s)
### Host stack
- Improve ldp/vls/vcl support for multi-process and multi-threaded applications
- Major refactor/cleanup of session layer
- Refactor cut-through sessions to use a custom transport
- Baseline QUIC transport support
## Known issues
For the full list of issues please refer to fd.io [JIRA](https://jira.fd.io).
## Issues fixed
For the full list of fixed issues please refer to:
- fd.io [JIRA](https://jira.fd.io)
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1904)
## API changes
Description of results:
* _Definition changed_: indicates that the API file was modified between releases.
* _Only in image_: indicates the API is new for this release.
* _Only in file_: indicates the API has been removed in this release.
Message Name | Result
-------------------------------------------------------------|------------------
accept_session | only in file
accept_session_reply | only in file
bind_sock_reply | definition changed
bind_uri_reply | definition changed
bvi_create | only in image
bvi_create_reply | only in image
bvi_delete | only in image
bvi_delete_reply | only in image
connect_session | only in file
connect_session_reply | only in file
ct6_enable | only in image
ct6_enable_disable | only in image
gbp_contract_add_del_reply | definition changed
gbp_endpoint_group_del | definition changed
gbp_endpoint_learn_set_inactive_threshold | only in file
gbp_endpoint_learn_set_inactive_threshold_reply | only in file
ikev2_plugin_get_version | only in image
ikev2_plugin_get_version_reply | only in image
ip4_arp_event | definition changed
ip6_nd_event | definition changed
ip6_ra_event | definition changed
ip6nd_proxy_add_del | definition changed
ip6nd_proxy_details | definition changed
ip_container_proxy_add_del | definition changed
ip_neighbor_add_del | definition changed
ip_neighbor_details | definition changed
ip_probe_neighbor | definition changed
ip_source_and_port_range_check_add_del | definition changed
ipsec_backend_details | definition changed
ipsec_gre_add_del_tunnel | only in file
ipsec_gre_add_del_tunnel_reply | only in file
ipsec_gre_tunnel_add_del | only in image
ipsec_gre_tunnel_add_del_reply | only in image
ipsec_gre_tunnel_details | definition changed
ipsec_sa_details | definition changed
ipsec_sa_set_key | definition changed
ipsec_sad_add_del_entry | only in file
ipsec_sad_add_del_entry_reply | only in file
ipsec_sad_entry_add_del | only in image
ipsec_sad_entry_add_del_reply | only in image
ipsec_select_backend | definition changed
ipsec_spd_add_del_entry | only in file
ipsec_spd_add_del_entry_reply | only in file
ipsec_spd_details | definition changed
ipsec_spd_entry_add_del | only in image
ipsec_spd_entry_add_del_reply | only in image
ipsec_tunnel_if_add_del | definition changed
lb_conf | definition changed
map_add_domain | definition changed
map_domain_details | definition changed
nat_ha_flush | only in image
nat_ha_flush_reply | only in image
nat_ha_get_failover | only in image
nat_ha_get_failover_reply | only in image
nat_ha_get_listener | only in image
nat_ha_get_listener_reply | only in image
nat_ha_resync | only in image
nat_ha_resync_completed_event | only in image
nat_ha_resync_reply | only in image
nat_ha_set_failover | only in image
nat_ha_set_failover_reply | only in image
nat_ha_set_listener | only in image
nat_ha_set_listener_reply | only in image
reset_session | only in file
reset_session_reply | only in file
sw_interface_ip6nd_ra_prefix | definition changed
sw_interface_set_dpdk_hqos_pipe | only in file
sw_interface_set_dpdk_hqos_pipe_reply | only in file
sw_interface_set_dpdk_hqos_subport | only in file
sw_interface_set_dpdk_hqos_subport_reply | only in file
sw_interface_set_dpdk_hqos_tctbl | only in file
sw_interface_set_dpdk_hqos_tctbl_reply | only in file
sw_interface_tap_details | only in file
sw_interface_tap_dump | only in file
sw_interface_virtio_pci_details | only in image
sw_interface_virtio_pci_dump | only in image
tap_connect | only in file
tap_connect_reply | only in file
tap_delete | only in file
tap_delete_reply | only in file
tap_modify | only in file
tap_modify_reply | only in file
virtio_pci_create | only in image
virtio_pci_create_reply | only in image
virtio_pci_delete | only in image
virtio_pci_delete_reply | only in image
vmxnet3_create | definition changed
vmxnet3_details | definition changed
want_ip4_arp_events | definition changed
want_ip6_nd_events | definition changed
Found 90 api message signature differences
### Patches that changed API definitions
| @c src/vnet/interface.api ||
| ------- | ------- |
| [3b0d7e42f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3b0d7e42f) | Revert "API: Cleanup APIs interface.api" |
| [e63325e3c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e63325e3c) | API: Cleanup APIs interface.api |
| [bb2c7b580](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bb2c7b580) | Update documentation for src/vnet/interface.api sw_interface_dump |
| @c src/vnet/interface_types.api ||
| ------- | ------- |
| [3b0d7e42f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3b0d7e42f) | Revert "API: Cleanup APIs interface.api" |
| [e63325e3c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e63325e3c) | API: Cleanup APIs interface.api |
| @c src/vnet/ip/ip.api ||
| ------- | ------- |
| [48ae19e90](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=48ae19e90) | API: Add python2.7 support for enum flags via aenum |
| [37029305c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=37029305c) | Use IP and MAC API types for neighbors |
| @c src/vnet/session/session.api ||
| ------- | ------- |
| [6442401c2](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6442401c2) | session: remove deprecated binary apis |
| @c src/vnet/vxlan-gbp/vxlan_gbp.api ||
| ------- | ------- |
| [4dd4cf4f9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4dd4cf4f9) | GBP: fixes for l3-out routing |
| @c src/vnet/ipsec/ipsec.api ||
| ------- | ------- |
| [1e3aa5e21](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1e3aa5e21) | ipsec: USE_EXTENDED_SEQ_NUM -> USE_ESN |
| [1ba5bc8d8](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1ba5bc8d8) | ipsec: add ipv6 support for ipsec tunnel interface |
| [5d704aea5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5d704aea5) | updates now that flags are supported on the API |
| [53f526b68](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=53f526b68) | TEST: IPSEC NAT-T with UDP header |
| [7c44d78ef](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7c44d78ef) | IKEv2 to plugin |
| [eba31eceb](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=eba31eceb) | IPSEC: move SA counters into the stats segment |
| [8d7c50200](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8d7c50200) | IPSEC: no second lookup after tunnel encap |
| [a09c1ff5b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a09c1ff5b) | IPSEC: SPD counters in the stats sgement |
| [17dcec0b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=17dcec0b9) | IPSEC: API modernisation |
| @c src/vnet/ipsec-gre/ipsec_gre.api ||
| ------- | ------- |
| [e524d45ef](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e524d45ef) | IPSEC-GRE: fixes and API update to common types. |
| @c src/vnet/l2/l2.api ||
| ------- | ------- |
| [192b13f96](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=192b13f96) | BVI Interface |
| [5daf0c55c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5daf0c55c) | add default NONE flag for bd_flags |
| @c src/vnet/tcp/tcp.api ||
| ------- | ------- |
| [c5df8c71c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c5df8c71c) | host stack: update stale copyright |
| @c src/vnet/devices/virtio/virtio.api ||
| ------- | ------- |
| [d6c15af33](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d6c15af33) | virtio: Native virtio driver |
| @c src/vnet/udp/udp.api ||
| ------- | ------- |
| [c5df8c71c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c5df8c71c) | host stack: update stale copyright |
| @c src/plugins/ct6/ct6.api ||
| ------- | ------- |
| [a55df1081](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a55df1081) | ipv6 connection tracking plugin |
| @c src/plugins/vmxnet3/vmxnet3.api ||
| ------- | ------- |
| [ee8ba6877](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ee8ba6877) | vmxnet3: auto bind support |
| [854559d15](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=854559d15) | vmxnet3: RSS support |
| [773291163](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=773291163) | vmxnet3: multiple TX queues support |
| @c src/plugins/ikev2/ikev2.api ||
| ------- | ------- |
| [7c44d78ef](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7c44d78ef) | IKEv2 to plugin |
| @c src/plugins/gbp/gbp.api ||
| ------- | ------- |
| [1aa35576e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1aa35576e) | GBP: Counters per-contract |
| [8ea109e40](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8ea109e40) | gbp: Add bd flags |
| [7bd343509](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7bd343509) | GBP: custom-dump functions |
| [fa0ac2c56](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=fa0ac2c56) | GBP: contracts API fixed length of allowed ethertypes |
| [5d704aea5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5d704aea5) | updates now that flags are supported on the API |
| [4ba67723d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4ba67723d) | GBP: use sclass in the DP for policy |
| [8da9fc659](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8da9fc659) | GBP: learn from ARP and L2 packets |
| [32f6d8e0c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=32f6d8e0c) | GBP: per-group EP retention policy |
| [879d11c25](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=879d11c25) | GBP: Sclass to src-epg conversions |
| @c src/plugins/nat/nat.api ||
| ------- | ------- |
| [8feeaff56](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8feeaff56) | Typos. A bunch of typos I've been collecting. |
| [34931eb47](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=34931eb47) | NAT44: active-passive HA (VPP-1571) |
| @c src/plugins/map/map.api ||
| ------- | ------- |
| [4dc5c7b90](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4dc5c7b90) | MAP: Add optional user-supplied 'tag' field in MAPs. |
| @c src/plugins/lb/lb.api ||
| ------- | ------- |
| [f7f13347b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f7f13347b) | tests: update test_lb.py to use api call lb_conf. |
| @c src/plugins/cdp/cdp.api ||
| ------- | ------- |
| [76ef6094c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=76ef6094c) | tests: cdp plugin. Replace cdp enable cli command with API call. |
| @c src/vpp/api/vpe.api ||
| ------- | ------- |
| [1aaf0e343](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1aaf0e343) | deprecate tapcli |
@page release_notes_19011 Release notes for VPP 19.01.1 @page release_notes_19011 Release notes for VPP 19.01.1
This is bug fix release. This is bug fix release.

View File

@ -25,7 +25,8 @@ define ipsec-mb_config_cmds
endef endef
define ipsec-mb_build_cmds define ipsec-mb_build_cmds
@true echo "BUILDING"
make -C $(ipsec-mb_src_dir) DEBUG=y NASM=$(ipsec-mb_install_dir)/bin/nasm
endef endef
define ipsec-mb_install_cmds define ipsec-mb_install_cmds

View File

@ -20,4 +20,4 @@ Sphinx==1.8.2
sphinx-rtd-theme==0.4.2 sphinx-rtd-theme==0.4.2
sphinxcontrib-websupport==1.1.0 sphinxcontrib-websupport==1.1.0
typing==3.6.6 typing==3.6.6
urllib3==1.24.1 urllib3==1.24.2

View File

@ -12,3 +12,6 @@ Programming notes for developers.
- @subpage acl_lookup_context - @subpage acl_lookup_context
- @subpage libmemif_doc - @subpage libmemif_doc
- @subpage syslog_doc - @subpage syslog_doc
- @subpage ipfix_doc
- @subpage stats_doc
- @subpage if_stats_client_doc

View File

@ -7,6 +7,7 @@ Several modules provide operational, dataplane-user focused documentation.
- @subpage avf_plugin_doc - @subpage avf_plugin_doc
- @subpage bfd_doc - @subpage bfd_doc
- @subpage dpdk_crypto_ipsec_doc - @subpage dpdk_crypto_ipsec_doc
- @subpage dhcp6_pd_doc
- @subpage flowprobe_plugin_doc - @subpage flowprobe_plugin_doc
- @subpage ioam_plugin_doc - @subpage ioam_plugin_doc
- @subpage ipsec_gre_doc - @subpage ipsec_gre_doc
@ -16,10 +17,13 @@ Several modules provide operational, dataplane-user focused documentation.
- @subpage lldp_doc - @subpage lldp_doc
- @subpage map_doc - @subpage map_doc
- @subpage marvel_plugin_doc - @subpage marvel_plugin_doc
- @subpage mtu_doc
- @subpage nat64_doc - @subpage nat64_doc
- @subpage nat_ha_doc
- @subpage qos_doc - @subpage qos_doc
- @subpage selinux_doc - @subpage selinux_doc
- @subpage span_doc - @subpage span_doc
- @subpage srmpls_doc - @subpage srmpls_doc
- @subpage srv6_doc - @subpage srv6_doc
- @subpage vcl_ldpreload_doc - @subpage vcl_ldpreload_doc
- @subpage vmxnet3_doc

View File

@ -46,7 +46,7 @@ Summary: Vector Packet Processing
License: ASL 2.0 License: ASL 2.0
Version: %{_version} Version: %{_version}
Release: %{_release} Release: %{_release}
Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, epel-release, net-tools, pciutils, python, python36
BuildRequires: systemd, chrpath BuildRequires: systemd, chrpath
BuildRequires: check, check-devel BuildRequires: check, check-devel
%if 0%{?fedora} %if 0%{?fedora}
@ -57,10 +57,14 @@ BuildRequires: mbedtls-devel
BuildRequires: cmake BuildRequires: cmake
%else %else
%if 0%{rhel} == 7 %if 0%{rhel} == 7
BuildRequires: epel-release
BuildRequires: devtoolset-7-toolchain BuildRequires: devtoolset-7-toolchain
BuildREquires: openssl-devel BuildREquires: openssl-devel
BuildRequires: python-devel, python-virtualenv, python-ply BuildRequires: python-devel, python-virtualenv
BuildRequires: mbedtls-devel
BuildRequires: python36-devel python36-pip python36-ply
BuildRequires: cmake3 BuildRequires: cmake3
BuildRequires: boost-filesystem
%endif %endif
%endif %endif
BuildRequires: libffi-devel BuildRequires: libffi-devel
@ -83,7 +87,7 @@ vpp_json_test - vector packet engine JSON test tool
%package lib %package lib
Summary: VPP libraries Summary: VPP libraries
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: vpp-selinux-policy = %{_version}-%{_release} Requires: vpp-selinux-policy = %{_version}-%{_release} boost-filesystem
%description lib %description lib
This package contains the VPP shared libraries, including: This package contains the VPP shared libraries, including:
@ -111,7 +115,7 @@ vppinfra
%package plugins %package plugins
Summary: Vector Packet Processing--runtime plugins Summary: Vector Packet Processing--runtime plugins
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: vpp = %{_version}-%{_release} numactl-libs Requires: vpp = %{_version}-%{_release} numactl-libs mbedtls
%description plugins %description plugins
This package contains VPP plugins This package contains VPP plugins

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, fnmatch, subprocess import os, fnmatch, subprocess
starttag = 'v19.01-rc0' starttag = 'v19.04-rc0'
endtag = 'v19.01' endtag = 'HEAD'
emit_md = True emit_md = True
apifiles = [] apifiles = []

View File

@ -1,4 +1,4 @@
# VPP interface stats client # VPP interface stats client {#if_stats_client_doc}
This is a source code and a binary of a 'thin client' to collect, This is a source code and a binary of a 'thin client' to collect,
aggregate and expose VPP interface stats through VPP stats socket API. aggregate and expose VPP interface stats through VPP stats socket API.

View File

@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
return()
endif()
find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT}) find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT})
find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT}) find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT})
@ -33,3 +37,5 @@ if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
else() else()
message(STATUS "Intel IPSecMB not found") message(STATUS "Intel IPSecMB not found")
endif() endif()
target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont")

File diff suppressed because it is too large Load Diff

View File

@ -112,15 +112,20 @@ openssl_ops_enc_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 n_ops,
for (i = 0; i < n_ops; i++) for (i = 0; i < n_ops; i++)
{ {
vnet_crypto_op_t *op = ops[i]; vnet_crypto_op_t *op = ops[i];
u32 nonce[3];
int len; int len;
if (op->flags & VNET_CRYPTO_OP_FLAG_INIT_IV) if (op->flags & VNET_CRYPTO_OP_FLAG_INIT_IV)
RAND_bytes (op->iv, op->iv_len); RAND_bytes (op->iv, 8);
nonce[0] = op->salt;
clib_memcpy_fast (nonce + 1, op->iv, 8);
EVP_EncryptInit_ex (ctx, cipher, 0, 0, 0); EVP_EncryptInit_ex (ctx, cipher, 0, 0, 0);
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, op->iv_len, NULL); EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL);
EVP_EncryptInit_ex (ctx, 0, 0, op->key, op->iv); EVP_EncryptInit_ex (ctx, 0, 0, op->key, (u8 *) nonce);
EVP_EncryptUpdate (ctx, NULL, &len, op->aad, op->aad_len); if (op->aad_len)
EVP_EncryptUpdate (ctx, NULL, &len, op->aad, op->aad_len);
EVP_EncryptUpdate (ctx, op->dst, &len, op->src, op->len); EVP_EncryptUpdate (ctx, op->dst, &len, op->src, op->len);
EVP_EncryptFinal_ex (ctx, op->dst + len, &len); EVP_EncryptFinal_ex (ctx, op->dst + len, &len);
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_GET_TAG, op->tag_len, op->tag); EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_GET_TAG, op->tag_len, op->tag);
@ -136,7 +141,7 @@ openssl_ops_dec_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 n_ops,
openssl_per_thread_data_t *ptd = vec_elt_at_index (per_thread_data, openssl_per_thread_data_t *ptd = vec_elt_at_index (per_thread_data,
vm->thread_index); vm->thread_index);
EVP_CIPHER_CTX *ctx = ptd->evp_cipher_ctx; EVP_CIPHER_CTX *ctx = ptd->evp_cipher_ctx;
u32 i; u32 i, n_fail = 0;
for (i = 0; i < n_ops; i++) for (i = 0; i < n_ops; i++)
{ {
vnet_crypto_op_t *op = ops[i]; vnet_crypto_op_t *op = ops[i];
@ -145,16 +150,20 @@ openssl_ops_dec_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 n_ops,
EVP_DecryptInit_ex (ctx, cipher, 0, 0, 0); EVP_DecryptInit_ex (ctx, cipher, 0, 0, 0);
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, op->iv_len, 0); EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, op->iv_len, 0);
EVP_DecryptInit_ex (ctx, 0, 0, op->key, op->iv); EVP_DecryptInit_ex (ctx, 0, 0, op->key, op->iv);
EVP_DecryptUpdate (ctx, 0, &len, op->aad, op->aad_len); if (op->aad_len)
EVP_DecryptUpdate (ctx, 0, &len, op->aad, op->aad_len);
EVP_DecryptUpdate (ctx, op->dst, &len, op->src, op->len); EVP_DecryptUpdate (ctx, op->dst, &len, op->src, op->len);
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_TAG, op->tag_len, op->tag); EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_TAG, op->tag_len, op->tag);
if (EVP_DecryptFinal_ex (ctx, op->dst + len, &len) > 0) if (EVP_DecryptFinal_ex (ctx, op->dst + len, &len) > 0)
op->status = VNET_CRYPTO_OP_STATUS_COMPLETED; op->status = VNET_CRYPTO_OP_STATUS_COMPLETED;
else else
op->status = VNET_CRYPTO_OP_STATUS_FAIL_DECRYPT; {
n_fail++;
op->status = VNET_CRYPTO_OP_STATUS_FAIL_DECRYPT;
}
} }
return n_ops; return n_ops - n_fail;
} }
static_always_inline u32 static_always_inline u32

View File

@ -1375,6 +1375,7 @@ lb_init (vlib_main_t * vm)
//Allocate and init default VIP. //Allocate and init default VIP.
lbm->vips = 0; lbm->vips = 0;
pool_get(lbm->vips, default_vip); pool_get(lbm->vips, default_vip);
default_vip->new_flow_table_mask = 0;
default_vip->prefix.ip6.as_u64[0] = 0xffffffffffffffffL; default_vip->prefix.ip6.as_u64[0] = 0xffffffffffffffffL;
default_vip->prefix.ip6.as_u64[1] = 0xffffffffffffffffL; default_vip->prefix.ip6.as_u64[1] = 0xffffffffffffffffL;
default_vip->protocol = ~0; default_vip->protocol = ~0;
@ -1418,6 +1419,12 @@ lb_init (vlib_main_t * vm)
default_as->address.ip6.as_u64[0] = 0xffffffffffffffffL; default_as->address.ip6.as_u64[0] = 0xffffffffffffffffL;
default_as->address.ip6.as_u64[1] = 0xffffffffffffffffL; default_as->address.ip6.as_u64[1] = 0xffffffffffffffffL;
/* Generate a valid flow table for default VIP */
default_vip->as_indexes = NULL;
lb_get_writer_lock();
lb_vip_update_new_flow_table(default_vip);
lb_put_writer_lock();
lbm->vip_index_by_nodeport lbm->vip_index_by_nodeport
= hash_create_mem (0, sizeof(u16), sizeof (uword)); = hash_create_mem (0, sizeof(u16), sizeof (uword));

View File

@ -1,4 +1,4 @@
# Active-Passive NAT HA # Active-Passive NAT HA {#nat_ha_doc}
## Introduction ## Introduction

File diff suppressed because it is too large Load Diff

View File

@ -81,6 +81,10 @@ test_crypto (vlib_main_t * vm, crypto_test_main_t * tm)
r = r->next; r = r->next;
} }
/* no tests registered */
if (n_ops == 0)
return 0;
vec_sort_with_function (rv, sort_registrations); vec_sort_with_function (rv, sort_registrations);
vec_validate_aligned (computed_data, computed_data_total_len - 1, vec_validate_aligned (computed_data, computed_data_total_len - 1,
@ -158,8 +162,6 @@ test_crypto (vlib_main_t * vm, crypto_test_main_t * tm)
op->user_data = i; op->user_data = i;
op++; op++;
} }
/* next */
r = r->next;
} }
/* *INDENT-ON* */ /* *INDENT-ON* */
@ -177,6 +179,7 @@ test_crypto (vlib_main_t * vm, crypto_test_main_t * tm)
{ {
case VNET_CRYPTO_OP_TYPE_AEAD_ENCRYPT: case VNET_CRYPTO_OP_TYPE_AEAD_ENCRYPT:
exp_tag = &r->tag; exp_tag = &r->tag;
/* fall through */
case VNET_CRYPTO_OP_TYPE_ENCRYPT: case VNET_CRYPTO_OP_TYPE_ENCRYPT:
exp_ct = &r->ciphertext; exp_ct = &r->ciphertext;
break; break;

View File

@ -1,4 +1,4 @@
# VMWARE vmxnet3 device driver plugin # VMWARE vmxnet3 device driver plugin {#vmxnet3_doc}
##Overview ##Overview
This plugin provides native PCI driver support for VMWare vmxnet3. This plugin provides native PCI driver support for VMWare vmxnet3.

View File

@ -248,7 +248,7 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
for (e = em->epoll_events; e < em->epoll_events + n_fds_ready; e++) for (e = em->epoll_events; e < em->epoll_events + n_fds_ready; e++)
{ {
u32 i = e->data.u32; u32 i = e->data.u32;
clib_file_t *f = fm->file_pool + i; clib_file_t *f = pool_elt_at_index (fm->file_pool, i);
clib_error_t *errors[4]; clib_error_t *errors[4];
int n_errors = 0; int n_errors = 0;
@ -285,14 +285,18 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{ {
if (e->events & EPOLLIN) if (e->events & EPOLLIN)
{ {
errors[n_errors] = f->read_function (f);
f->read_events++; f->read_events++;
errors[n_errors] = f->read_function (f);
/* Make sure f is valid if the file pool moves */
if (pool_is_free_index (fm->file_pool, i))
continue;
f = pool_elt_at_index (fm->file_pool, i);
n_errors += errors[n_errors] != 0; n_errors += errors[n_errors] != 0;
} }
if (e->events & EPOLLOUT) if (e->events & EPOLLOUT)
{ {
errors[n_errors] = f->write_function (f);
f->write_events++; f->write_events++;
errors[n_errors] = f->write_function (f);
n_errors += errors[n_errors] != 0; n_errors += errors[n_errors] != 0;
} }
} }
@ -300,8 +304,8 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{ {
if (f->error_function) if (f->error_function)
{ {
errors[n_errors] = f->error_function (f);
f->error_events++; f->error_events++;
errors[n_errors] = f->error_function (f);
n_errors += errors[n_errors] != 0; n_errors += errors[n_errors] != 0;
} }
else else

View File

@ -1,4 +1,4 @@
# Introduction # MTU Introduction {#mtu_doc}
Maximum Transmission Unit is a term used to describe the maximum sized "thingy" that can be sent out an interface. It can refer to the maximum frame size that a NIC can send. On Ethernet that would include the Ethernet header but typically not the IGF. It can refer to the maximum packet size, that is, on Ethernet an MTU of 1500, would allow an IPv4 packet of 1500 bytes, that would result in an Ethernet frame of 1518 bytes. Maximum Transmission Unit is a term used to describe the maximum sized "thingy" that can be sent out an interface. It can refer to the maximum frame size that a NIC can send. On Ethernet that would include the Ethernet header but typically not the IGF. It can refer to the maximum packet size, that is, on Ethernet an MTU of 1500, would allow an IPv4 packet of 1500 bytes, that would result in an Ethernet frame of 1518 bytes.
# MTU in VPP # MTU in VPP

View File

@ -179,7 +179,7 @@ format_ip_adjacency (u8 * s, va_list * args)
s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes); s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
s = format (s, "\n locks:%d", adj->ia_node.fn_locks); s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
s = format(s, "\n delegates:\n "); s = format(s, "\n delegates:\n ");
adj_delegate_format(s, adj); s = adj_delegate_format(s, adj);
s = format(s, "\n children:"); s = format(s, "\n children:");
if (fib_node_list_get_size(adj->ia_node.fn_children)) if (fib_node_list_get_size(adj->ia_node.fn_children))

View File

@ -104,6 +104,17 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
ethernet_set_rx_redirect (vnm, sif_hw, 1); ethernet_set_rx_redirect (vnm, sif_hw, 1);
} }
} }
else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
{
/* Just removed last L2 subinterface on this port */
vec_foreach (sw_if_index, bif->slaves)
{
sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
/* Allow ip packets to go directly to ip4-input etc */
ethernet_set_rx_redirect (vnm, sif_hw, 0);
}
}
return 0; return 0;
} }

View File

@ -119,8 +119,11 @@ vnet_crypto_set_handler (char *alg_name, char *engine)
if (id == 0) if (id == 0)
continue; continue;
od = vec_elt_at_index (cm->opt_data, id); od = vec_elt_at_index (cm->opt_data, id);
od->active_engine_index = p[0]; if (ce->ops_handlers[id])
cm->ops_handlers[id] = ce->ops_handlers[id]; {
od->active_engine_index = p[0];
cm->ops_handlers[id] = ce->ops_handlers[id];
}
} }
return 0; return 0;

View File

@ -112,7 +112,7 @@ typedef struct
u8 flags; u8 flags;
#define VNET_CRYPTO_OP_FLAG_INIT_IV (1 << 0) #define VNET_CRYPTO_OP_FLAG_INIT_IV (1 << 0)
#define VNET_CRYPTO_OP_FLAG_HMAC_CHECK (1 << 1) #define VNET_CRYPTO_OP_FLAG_HMAC_CHECK (1 << 1)
u32 len; u32 len, salt;
u16 aad_len; u16 aad_len;
u8 key_len, iv_len, digest_len, tag_len; u8 key_len, iv_len, digest_len, tag_len;
u8 *key; u8 *key;

View File

@ -175,6 +175,9 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
_IOCTL (vif->tap_fd, TUNSETIFF, (void *) &ifr); _IOCTL (vif->tap_fd, TUNSETIFF, (void *) &ifr);
vif->ifindex = if_nametoindex (ifr.ifr_ifrn.ifrn_name); vif->ifindex = if_nametoindex (ifr.ifr_ifrn.ifrn_name);
if (!args->host_if_name)
args->host_if_name = (u8 *) ifr.ifr_ifrn.ifrn_name;
unsigned int offload = 0; unsigned int offload = 0;
hdrsz = sizeof (struct virtio_net_hdr_v1); hdrsz = sizeof (struct virtio_net_hdr_v1);
if (args->tap_flags & TAP_FLAG_GSO) if (args->tap_flags & TAP_FLAG_GSO)

View File

@ -1883,6 +1883,9 @@ fib_path_resolve (fib_node_index_t path_index)
fib_path_attached_next_hop_set(path); fib_path_attached_next_hop_set(path);
break; break;
case FIB_PATH_TYPE_ATTACHED: case FIB_PATH_TYPE_ATTACHED:
{
dpo_id_t tmp = DPO_INVALID;
/* /*
* path->attached.fp_interface * path->attached.fp_interface
*/ */
@ -1891,12 +1894,18 @@ fib_path_resolve (fib_node_index_t path_index)
{ {
path->fp_oper_flags &= ~FIB_PATH_OPER_FLAG_RESOLVED; path->fp_oper_flags &= ~FIB_PATH_OPER_FLAG_RESOLVED;
} }
dpo_set(&path->fp_dpo, dpo_set(&tmp,
DPO_ADJACENCY, DPO_ADJACENCY,
path->fp_nh_proto, path->fp_nh_proto,
fib_path_attached_get_adj(path, fib_path_attached_get_adj(path,
dpo_proto_to_link(path->fp_nh_proto))); dpo_proto_to_link(path->fp_nh_proto)));
/*
* re-fetch after possible mem realloc
*/
path = fib_path_get(path_index);
dpo_copy(&path->fp_dpo, &tmp);
/* /*
* become a child of the adjacency so we receive updates * become a child of the adjacency so we receive updates
* when the interface state changes * when the interface state changes
@ -1904,7 +1913,9 @@ fib_path_resolve (fib_node_index_t path_index)
path->fp_sibling = adj_child_add(path->fp_dpo.dpoi_index, path->fp_sibling = adj_child_add(path->fp_dpo.dpoi_index,
FIB_NODE_TYPE_PATH, FIB_NODE_TYPE_PATH,
fib_path_get_index(path)); fib_path_get_index(path));
dpo_reset(&tmp);
break; break;
}
case FIB_PATH_TYPE_RECURSIVE: case FIB_PATH_TYPE_RECURSIVE:
{ {
/* /*

View File

@ -1,4 +1,4 @@
# IPFIX support {#ipfix} # IPFIX support {#ipfix_doc}
VPP includes a high-performance IPFIX record exporter. This note VPP includes a high-performance IPFIX record exporter. This note
explains how to use the internal APIs to export IPFIX data, and how to explains how to use the internal APIs to export IPFIX data, and how to

View File

@ -54,6 +54,20 @@ typedef CLIB_PACKED (struct {
}) ip6_and_esp_header_t; }) ip6_and_esp_header_t;
/* *INDENT-ON* */ /* *INDENT-ON* */
/**
* AES GCM Additional Authentication data
*/
typedef struct esp_aead_t_
{
/**
* for GCM: when using ESN it's:
* SPI, seq-hi, seg-low
* else
* SPI, seq-low
*/
u32 data[3];
} __clib_packed esp_aead_t;
#define ESP_SEQ_MAX (4294967295UL) #define ESP_SEQ_MAX (4294967295UL)
#define ESP_MAX_BLOCK_SIZE (16) #define ESP_MAX_BLOCK_SIZE (16)
#define ESP_MAX_IV_SIZE (16) #define ESP_MAX_IV_SIZE (16)
@ -117,6 +131,26 @@ hmac_calc (vlib_main_t * vm, ipsec_sa_t * sa, u8 * data, int data_len,
return sa->integ_icv_size; return sa->integ_icv_size;
} }
always_inline void
esp_aad_fill (vnet_crypto_op_t * op,
const esp_header_t * esp, const ipsec_sa_t * sa)
{
esp_aead_t *aad;
aad = (esp_aead_t *) op->aad;
clib_memcpy_fast (aad, esp, 8);
if (ipsec_sa_is_set_USE_ESN (sa))
{
/* SPI, seq-hi, seq-low */
aad->data[2] = aad->data[1];
aad->data[1] = clib_host_to_net_u32 (sa->seq_hi);
op->aad_len = 12;
}
else
/* SPI, seq-low */
op->aad_len = 8;
}
#endif /* __ESP_H__ */ #endif /* __ESP_H__ */
/* /*

View File

@ -177,7 +177,7 @@ esp_decrypt_inline (vlib_main_t * vm,
payload = b[0]->data + pd->current_data; payload = b[0]->data + pd->current_data;
/* we need 4 extra bytes for HMAC calculation when ESN are used */ /* we need 4 extra bytes for HMAC calculation when ESN are used */
if ((sa0->flags & IPSEC_SA_FLAG_USE_ESN) && pd->icv_sz && if (ipsec_sa_is_set_USE_ESN (sa0) && pd->icv_sz &&
(pd->current_data + pd->current_length + 4 > buffer_data_size)) (pd->current_data + pd->current_length + 4 > buffer_data_size))
{ {
b[0]->error = node->errors[ESP_DECRYPT_ERROR_NO_TAIL_SPACE]; b[0]->error = node->errors[ESP_DECRYPT_ERROR_NO_TAIL_SPACE];
@ -197,7 +197,7 @@ esp_decrypt_inline (vlib_main_t * vm,
current_sa_pkts += 1; current_sa_pkts += 1;
current_sa_bytes += pd->current_length; current_sa_bytes += pd->current_length;
if (PREDICT_TRUE (cpd.icv_sz > 0)) if (PREDICT_TRUE (sa0->integ_op_id != VNET_CRYPTO_OP_NONE))
{ {
vnet_crypto_op_t *op; vnet_crypto_op_t *op;
vec_add2_aligned (ptd->integ_ops, op, 1, CLIB_CACHE_LINE_BYTES); vec_add2_aligned (ptd->integ_ops, op, 1, CLIB_CACHE_LINE_BYTES);
@ -211,7 +211,7 @@ esp_decrypt_inline (vlib_main_t * vm,
op->digest = payload + len; op->digest = payload + len;
op->digest_len = cpd.icv_sz; op->digest_len = cpd.icv_sz;
op->len = len; op->len = len;
if (PREDICT_TRUE (sa0->flags & IPSEC_SA_FLAG_USE_ESN)) if (ipsec_sa_is_set_USE_ESN (sa0))
{ {
/* shift ICV for 4 bytes to insert ESN */ /* shift ICV for 4 bytes to insert ESN */
u8 tmp[ESP_MAX_ICV_SIZE], sz = sizeof (sa0->seq_hi); u8 tmp[ESP_MAX_ICV_SIZE], sz = sizeof (sa0->seq_hi);
@ -219,7 +219,7 @@ esp_decrypt_inline (vlib_main_t * vm,
clib_memcpy_fast (payload + len, &sa0->seq_hi, sz); clib_memcpy_fast (payload + len, &sa0->seq_hi, sz);
clib_memcpy_fast (payload + len + sz, tmp, ESP_MAX_ICV_SIZE); clib_memcpy_fast (payload + len + sz, tmp, ESP_MAX_ICV_SIZE);
op->len += sz; op->len += sz;
op->dst += sz; op->digest += sz;
} }
} }
@ -232,11 +232,42 @@ esp_decrypt_inline (vlib_main_t * vm,
vec_add2_aligned (ptd->crypto_ops, op, 1, CLIB_CACHE_LINE_BYTES); vec_add2_aligned (ptd->crypto_ops, op, 1, CLIB_CACHE_LINE_BYTES);
vnet_crypto_op_init (op, sa0->crypto_dec_op_id); vnet_crypto_op_init (op, sa0->crypto_dec_op_id);
op->key = sa0->crypto_key.data; op->key = sa0->crypto_key.data;
op->key_len = sa0->crypto_key.len;
op->iv = payload; op->iv = payload;
op->iv_len = cpd.iv_sz;
if (ipsec_sa_is_set_IS_AEAD (sa0))
{
esp_header_t *esp0;
esp_aead_t *aad;
u8 *scratch;
u32 salt;
/*
* construct the AAD and the nonce (Salt || IV) in a scratch
* space in front of the IP header.
*/
scratch = payload - esp_sz;
esp0 = (esp_header_t *) (scratch);
scratch -= (sizeof (*aad) + pd->hdr_sz);
op->aad = scratch;
esp_aad_fill (op, esp0, sa0);
/*
* we don't need to refer to the ESP header anymore so we
* can overwrite it with the salt and use the IV where it is
* to form the nonce = (Salt + IV)
*/
salt = clib_host_to_net_u32 (sa0->salt);
op->iv -= sizeof (sa0->salt);
clib_memcpy_fast (op->iv, &salt, sizeof (sa0->salt));
op->iv_len = cpd.iv_sz + sizeof (sa0->salt);
op->tag = payload + len;
op->tag_len = 16;
}
op->src = op->dst = payload += cpd.iv_sz; op->src = op->dst = payload += cpd.iv_sz;
op->len = len; op->len = len - cpd.iv_sz;
op->user_data = b - bufs; op->user_data = b - bufs;
} }
@ -287,7 +318,7 @@ esp_decrypt_inline (vlib_main_t * vm,
bi = op->user_data; bi = op->user_data;
if (op->status == VNET_CRYPTO_OP_STATUS_FAIL_BAD_HMAC) if (op->status == VNET_CRYPTO_OP_STATUS_FAIL_BAD_HMAC)
err = ESP_DECRYPT_ERROR_INTEG_ERROR; err = ESP_DECRYPT_ERROR_DECRYPTION_FAILED;
else else
err = ESP_DECRYPT_ERROR_CRYPTO_ENGINE_ERROR; err = ESP_DECRYPT_ERROR_CRYPTO_ENGINE_ERROR;

View File

@ -112,19 +112,26 @@ esp_add_footer_and_icv (vlib_buffer_t * b, u8 block_size, u8 icv_sz)
static_always_inline void static_always_inline void
esp_update_ip4_hdr (ip4_header_t * ip4, u16 len, int is_transport, int is_udp) esp_update_ip4_hdr (ip4_header_t * ip4, u16 len, int is_transport, int is_udp)
{ {
ip_csum_t sum = ip4->checksum; ip_csum_t sum;
u16 old_len = 0; u16 old_len;
len = clib_net_to_host_u16 (len);
old_len = ip4->length;
if (is_transport) if (is_transport)
{ {
u8 prot = is_udp ? IP_PROTOCOL_UDP : IP_PROTOCOL_IPSEC_ESP; u8 prot = is_udp ? IP_PROTOCOL_UDP : IP_PROTOCOL_IPSEC_ESP;
old_len = ip4->length;
sum = ip_csum_update (sum, ip4->protocol, prot, ip4_header_t, protocol);
ip4->protocol = prot;
}
ip4->length = len = clib_net_to_host_u16 (len); sum = ip_csum_update (ip4->checksum, ip4->protocol,
sum = ip_csum_update (ip4->checksum, old_len, len, ip4_header_t, length); prot, ip4_header_t, protocol);
ip4->protocol = prot;
sum = ip_csum_update (sum, old_len, len, ip4_header_t, length);
}
else
sum = ip_csum_update (ip4->checksum, old_len, len, ip4_header_t, length);
ip4->length = len;
ip4->checksum = ip_csum_fold (sum); ip4->checksum = ip_csum_fold (sum);
} }
@ -402,14 +409,16 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
ip6_header_t *ip6 = (ip6_header_t *) (ip_hdr); ip6_header_t *ip6 = (ip6_header_t *) (ip_hdr);
*next_hdr_ptr = ip6->protocol; *next_hdr_ptr = ip6->protocol;
ip6->protocol = IP_PROTOCOL_IPSEC_ESP; ip6->protocol = IP_PROTOCOL_IPSEC_ESP;
ip6->payload_length = payload_len + hdr_len - l2_len - ip_len; ip6->payload_length =
clib_host_to_net_u16 (payload_len + hdr_len - l2_len -
ip_len);
} }
else else
{ {
u16 len; u16 len;
ip4_header_t *ip4 = (ip4_header_t *) (ip_hdr); ip4_header_t *ip4 = (ip4_header_t *) (ip_hdr);
*next_hdr_ptr = ip4->protocol; *next_hdr_ptr = ip4->protocol;
len = payload_len + hdr_len + l2_len; len = payload_len + hdr_len - l2_len;
if (udp) if (udp)
{ {
esp_update_ip4_hdr (ip4, len, /* is_transport */ 1, 1); esp_update_ip4_hdr (ip4, len, /* is_transport */ 1, 1);
@ -431,13 +440,26 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vec_add2_aligned (ptd->crypto_ops, op, 1, CLIB_CACHE_LINE_BYTES); vec_add2_aligned (ptd->crypto_ops, op, 1, CLIB_CACHE_LINE_BYTES);
vnet_crypto_op_init (op, sa0->crypto_enc_op_id); vnet_crypto_op_init (op, sa0->crypto_enc_op_id);
op->iv = payload - iv_sz; op->iv = payload - iv_sz;
op->iv_len = iv_sz;
op->src = op->dst = payload; op->src = op->dst = payload;
op->key = sa0->crypto_key.data; op->key = sa0->crypto_key.data;
op->key_len = sa0->crypto_key.len;
op->len = payload_len - icv_sz; op->len = payload_len - icv_sz;
op->flags = VNET_CRYPTO_OP_FLAG_INIT_IV; op->flags = VNET_CRYPTO_OP_FLAG_INIT_IV;
op->user_data = b - bufs; op->user_data = b - bufs;
op->salt = sa0->salt;
if (ipsec_sa_is_set_IS_AEAD (sa0))
{
/*
* construct the AAD in a scratch space in front
* of the IP header.
*/
op->aad = payload - hdr_len - sizeof (esp_aead_t);
esp_aad_fill (op, esp, sa0);
op->tag = payload + op->len;
op->tag_len = 16;
}
} }
if (sa0->integ_op_id) if (sa0->integ_op_id)
@ -455,7 +477,7 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (ipsec_sa_is_set_USE_ESN (sa0)) if (ipsec_sa_is_set_USE_ESN (sa0))
{ {
u32 seq_hi = clib_net_to_host_u32 (sa0->seq_hi); u32 seq_hi = clib_net_to_host_u32 (sa0->seq_hi);
clib_memcpy_fast (op->dst, &seq_hi, sizeof (seq_hi)); clib_memcpy_fast (op->digest, &seq_hi, sizeof (seq_hi));
op->len += sizeof (seq_hi); op->len += sizeof (seq_hi);
} }
} }

View File

@ -38,13 +38,6 @@ ipsec_check_ah_support (ipsec_sa_t * sa)
static clib_error_t * static clib_error_t *
ipsec_check_esp_support (ipsec_sa_t * sa) ipsec_check_esp_support (ipsec_sa_t * sa)
{ {
if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128)
return clib_error_return (0, "unsupported aes-gcm-128 crypto-alg");
if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_192)
return clib_error_return (0, "unsupported aes-gcm-192 crypto-alg");
if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_256)
return clib_error_return (0, "unsupported aes-gcm-256 crypto-alg");
return 0; return 0;
} }
@ -293,6 +286,24 @@ ipsec_init (vlib_main_t * vm)
a->dec_op_id = VNET_CRYPTO_OP_AES_256_CBC_DEC; a->dec_op_id = VNET_CRYPTO_OP_AES_256_CBC_DEC;
a->iv_size = a->block_size = 16; a->iv_size = a->block_size = 16;
a = im->crypto_algs + IPSEC_CRYPTO_ALG_AES_GCM_128;
a->enc_op_id = VNET_CRYPTO_OP_AES_128_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_128_GCM_DEC;
a->iv_size = a->block_size = 8;
a->icv_size = 16;
a = im->crypto_algs + IPSEC_CRYPTO_ALG_AES_GCM_192;
a->enc_op_id = VNET_CRYPTO_OP_AES_192_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_192_GCM_DEC;
a->iv_size = a->block_size = 8;
a->icv_size = 16;
a = im->crypto_algs + IPSEC_CRYPTO_ALG_AES_GCM_256;
a->enc_op_id = VNET_CRYPTO_OP_AES_256_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_256_GCM_DEC;
a->iv_size = a->block_size = 8;
a->icv_size = 16;
vec_validate (im->integ_algs, IPSEC_INTEG_N_ALG - 1); vec_validate (im->integ_algs, IPSEC_INTEG_N_ALG - 1);
ipsec_main_integ_alg_t *i; ipsec_main_integ_alg_t *i;

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