Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
116af2170e | ||
|
84568df69a | ||
|
c47652c50b | ||
|
fb353ce54e | ||
|
7513c8c7d2 | ||
|
c64ef37c82 | ||
|
50328c9d1e | ||
|
1999e983c5 | ||
|
a416ea9f02 | ||
|
84db40e02e | ||
|
b5518bedd9 | ||
|
abc914b7da | ||
|
5e62e58e4e | ||
|
ec0452133a | ||
|
cf6c343710 | ||
|
e0c078aa2a | ||
|
87f1411722 | ||
|
93b7822ddc | ||
|
86c0446e28 | ||
|
4ca58265a0 | ||
|
dfa0d20405 | ||
|
8c5bfbcc09 | ||
|
dea5881815 | ||
|
76c37d2d84 | ||
|
fc7e711003 | ||
|
67700d4116 | ||
|
a5081a7ac3 | ||
|
e691345d7a | ||
|
79bfbae54c | ||
|
f3d627dd3c | ||
|
de6c03c0f1 | ||
|
77d7dcba32 | ||
|
8ec5f4d742 | ||
|
dab7eb87bc | ||
|
780af45905 | ||
|
bd70c2f2e3 | ||
|
1808f3c00a | ||
|
3fd57e6753 | ||
|
d84f2ef54a | ||
|
7ea28045aa |
@ -2,3 +2,4 @@
|
||||
host=gerrit.fd.io
|
||||
port=29418
|
||||
project=vpp
|
||||
defaultbranch=stable/1710
|
||||
|
13
Makefile
13
Makefile
@ -81,13 +81,16 @@ endif
|
||||
RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
|
||||
RPM_DEPENDS += apr-devel
|
||||
RPM_DEPENDS += numactl-devel
|
||||
RPM_DEPENDS += check
|
||||
RPM_DEPENDS += check check-devel
|
||||
|
||||
ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
|
||||
RPM_DEPENDS += subunit subunit-devel
|
||||
RPM_DEPENDS += openssl-devel
|
||||
RPM_DEPENDS += python-devel
|
||||
RPM_DEPENDS += python2-virtualenv
|
||||
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
|
||||
else ifeq ($(shell if [ "$(OS_ID)" = "fedora" ]; then test $(OS_VERSION_ID) -gt 25; echo $$?; fi),0)
|
||||
RPM_DEPENDS += subunit subunit-devel
|
||||
RPM_DEPENDS += compat-openssl10-devel
|
||||
RPM_DEPENDS += python2-devel
|
||||
RPM_DEPENDS += python2-virtualenv
|
||||
@ -110,13 +113,7 @@ endif
|
||||
|
||||
RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static
|
||||
RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool make openssl-devel
|
||||
RPM_SUSE_DEPENDS += python-devel python3-devel python-pip python3-pip python-rpm-macros shadow nasm libnuma-devel python3
|
||||
|
||||
ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
|
||||
RPM_DEPENDS += python34
|
||||
else
|
||||
RPM_DEPENDS += python3
|
||||
endif
|
||||
RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow nasm libnuma-devel
|
||||
|
||||
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
|
||||
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
|
||||
|
15
README.md
15
README.md
@ -30,10 +30,11 @@ Directory name | Description
|
||||
build-root | Build output directory
|
||||
doxygen | Documentation generator configuration
|
||||
dpdk | DPDK patches and build infrastructure
|
||||
@ref src | VPP source code
|
||||
@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 | Unit tests
|
||||
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
|
||||
@ -43,9 +44,8 @@ Directory name | Description
|
||||
@ref src/vpp | VPP application
|
||||
@ref src/vpp-api | VPP application API bindings
|
||||
@ref src/vppinfra | VPP core library
|
||||
test | Unit tests
|
||||
@ref src/vpp/api | Not-yet-relocated API bindings
|
||||
@ref src/examples | VPP example code
|
||||
test | Unit tests and Python test harness
|
||||
|
||||
## Getting started
|
||||
|
||||
@ -95,12 +95,13 @@ for this can be found [on the Setting up Vagrant wiki page]
|
||||
## More information
|
||||
|
||||
Several modules provide documentation, see @subpage user_doc for more
|
||||
information.
|
||||
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 development notes.
|
||||
advanced building strategies and other development notes.
|
||||
|
||||
|
||||
## Test Framework
|
||||
|
||||
There is PyDoc generated documentation available for the VPP test framework. See @subpage test_framework_doc for details.
|
||||
There is PyDoc generated documentation available for the VPP test framework.
|
||||
See @ref test_framework_doc for details.
|
||||
|
246
RELEASE.md
246
RELEASE.md
@ -1,5 +1,6 @@
|
||||
# Release Notes {#release_notes}
|
||||
|
||||
* @subpage release_notes_1710
|
||||
* @subpage release_notes_1707
|
||||
* @subpage release_notes_1704
|
||||
* @subpage release_notes_17011
|
||||
@ -7,6 +8,251 @@
|
||||
* @subpage release_notes_1609
|
||||
* @subpage release_notes_1606
|
||||
|
||||
@page release_notes_1710 Release notes for VPP 17.10
|
||||
|
||||
More than 400 commits since the 1707 release.
|
||||
|
||||
## Features
|
||||
- Infrastructure
|
||||
- DPDK 17.08
|
||||
- IP reassembly
|
||||
- Bounded-index extensible hash bucket-level LRU cache
|
||||
- Templated timer wheel improvements
|
||||
|
||||
- API
|
||||
- C/C++ language binding
|
||||
- API stats
|
||||
|
||||
- Host stack
|
||||
- VPP TCP stack scale/congestion improvements
|
||||
- VPP Comms Library (VCL)
|
||||
- Overall performance, scale and hardening
|
||||
|
||||
- Network features
|
||||
- IPSec rework - utilize new FIB
|
||||
- VPLS and VPWS implementation
|
||||
|
||||
- NAT
|
||||
- Renamed SNAT to NAT
|
||||
- Performance / Scale
|
||||
- Destination NAT44 with load-balancing
|
||||
- In2out translation as an output feature on the outside interface
|
||||
- Fullback to 3-tuple key for non TCP/UDP/ICMP sessions
|
||||
|
||||
- Security Groups/ACLs
|
||||
- "Replace" semantics for adding a new MacIP acl
|
||||
- Test suite tests for MacIP ACLs
|
||||
|
||||
- ONE-LISP
|
||||
- Map-server fallback support
|
||||
- Preemptive re-fetch of active mappings that are about to expire
|
||||
- ND termination
|
||||
|
||||
- PPPoE
|
||||
- PPPoE Control Plane packet dispatch
|
||||
- PPPoE decapsulation
|
||||
- PPPoE encapsulation
|
||||
|
||||
## 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/1710)
|
||||
|
||||
## API changes
|
||||
|
||||
Message Name Result
|
||||
bridge_domain_add_del definition changed
|
||||
bridge_domain_details definition changed
|
||||
connect_session definition changed
|
||||
connect_sock definition changed
|
||||
connect_sock_reply definition changed
|
||||
connect_uri_reply definition changed
|
||||
create_vhost_user_if definition changed
|
||||
dhcp_client_config definition changed
|
||||
ip4_arp_event definition changed
|
||||
ip6_fib_details definition changed
|
||||
ip6_nd_event definition changed
|
||||
ip_add_del_route definition changed
|
||||
ip_fib_details definition changed
|
||||
ip_table_add_del definition changed
|
||||
l2_macs_event only in image
|
||||
macip_acl_add_replace definition changed
|
||||
macip_acl_interface_list_details only in image
|
||||
macip_acl_interface_list_dump only in image
|
||||
modify_vhost_user_if definition changed
|
||||
mpls_fib_details definition changed
|
||||
mpls_route_add_del definition changed
|
||||
mpls_table_add_del definition changed
|
||||
mpls_tunnel_add_del definition changed
|
||||
nat44_add_del_address_range definition changed
|
||||
nat44_add_del_interface_addr definition changed
|
||||
nat44_add_del_lb_static_mapping definition changed
|
||||
nat44_add_del_static_mapping definition changed
|
||||
nat44_address_details only in image
|
||||
nat44_address_dump only in image
|
||||
nat44_interface_add_del_feature definition changed
|
||||
nat44_interface_add_del_output_feature definition changed
|
||||
nat44_interface_addr_details only in image
|
||||
nat44_interface_addr_dump only in image
|
||||
nat44_interface_details only in image
|
||||
nat44_interface_dump only in image
|
||||
nat44_interface_output_feature_details only in image
|
||||
nat44_interface_output_feature_dump only in image
|
||||
nat44_lb_static_mapping_details only in image
|
||||
nat44_lb_static_mapping_dump only in image
|
||||
nat44_static_mapping_details only in image
|
||||
nat44_static_mapping_dump only in image
|
||||
nat44_user_details only in image
|
||||
nat44_user_dump only in image
|
||||
nat44_user_session_details only in image
|
||||
nat44_user_session_dump only in image
|
||||
nat_control_ping definition changed
|
||||
nat_det_add_del_map definition changed
|
||||
nat_det_close_session_in definition changed
|
||||
nat_det_close_session_out definition changed
|
||||
nat_det_forward definition changed
|
||||
nat_det_get_timeouts definition changed
|
||||
nat_det_map_details only in image
|
||||
nat_det_map_dump only in image
|
||||
nat_det_reverse definition changed
|
||||
nat_det_session_details only in image
|
||||
nat_det_session_dump only in image
|
||||
nat_det_set_timeouts definition changed
|
||||
nat_ipfix_enable_disable definition changed
|
||||
nat_set_workers definition changed
|
||||
nat_show_config definition changed
|
||||
nat_worker_details only in image
|
||||
nat_worker_dump only in image
|
||||
one_add_del_ndp_entry definition changed
|
||||
one_enable_disable_petr_mode definition changed
|
||||
one_enable_disable_pitr_mode definition changed
|
||||
one_enable_disable_xtr_mode definition changed
|
||||
one_get_transport_protocol definition changed
|
||||
one_map_register_fallback_threshold definition changed
|
||||
one_map_register_set_ttl definition changed
|
||||
one_ndp_bd_get definition changed
|
||||
one_ndp_entries_get definition changed
|
||||
one_set_transport_protocol definition changed
|
||||
one_show_petr_mode definition changed
|
||||
one_show_pitr_mode definition changed
|
||||
one_show_xtr_mode definition changed
|
||||
p2p_ethernet_add definition changed
|
||||
pppoe_add_del_session definition changed
|
||||
pppoe_session_details only in image
|
||||
pppoe_session_dump only in image
|
||||
punt_socket_deregister definition changed
|
||||
punt_socket_register definition changed
|
||||
show_one_map_register_fallback_threshold definition changed
|
||||
show_one_map_register_ttl definition changed
|
||||
snat_interface_add_del_output_feature definition changed
|
||||
snat_interface_output_feature_details only in image
|
||||
snat_interface_output_feature_dump only in image
|
||||
sw_interface_event only in image
|
||||
sw_interface_set_flags definition changed
|
||||
sw_interface_span_dump definition changed
|
||||
sw_interface_span_enable_disable definition changed
|
||||
sw_interface_vhost_user_details definition changed
|
||||
tcp_configure_src_addresses definition changed
|
||||
vnet_per_interface_combined_counters only in image
|
||||
vnet_per_interface_simple_counters only in image
|
||||
want_interface_combined_stats definition changed
|
||||
want_interface_simple_stats definition changed
|
||||
want_ip4_fib_stats definition changed
|
||||
want_ip4_nbr_stats definition changed
|
||||
want_ip6_fib_stats definition changed
|
||||
want_ip6_nbr_stats definition changed
|
||||
want_l2_macs_events definition changed
|
||||
want_per_interface_combined_stats definition changed
|
||||
want_per_interface_simple_stats definition changed
|
||||
Found 103 api message signature differences
|
||||
|
||||
Patches that updated the API files:
|
||||
|
||||
./src/plugins/pppoe/pppoe.api
|
||||
62f9cdd8 Add PPPoE Plugin
|
||||
|
||||
./src/plugins/acl/acl.api
|
||||
c29940c5 ACL-plugin add "replace" semantics for adding a new MacIP acl
|
||||
de9fbf43 MAC IP ACL interface list dump (as an alternative to the get/reply)
|
||||
|
||||
./src/plugins/nat/nat.api
|
||||
704018cf NAT: Destination NAT44 with load-balancing (VPP-954)
|
||||
2ba92e32 NAT: Rename snat plugin to nat (VPP-955)
|
||||
|
||||
./src/vnet/interface.api
|
||||
831fb59f Stats refactor
|
||||
d292ab1e No context in SW interface event
|
||||
a07bd708 Dedicated SW Interface Event
|
||||
|
||||
./src/vnet/dhcp/dhcp.api
|
||||
51822bf0 DHCP client option 61 "client_id"
|
||||
4729b1ec DHCP complete event sends mask length
|
||||
|
||||
./src/vnet/lldp/lldp.api
|
||||
99a0e60e Add API support for LLDP config/interface set
|
||||
|
||||
./src/vnet/lisp-cp/one.api
|
||||
d630713d LISP: add neighbor discovery and CP protocol separation APIs
|
||||
111a5cea LISP: Add APIs for enable/disable xTR/P-ITR/P-ETR modes
|
||||
7048ff1e LISP: Map-server fallback feature
|
||||
1e553a00 LISP: make TTL for map register messages configurable
|
||||
|
||||
./src/vnet/ethernet/p2p_ethernet.api
|
||||
15ac81c1 P2P Ethernet
|
||||
|
||||
./src/vnet/mpls/mpls.api
|
||||
2297af01 Add a name to the creation of an IP and MPLS table
|
||||
28ab9cc1 FIB table add/delete API only
|
||||
da78f957 L2 over MPLS
|
||||
a0a908f1 FIB path weight incorrect in dump (VPP-922)
|
||||
57b5860f FIB path preference
|
||||
|
||||
./src/vnet/session/session.api
|
||||
33e002b1 Fix session connect api message handling.
|
||||
|
||||
./src/vnet/span/span.api
|
||||
5b311202 SPAN/API:enable L2 dump
|
||||
001fd406 SPAN:add l2 mirror
|
||||
|
||||
./src/vnet/devices/virtio/vhost_user.api
|
||||
4ba75f54 vhost: Remove operation mode in the API
|
||||
|
||||
./src/vnet/vxlan-gpe/vxlan_gpe.api
|
||||
04ffd0ad VPP crash on creating vxlan gpe interface. VPP-875
|
||||
|
||||
./src/vnet/tcp/tcp.api
|
||||
3bbcfab1 TCP source address automation
|
||||
|
||||
./src/vnet/ip/ip.api
|
||||
2297af01 Add a name to the creation of an IP and MPLS table
|
||||
28ab9cc1 FIB table add/delete API only
|
||||
57b5860f FIB path preference
|
||||
|
||||
./src/vnet/lisp-gpe/lisp_gpe.api
|
||||
af3d9771 Remove unused retval from gpe_native_fwd_rpath type definition
|
||||
|
||||
./src/vnet/l2/l2.api
|
||||
50570ece Update of free text tag patch for BD
|
||||
48304141 Support for bridge domain free text tag
|
||||
e531f4cb Increase default MAC learn limit and check it in learn-update path
|
||||
8d00fff8 Add support for API client to receive L2 MAC events
|
||||
|
||||
./src/vpp/api/vpe.api
|
||||
8a19f12a Allow individual stats API and introduce stats.api
|
||||
4802632d Punt socket: Fix coverity error for pathname length mismatch between API and sun_path.
|
||||
f7a55ad7 PUNT socket: External control plane processes connected via UNIX domain sockets.
|
||||
75e2f2ac API:fix arp/ND event messages - remove context
|
||||
99a0e60e Add API support for LLDP config/interface set
|
||||
|
||||
./src/vpp/stats/stats.api
|
||||
831fb59f Stats refactor
|
||||
8a19f12a Allow individual stats API and introduce stats.api
|
||||
|
||||
@page release_notes_1707 Release notes for VPP 17.07
|
||||
|
||||
More than 400 commits since the 1704 release.
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo oper-170926
|
||||
echo oper-rls1710-171011
|
||||
|
@ -62,7 +62,8 @@ DOXY_INPUT ?= \
|
||||
$(wildcard $(WS_ROOT)/*.md) \
|
||||
$(wildcard $(DOXY_DIR)/*.md) \
|
||||
$(DOXY_SRC_DIRECTORIES) \
|
||||
$(DOXY_SRC)/plugins
|
||||
$(DOXY_SRC)/plugins \
|
||||
extras
|
||||
|
||||
# Strip leading workspace path from input names
|
||||
DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
|
||||
@ -73,7 +74,6 @@ DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
|
||||
# there's a DPDK equivalent that conflicts.
|
||||
# These must be left-anchored paths for the regexp below to work.
|
||||
DOXY_EXCLUDE ?= \
|
||||
$(DOXY_SRC)/vlib/buffer.c \
|
||||
$(DOXY_SRC)/vpp-api/lua
|
||||
|
||||
# Generate a regexp for filenames to exclude
|
||||
|
@ -45,3 +45,9 @@ pre {
|
||||
a.el {
|
||||
font-family: Consolas, Courier, monospace;
|
||||
}
|
||||
|
||||
div.fragment {
|
||||
padding: 2px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
|
12
doxygen/dev_doc.md
Normal file
12
doxygen/dev_doc.md
Normal file
@ -0,0 +1,12 @@
|
||||
Developer Documentation {#dev_doc}
|
||||
=======================
|
||||
|
||||
Programming notes for developers.
|
||||
|
||||
- @subpage test_framework_doc
|
||||
- @subpage sample_plugin_doc
|
||||
- @subpage api_doc
|
||||
- @subpage vapi_doc
|
||||
- @subpage acl_hash_lookup
|
||||
- @subpage acl_multicore
|
||||
- @subpage libmemif_doc
|
@ -882,7 +882,8 @@ EXAMPLE_RECURSIVE = NO
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH = $(ROOT)/doxygen/assets
|
||||
IMAGE_PATH = $(ROOT)/doxygen/assets \
|
||||
$(ROOT)/extras/libmemif/docs
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
|
@ -3,5 +3,6 @@ Test Framework Documentation {#test_framework_doc}
|
||||
|
||||
PyDoc generated documentation for the "make test" framework is available for the following releases
|
||||
|
||||
- [Test framework documentation for VPP 17.10](https://docs.fd.io/vpp/17.10/vpp_make_test/html)
|
||||
- [Test framework documentation for VPP 17.04](https://docs.fd.io/vpp/17.04/vpp_make_test/html)
|
||||
- [Test framework documentation for VPP 17.01](https://docs.fd.io/vpp/17.01/vpp_make_test/html)
|
||||
|
@ -16,6 +16,4 @@ Several modules provide operational, dataplane-user focused documentation.
|
||||
- @subpage span_doc
|
||||
- @subpage srv6_doc
|
||||
- @subpage srmpls_doc
|
||||
- @subpage sample_plugin_doc
|
||||
- @subpage nat64_doc
|
||||
- @subpage api_doc
|
||||
|
@ -25,7 +25,7 @@ DPDK_MLX5_PMD ?= n
|
||||
B := $(DPDK_BUILD_DIR)
|
||||
I := $(DPDK_INSTALL_DIR)
|
||||
DPDK_VERSION ?= 17.08
|
||||
PKG_SUFFIX ?= vpp1
|
||||
PKG_SUFFIX ?= vpp2
|
||||
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
|
||||
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
|
||||
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
|
||||
|
@ -0,0 +1,63 @@
|
||||
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
|
||||
index bb634c6..7c65dda 100644
|
||||
--- a/drivers/net/bonding/rte_eth_bond_args.c
|
||||
+++ b/drivers/net/bonding/rte_eth_bond_args.c
|
||||
@@ -61,16 +61,6 @@
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < rte_eth_dev_count(); i++) {
|
||||
-
|
||||
- /* Currently populated by rte_eth_copy_pci_info().
|
||||
- *
|
||||
- * TODO: Once the PCI bus has arrived we should have a better
|
||||
- * way to test for being a PCI device or not.
|
||||
- */
|
||||
- if (rte_eth_devices[i].data->kdrv == RTE_KDRV_UNKNOWN ||
|
||||
- rte_eth_devices[i].data->kdrv == RTE_KDRV_NONE)
|
||||
- continue;
|
||||
-
|
||||
pci_dev = RTE_ETH_DEV_TO_PCI(&rte_eth_devices[i]);
|
||||
eth_pci_addr = &pci_dev->addr;
|
||||
|
||||
@@ -98,6 +88,16 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static inline int
|
||||
+pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
|
||||
+{
|
||||
+ struct rte_pci_device *pdev;
|
||||
+ const struct rte_pci_addr *paddr = _pci_addr;
|
||||
+
|
||||
+ pdev = RTE_DEV_TO_PCI(*(struct rte_device **)(void *)&dev);
|
||||
+ return rte_eal_compare_pci_addr(&pdev->addr, paddr);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Parses a port identifier string to a port id by pci address, then by name,
|
||||
* and finally port id.
|
||||
@@ -106,10 +106,23 @@
|
||||
parse_port_id(const char *port_str)
|
||||
{
|
||||
struct rte_pci_addr dev_addr;
|
||||
+ struct rte_bus *pci_bus;
|
||||
+ struct rte_device *dev;
|
||||
int port_id;
|
||||
|
||||
+ pci_bus = rte_bus_find_by_name("pci");
|
||||
+ if (pci_bus == NULL) {
|
||||
+ RTE_LOG(ERR, PMD, "unable to find PCI bus\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* try parsing as pci address, physical devices */
|
||||
- if (eal_parse_pci_DomBDF(port_str, &dev_addr) == 0) {
|
||||
+ if (pci_bus->parse(port_str, &dev_addr) == 0) {
|
||||
+ dev = pci_bus->find_device(NULL, pci_addr_cmp, &dev_addr);
|
||||
+ if (dev == NULL) {
|
||||
+ RTE_LOG(ERR, PMD, "unable to find PCI device\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
port_id = find_port_id_by_pci_addr(&dev_addr);
|
||||
if (port_id < 0)
|
||||
return -1;
|
@ -1,4 +1,4 @@
|
||||
## Build Instructions
|
||||
## Build Instructions {#libmemif_build_doc}
|
||||
|
||||
Install dependencies
|
||||
```
|
||||
@ -49,6 +49,7 @@ commands:
|
||||
ip-set <index> <ip-addr> - set interface ip address
|
||||
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
|
||||
```
|
||||
|
||||
#### Examples
|
||||
|
||||
Once the library is build/installed, refer to [Examples](../examples/README.md) and [Getting started](GettingStarted.md) for additional information on basic use cases and API usage.
|
||||
Once the library is built/installed, refer to @ref libmemif_examples_doc and @ref libmemif_gettingstarted_doc for additional information on basic use cases and API usage.
|
@ -1,8 +1,8 @@
|
||||
## Getting started
|
||||
## Getting started {#libmemif_gettingstarted_doc}
|
||||
|
||||
#### Concept (Connecting to VPP)
|
||||
|
||||
For detailed information on api calls and structures please refer to [libmemif.h](../src/libmemif.h)
|
||||
For detailed information on api calls and structures please refer to @ref libmemif.h.
|
||||
|
||||
1. Initialize memif
|
||||
- Declare callback function handling file descriptor event polling.
|
||||
@ -152,7 +152,8 @@ if (err != MEMIF_ERR_SUCCESS)
|
||||
|
||||
#### Example app (libmemif fd event polling):
|
||||
|
||||
- [ICMP Responder](../examples/icmp_responder/main.c)
|
||||
- @ref extras/libmemif/examples/icmp_responder
|
||||
|
||||
> Optional argument: transmit queue id.
|
||||
```
|
||||
icmpr 1
|
||||
@ -162,11 +163,14 @@ icmpr 1
|
||||
|
||||
#### Example app:
|
||||
|
||||
- [ICMP Responder custom fd event polling](../examples/icmp_responder-epoll/main.c)
|
||||
ICMP Responder custom fd event polling.
|
||||
|
||||
- @ref extras/libmemif/examples/icmp_responder-epoll
|
||||
|
||||
#### Example app (multi-thread queue polling)
|
||||
|
||||
- [ICMP Responder multi-thread](../examples/icmp_responder-mt/main.c)
|
||||
ICMP Responder multi-thread.
|
||||
- @ref extras/libmemif/examples/icmp_responder-mt
|
||||
|
||||
> Simple example of libmemif multi-thread usage. Connection establishment is handled by main thread. There are two rx queues in this example. One in polling mode and second in interrupt mode.
|
||||
|
@ -1,16 +0,0 @@
|
||||
## Examples
|
||||
|
||||
After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
|
||||
|
||||
#### Run in container
|
||||
ligato/libmemif-sample-service image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
|
||||
```
|
||||
# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
|
||||
```
|
||||
Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to ./.libs folder and execute binary directly.
|
||||
|
||||
Example app | Description
|
||||
------------|------------
|
||||
[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
|
||||
[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
|
||||
[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.
|
@ -1,11 +1,12 @@
|
||||
## Example setup
|
||||
## Example setup {#libmemif_example_setup_doc}
|
||||
|
||||
#### VPP-memif master icmp_responder slave
|
||||
|
||||
> Libmemif example app(s) use memif default socket file: /run/vpp/memif.sock.
|
||||
> Libmemif example app(s) use memif default socket file: `/run/vpp/memif.sock`.
|
||||
|
||||
Run VPP and icmpr-epoll example (default example when running in container).
|
||||
> Other examples work similar to icmpr-epoll. Brief explanation can be found in [Examples readme](README.md) file.
|
||||
|
||||
> Other examples work similar to icmpr-epoll. Brief explanation can be found in @ref libmemif_examples_doc .
|
||||
|
||||
VPP-side config:
|
||||
```
|
18
extras/libmemif/examples/examples_doc.md
Normal file
18
extras/libmemif/examples/examples_doc.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Examples {#libmemif_examples_doc}
|
||||
|
||||
After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
|
||||
|
||||
#### Run in container
|
||||
|
||||
`ligato/libmemif-sample-service` image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
|
||||
|
||||
```
|
||||
# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
|
||||
```
|
||||
Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to `./.libs` folder and execute binary directly.
|
||||
|
||||
Example app | Description
|
||||
------------|------------
|
||||
@ref extras/libmemif/examples/icmp_responder | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
|
||||
@ref extras/libmemif/examples/icmp_responder-epoll (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. @ref libmemif_example_setup_doc contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
|
||||
@ref extras/libmemif/examples/icmp_responder-mt) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.
|
@ -1,5 +1,6 @@
|
||||
Shared Memory Packet Interface (memif) Library
|
||||
Shared Memory Packet Interface (memif) Library {#libmemif_doc}
|
||||
==============================================
|
||||
|
||||
## Introduction
|
||||
|
||||
Shared memory packet interface (memif) provides high performance packet transmit and receive between user application and Vector Packet Processing (VPP) or multiple user applications. Using libmemif, user application can create shared memory interface in master or slave mode and connect to VPP or another application using libmemif. Once the connection is established, user application can receive or transmit packets using libmemif API.
|
||||
@ -63,10 +64,11 @@ commands:
|
||||
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
|
||||
```
|
||||
|
||||
Continue with [Example setup](examples/ExampleSetup.md) which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
|
||||
Continue with @ref libmemif_example_setup which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
|
||||
|
||||
#### Next steps
|
||||
|
||||
- [Build instructions](docs/BuildInstructions.md) Instructions on how to build/install libmemif.
|
||||
- [Examples](examples/README.md) More example apps presenting different features.
|
||||
- [Getting started](docs/GettingStarted.md) Introduction to libmemif API. Explaining library usage in custom app.
|
||||
- @subpage libmemif_build_doc
|
||||
- @subpage libmemif_examples_doc
|
||||
- @subpage libmemif_example_setup_doc
|
||||
- @subpage libmemif_gettingstarted_doc
|
@ -31,6 +31,10 @@ Version: %{_version}
|
||||
Release: %{_release}
|
||||
Requires: vpp-lib = %{_version}-%{_release}, net-tools, pciutils, python
|
||||
BuildRequires: systemd, chrpath
|
||||
BuildRequires: check, check-devel
|
||||
%if 0%{?fedora} >= 25
|
||||
BuildRequires: subunit, subunit-devel
|
||||
%endif
|
||||
%if 0%{?fedora} >= 26
|
||||
BuildRequires: compat-openssl10-devel
|
||||
BuildRequires: python2-devel, python2-virtualenv
|
||||
@ -122,7 +126,7 @@ This package contains the python bindings for the vpp api
|
||||
%prep
|
||||
# Unpack into dir with longer name as work around of debugedit bug in in rpm-build 4.13
|
||||
rm -rf %{name}-%{_version}
|
||||
rm -rf %{_tmpbuild_dir}
|
||||
rm -rf %{_tmp_build_dir}
|
||||
/usr/bin/xz -dc '%{_sourcedir}/%{name}-%{_version}-%{_release}.tar.xz' | /usr/bin/tar -xf -
|
||||
mv %{name}-%{_version} %{_tmp_build_dir}
|
||||
cd '%{_tmp_build_dir}'
|
||||
|
@ -1,4 +1,4 @@
|
||||
ACL plugin constant-time lookup design
|
||||
ACL plugin constant-time lookup design {#acl_hash_lookup}
|
||||
======================================
|
||||
|
||||
The initial implementation of ACL plugin performs a trivial for() cycle,
|
@ -1,4 +1,4 @@
|
||||
Multicore support for ACL plugin
|
||||
Multicore support for ACL plugin {#acl_multicore}
|
||||
================================
|
||||
|
||||
This captures some considerations and design decisions that I have made,
|
||||
@ -20,16 +20,18 @@ at the time of replacing the old ACL being checked, with
|
||||
the new ACL.
|
||||
|
||||
In case an acl_add_replace is being used to replace the rules
|
||||
within the existing entry, a reallocation of am->acls[X].rules
|
||||
within the existing entry, a reallocation of `am->acls[X].rules`
|
||||
vector will happen and potentially a change in count.
|
||||
|
||||
acl_match_5tuple() has the following code:
|
||||
|
||||
```{.c}
|
||||
a = am->acls + acl_index;
|
||||
for (i = 0; i < a->count; i++)
|
||||
{
|
||||
r = a->rules + i;
|
||||
. . .
|
||||
```
|
||||
|
||||
Ideally we should be immune from a->rules changing,
|
||||
but the problem arises if the count changes in flight,
|
@ -188,7 +188,7 @@ fill_free_list (vlib_main_t * vm,
|
||||
/* Always allocate new buffers in reasonably large sized chunks. */
|
||||
n = clib_max (n, fl->min_n_buffers_each_physmem_alloc);
|
||||
|
||||
vec_validate (vm->mbuf_alloc_list, n - 1);
|
||||
vec_validate_aligned (vm->mbuf_alloc_list, n - 1, CLIB_CACHE_LINE_BYTES);
|
||||
|
||||
if (rte_mempool_get_bulk (rmp, vm->mbuf_alloc_list, n) < 0)
|
||||
return 0;
|
||||
|
@ -334,10 +334,6 @@ crypto_op_setup (u8 is_aead, struct rte_mbuf *mb0,
|
||||
sym_cop->m_src = mb0;
|
||||
rte_crypto_op_attach_sym_session (cop, session);
|
||||
|
||||
if (!digest_paddr)
|
||||
digest_paddr =
|
||||
rte_pktmbuf_mtophys_offset (mb0, (uintptr_t) digest - (uintptr_t) mb0);
|
||||
|
||||
#if DPDK_NO_AEAD
|
||||
sym_cop->cipher.data.offset = cipher_off;
|
||||
sym_cop->cipher.data.length = cipher_len;
|
||||
|
@ -236,7 +236,7 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
|
||||
u32 cipher_off, cipher_len;
|
||||
u32 auth_off = 0, auth_len = 0, aad_size = 0;
|
||||
u8 *aad = NULL, *digest = NULL;
|
||||
u64 digest_paddr = 0;
|
||||
u64 digest_paddr;
|
||||
|
||||
u8 *iv = rte_pktmbuf_mtod_offset(mb0, void*, sizeof (esp_header_t));
|
||||
dpdk_cop_priv_t *priv = (dpdk_cop_priv_t *)(sym_cop + 1);
|
||||
@ -249,6 +249,8 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
|
||||
vlib_buffer_get_current (b0) + sizeof(esp_header_t) +
|
||||
iv_size + payload_len;
|
||||
|
||||
digest_paddr = mb0->buf_physaddr + (digest - (u8 *) mb0->buf_addr);
|
||||
|
||||
if (is_aead)
|
||||
{
|
||||
u32 *_iv = (u32 *) iv;
|
||||
|
@ -358,6 +358,12 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
|
||||
u32 cipher_off, cipher_len;
|
||||
u32 auth_off = 0, auth_len = 0, aad_size = 0;
|
||||
u8 *aad = NULL, *digest = NULL;
|
||||
u64 digest_paddr;
|
||||
|
||||
digest =
|
||||
vlib_buffer_get_current (b0) + b0->current_length - trunc_size;
|
||||
|
||||
digest_paddr = mb0->buf_physaddr + (digest - (u8 *) mb0->buf_addr);
|
||||
|
||||
if (is_aead)
|
||||
{
|
||||
@ -380,10 +386,6 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
|
||||
*((u32 *) & aad[8]) = sa0->seq_hi;
|
||||
aad_size = 12;
|
||||
}
|
||||
|
||||
digest =
|
||||
vlib_buffer_get_current (b0) + b0->current_length -
|
||||
trunc_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -393,10 +395,6 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
|
||||
auth_off = ip_hdr_size;
|
||||
auth_len = b0->current_length - ip_hdr_size - trunc_size;
|
||||
|
||||
digest =
|
||||
vlib_buffer_get_current (b0) + b0->current_length -
|
||||
trunc_size;
|
||||
|
||||
if (PREDICT_FALSE (sa0->use_esn))
|
||||
{
|
||||
*((u32 *) digest) = sa0->seq_hi;
|
||||
@ -407,7 +405,7 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
|
||||
crypto_op_setup (is_aead, mb0, cop, sess,
|
||||
cipher_off, cipher_len, (u8 *) icb, iv_size,
|
||||
auth_off, auth_len, aad, aad_size,
|
||||
digest, 0, trunc_size);
|
||||
digest, digest_paddr, trunc_size);
|
||||
|
||||
if (PREDICT_FALSE (is_ipv6))
|
||||
{
|
||||
|
@ -293,18 +293,12 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
|
||||
|
||||
max_nb_qp = cdev_info.max_nb_queue_pairs;
|
||||
|
||||
for (i = 0; i < tm->n_vlib_mains; i++)
|
||||
for (i = skip_master; i < tm->n_vlib_mains; i++)
|
||||
{
|
||||
u8 is_outbound;
|
||||
crypto_worker_main_t *cwm;
|
||||
uword *map;
|
||||
|
||||
if (skip_master)
|
||||
{
|
||||
skip_master = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
cwm = vec_elt_at_index (dcm->workers_main, i);
|
||||
map = cwm->algo_qp_map;
|
||||
|
||||
|
@ -290,6 +290,7 @@ memif_init_regions_and_queues (memif_if_t * mif)
|
||||
return err;
|
||||
|
||||
r->fd = alloc.fd;
|
||||
r->shm = alloc.addr;
|
||||
|
||||
for (i = 0; i < mif->run.num_s2m_rings; i++)
|
||||
{
|
||||
|
@ -523,11 +523,11 @@ snat_in2out_error_t icmp_get_key(ip4_header_t *ip0,
|
||||
* @param e optional parameter
|
||||
*/
|
||||
u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
|
||||
u32 thread_index, vlib_buffer_t *b0,
|
||||
ip4_header_t *ip0, u8 *p_proto,
|
||||
snat_session_key_t *p_value,
|
||||
u8 *p_dont_translate, void *d, void *e)
|
||||
{
|
||||
ip4_header_t *ip0;
|
||||
icmp46_header_t *icmp0;
|
||||
u32 sw_if_index0;
|
||||
u32 rx_fib_index0;
|
||||
@ -537,13 +537,7 @@ u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
clib_bihash_kv_8_8_t kv0, value0;
|
||||
u32 next0 = ~0;
|
||||
int err;
|
||||
u32 iph_offset0 = 0;
|
||||
|
||||
if (PREDICT_FALSE(vnet_buffer(b0)->sw_if_index[VLIB_TX] != ~0))
|
||||
{
|
||||
iph_offset0 = vnet_buffer (b0)->ip.save_rewrite_length;
|
||||
}
|
||||
ip0 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b0) + iph_offset0);
|
||||
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
|
||||
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
|
||||
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
|
||||
@ -622,11 +616,11 @@ out:
|
||||
* @param e optional parameter
|
||||
*/
|
||||
u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
|
||||
u32 thread_index, vlib_buffer_t *b0,
|
||||
ip4_header_t *ip0, u8 *p_proto,
|
||||
snat_session_key_t *p_value,
|
||||
u8 *p_dont_translate, void *d, void *e)
|
||||
{
|
||||
ip4_header_t *ip0;
|
||||
icmp46_header_t *icmp0;
|
||||
u32 sw_if_index0;
|
||||
u32 rx_fib_index0;
|
||||
@ -637,7 +631,6 @@ u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
u32 next0 = ~0;
|
||||
int err;
|
||||
|
||||
ip0 = vlib_buffer_get_current (b0);
|
||||
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
|
||||
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
|
||||
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
|
||||
@ -715,7 +708,7 @@ static inline u32 icmp_in2out (snat_main_t *sm,
|
||||
|
||||
echo0 = (icmp_echo_header_t *)(icmp0+1);
|
||||
|
||||
next0_tmp = sm->icmp_match_in2out_cb(sm, node, thread_index, b0,
|
||||
next0_tmp = sm->icmp_match_in2out_cb(sm, node, thread_index, b0, ip0,
|
||||
&protocol, &sm0, &dont_translate, d, e);
|
||||
if (next0_tmp != ~0)
|
||||
next0 = next0_tmp;
|
||||
@ -2919,11 +2912,11 @@ VLIB_NODE_FUNCTION_MULTIARCH (snat_det_in2out_node, snat_det_in2out_node_fn);
|
||||
* @param e optional parameter
|
||||
*/
|
||||
u32 icmp_match_in2out_det(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
|
||||
u32 thread_index, vlib_buffer_t *b0,
|
||||
ip4_header_t *ip0, u8 *p_proto,
|
||||
snat_session_key_t *p_value,
|
||||
u8 *p_dont_translate, void *d, void *e)
|
||||
{
|
||||
ip4_header_t *ip0;
|
||||
icmp46_header_t *icmp0;
|
||||
u32 sw_if_index0;
|
||||
u32 rx_fib_index0;
|
||||
@ -2942,7 +2935,6 @@ u32 icmp_match_in2out_det(snat_main_t *sm, vlib_node_runtime_t *node,
|
||||
ip4_address_t in_addr;
|
||||
u16 in_port;
|
||||
|
||||
ip0 = vlib_buffer_get_current (b0);
|
||||
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
|
||||
echo0 = (icmp_echo_header_t *)(icmp0+1);
|
||||
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
|
||||
|
@ -462,7 +462,7 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
|
||||
u_key.addr = m->local_addr;
|
||||
u_key.fib_index = m->fib_index;
|
||||
kv.key = u_key.as_u64;
|
||||
if (sm->num_workers)
|
||||
if (sm->num_workers > 1)
|
||||
tsm = vec_elt_at_index (sm->per_thread_data, m->worker_index);
|
||||
else
|
||||
tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user