diff --git a/.gitreview b/.gitreview index 1db08df202d3..3f7e8459f7e7 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=gerrit.fd.io port=29418 project=vpp +defaultbranch=stable/2001 diff --git a/RELEASE.md b/RELEASE.md index 992395f85bfa..4bce4d8ac875 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,7 @@ # Release Notes {#release_notes} * @subpage release_notes_2001 +* @subpage release_notes_19082 * @subpage release_notes_19081 * @subpage release_notes_1908 * @subpage release_notes_19043 @@ -27,7 +28,1428 @@ @page release_notes_2001 Release notes for VPP 20.01 -TBD +More than 1039 commits since the 19.08 release. + +## Features + +- API trace tool + - Add text output (a2ac36c91) +- Binary API Compiler for Python + - Raise ValueError when fieldname is python keyword (ff47fb645) +- Binary API Libraries + - Add API support for marvell PP2 plugin (859b59133) + - Add bapi thread handle to api main structure. (8229580e8) + - Multiple connections per process (39d69112f) + - Multiple socket connections per single process (59cea1a9d) +- Build System + - Add build types helpstring to cmake project (952a7b8b7) + - Add env variable to pass extra cmake args (297365403) + - Add yaml file linting to make checkstyle (6b0dd5502) + - Export vapi generation in vpp-dev (dc20371f8) + - Fix 3rd party CI systems. (86a9441c2) + - Pass 'no-pci' to autgenerated config (be7ef3b5c) +- Crypto ipsecmb Plugin + - Bump to intel-ipsec-mb version 0.53 (d35fefe8b) + - Improve gcm performance using dedicated API. (76a36e83e) +- Infrastructure Library + - Bihash walk cb typedef and continue/stop controls (f50bac1bb) + - Create unformat function for data size parsing (579b16506) + - Implement CLIB\_PAUSE () for aarch64 platforms (18512b002) +- libmemif + - Introduce 'memif\_per\_thread\_' namespace (17f2a7bbf) +- Link Bonding + - Add/del secondary mac address callback (e83aa456b) + - Add /if/lacp/bond-sw-if-index/slave-sw-if-index/partner-state (aa7257863) + - Add weight support for active-backup mode (a1876b84e) + - Fix interface deletion (cc3aac056) +- Miscellaneous + - Add address sanitizer heap instrumentation (9fb6d40eb) + - Add CentOS 8 package support (c025329bb) + - Add gdb helpers for vlib buffers (2b65f9ca0) + - Add lcov scripts, README.md (8d74caa0a) + - Add "maxframe" and "rate" to packet-generator cli. (87d7bac5c) + - Add "show run summary" (ac78f8a90) + - Add vnet classify filter set support (f5667c305) + - Classifier-based packet trace filter (9137e5400) + - Improve pcap drop trace output (9382ad9b3) + - Update gitignore for /test/ext/.d (8161d73d7) +- Physical Memory Allocator + - Always lock pages (801c7016a) +- Plugins + - AVF Device driver + - Improve timeout handling (1a7bb281f) + - Print queue id in packet trace (c33eddebe) + - Buffer Metadata Modification Tracker + - Buffer metadata change tracker plugin (d7b306657) + - builtinurl + - New plugin (43765e2b4) + - DHCP + - Ipv6 prefix delegation improvements (d318a996b) + - Move to plugin (02bfd641b) + - DPDK + - Add devargs support (f2bde7ac5) + - Add function to add/del extra MAC addrs (153727743) + - Add TSO support in dpdk plugin. (de5ed58fd) + - Apply dual loop unrolling in DPDK TX (fe2523d1a) + - Bump DPDK version to 19.08 (b6103105f) + - Enable bnxt PMD (c3731ac89) + - Ipsec tunnel support for ip6-in-ip4 (5025d40a1) + - QAT devices update, add c4xxx and xeon d15xx (4d843b994) + - Group Based Policy (GBP) + - Add extended SFC unit tests (a3c8ca10e) + - Host Stack Applications + - Add ckpair & crypto engine in vpp\_echo (7c40a3837) + - Add option for multiple ips (f98e59b86) + - Add periodic timing (ff6cdcca2) + - Improve for mq-intensive (b2fce36c8) + - Less verbose logging for many sessions (08f26641f) + - Make APP\_OPTIONS\_PREALLOC\_FIFO\_PAIRS configurable (7028a0157) + - http\_static + - Add dynamic GET / POST method hooks (5554c56a6) + - Add "http static cache clear" CLI (e0fd9ed11) + - Add .json content (71a5da0c8) + - Internet Key Exchange (IKEv2) Protocol + - Add support for GCM cipher (de2dd6c35) + - IPv6 Segment Routing Mobile + - (57584d99d) + - Load Balancer + - Add APIs for set interface nat4 and nat6 (33538a150) + - NAT + - Handoff traffic matching for dynamic NAT (22bb417e9) + - Ping + - Move the echo responder into the ping plugin (f6c8f5090) + - QUIC protocol + - Add aggregated quicly stats (deaf97f45) + - Add cli command for stats (922f0b211) + - Add conn-timeout config option (2f566c23f) + - Add more detailed statistics (1802fcc5f) + - Add support for ckpair & crypto engine (dcbbf2833) + - Add support for unidirectional streams (c00f480ba) + - Add Tx, Rx and packet drop counters (ff1f6faaa) + - Create custom event logger (dd4d8ac29) + - Implement crypto contexts (d1b9e7068) + - Make quic fifo size configurable via cli (00078b991) + - Update quicly to v0.0.5 (72c159e64) + - Update quicly to v0.0.6-vpp (3afac8f81) + - Update quicly to v0.0.7-vpp (69885b72a) + - Update quicly to v0.0.8-vpp (ecb9d18c5) + - Update quicly to v0.0.9-vpp (84def7cb7) + - RDMA (ibverb) driver + - Add rdma API (812afe712) + - Add support for input feature arcs (74eba446b) + - Add support for MAC changes (0dcafcc50) + - API: prepare support for direct verb (d8c1ef925) + - Time-based MAC filter + - Add a "top" command to watch device stats (2c41a61d5) + - Add the "mactime.json" builtin URL (ef3c11ca9) + - vmxnet3 device driver + - Per interface gso support (2985e0af6) +- Python binding for the VPP API + - Add a per-call \_timeout option (e2ccdf031) + - Add call stats (fd574087e) + - Add repr to packer types for troubleshooting (14b0b4791) + - Add wrapper to validate crc manifest (c046d709e) + - Enhance MACAddress() equality (6af62565e) + - Introduce read\_blocking (0938547ea) + - Let async calls return context (2f6e0c600) + - Support default for type alias decaying to basetype (418ebb711) +- Sphinx Documents + - Add spellcheck to 'make docs' sphinx docs (340c15c6e) +- Statistics Segment + - Add /if/\/\/state for lacp interface state (0f09a828a) +- SVM Library + - Improve fifo segment verbose cli (f8461bfb4) +- Test Infrastructure + - Add cli\_return\_response to vpp\_papi\_provider (5932ce17e) + - Add test run time. (0c6293230) + - Support setting random seed (45a95dd78) + - Support worker threads (4ecbf105a) + - Test tls case (419d31f81) +- Vector Library + - Add flag to explicitelly mark nodes which can init per-node packet trace (7ca5aaac1) + - Add max-size configuration parameter for pmalloc (842506f3c) + - Add 'wait' cli command (bfd7d294d) + - Enhance the "show cli" debug CLI command (a1f5a956e) +- VNET + - Classify + - Per-interface rx/tx pcap capture filters (d28437cdf) + - Use vector code even when data is not aligned (830493392) + - Vpp packet tracer support (87d24db65) + - Ethernet + - All dmac checks include secondary addrs (42bde459b) + - Dmac filter checks secondary mac addrs (d459bf344) + - FIB + - Adjacency creation notifications for dlegates (77cfc0171) + - Decouple source from priority and behaviour (3bab8f9c5) + - Table Replace (9db6ada77) + - FLOW + - Add 'drop' and 'redirect-to-queue' actions support (e8c9f4f1c) + - Add ethernet flow (4ff8d615c) + - Add GTP support (bf85a98fb) + - GRE + - Multi-point interfaces (5f8f61733) + - GSO + - Add protocol header parser (72e7312af) + - Interface Common + - Callback to manage extra MAC addresses (e0792fdff) + - Dump the interface device type (de312c2d5) + - IPIP + - Tunnel flags controlling copying data to/from payload/encap (9534696b4) + - IPSec + - Add 'detail' option to 'sh ipsec sa' (670027a50) + - Add insecure option for format of SA (01d61e788) + - Bind an SA to a worker (f62a8c013) + - Remove dedicated IPSec tunnels (12989b538) + - Support 4o6 and 6o4 for tunnel protect (b325983a4) + - IPv4 LPM + - Add shallow virtual reassembly functionality (de34c35fc) + - Add tracing for ipv6 frag headers (0eb75d0e9) + - Allow addrs from the same prefix on intf (6c92f5bab) + - Apply dual loop unrolling in ip4\_input (86b1871ba) + - Apply dual loop unrolling in ip4\_rewrite (840f64b4b) + - IPv4 LPM + - Protocol Independent IP Neighbors (cbe25aab3) + - Punt rather than drop unkown IPv6 ICMP packets (1afe95272) + - Reassembly: trace ip headers over worker handoffs (8563cb389) + - Segment Routing (IPv6 and MPLS) + - Add "set sr encaps hop-limit" command (eeb5fb3a5) + - Session Layer + - Add certificate store (79f89537c) + - Add crypto context (de6caf481) + - Add explicit reset api (dfb3b8771) + - Add mq debug cli (cfdb10918) + - Add session enable option in config file (1292d19c7) + - Builtin app rx notifications regardless of state (5c29029ef) + - Ckpair store & crypto engine as mq params (45ec9f49b) + - Improve cli (5bb23ecd0) + - Increasing the Header lengthe size (93e060aee) + - Limit pacer bucket size (7c8f828ba) + - More show cli output (91f90d082) + - Reschedule asap when snd space constrained (dd97a48d9) + - Support registration of custom crypto engines (79ba25d40) + - Support for segments larger than 4GB (ef4f3e7fe) + - Add opaque data to show cli (d9035a409) + - Infra for transports to send buffers (2a7ea2ee9) + - Support pacer idle timeouts (11e9e3510) + - TAP Drivers + - Add check for vhost-net backend (39807d02c) + - Multiqueue support (7c6102b1a) + - TCP + - Add FEATURE.yaml (93e053ebe) + - Add no csum offload config option (f4ce6ba22) + - Add option for always on event logging (a436a4222) + - Allow cc algos to set pacing rate (d206724e7) + - Compute snd time for rate sample (7436b4367) + - Custom checksum calculations for Ipv4/Ipv6 (02833ff32) + - Enable gso in tcp hoststack (1146ff4bc) + - Enable TCP timewait port use (b092b77cf) + - Extend protocol configuration (9094b5c31) + - Force zero window on full rx fifo (182d21983) + - Handle sack reneging (558e3e095) + - Improve lost rxt heuristic (b3dce89a7) + - Improve pacing after idle send periods (c31dc31f8) + - Retry lost retransmits (be237bf02) + - Send rwnd update only if wnd is large enough (017dc4524) + - Set cc\_algo on connection alloc (12f6936cd) + - Track lost rxt segments in byte tracker (46ec6e018) + - Track zero rwnd errors (a495a3ea1) + - Use rate sample rtt in recovery if possible (1dbda64b4) + - Use sacks for timer based recovery (36ebcfffb) + - Validate connections in output (78dae0088) + - Validate the IP address while checking TCP connection (cf4c2102d) + - TLS and TLS engine plugins + - Add C API for TLS openssl to set engine (be4d1aa2c) + - Improve connection formating (0d74dd1f8) + - Picotls engine basic enabling for TLS (f83194c2f) +- VPP Comms Library + - Add api to set lcl ip (ef7cbf6ad) + - Add config option for preferred tls engine (d747c3c36) + - Allow non-blocking connects (57c88938f) +- VPP Object Model + - Get interface type from vpp device type (3f4be92ce) + + +## 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/2001) + +## 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 +-------------------------------------------------------------|------------------ +abf_itf_attach_add_del | definition changed +abf_itf_attach_details | definition changed +abf_policy_add_del | definition changed +abf_policy_details | definition changed +af_packet_create | definition changed +af_packet_create_reply | definition changed +af_packet_delete | definition changed +af_packet_details | definition changed +af_packet_set_l4_cksum_offload | definition changed +api_versions_reply | definition changed +app_add_cert_key_pair | only in image +app_add_cert_key_pair_reply | only in image +app_attach | only in image +app_attach_reply | only in image +app_del_cert_key_pair | only in image +app_del_cert_key_pair_reply | only in image +avf_create_reply | definition changed +avf_delete | definition changed +bd_ip_mac_add_del | definition changed +bd_ip_mac_details | definition changed +bfd_udp_add | definition changed +bfd_udp_auth_activate | definition changed +bfd_udp_auth_deactivate | definition changed +bfd_udp_del | definition changed +bfd_udp_get_echo_source_reply | definition changed +bfd_udp_mod | definition changed +bfd_udp_session_details | definition changed +bfd_udp_session_set_flags | definition changed +bfd_udp_set_echo_source | definition changed +bier_disp_entry_add_del | definition changed +bier_disp_entry_details | definition changed +bier_disp_table_add_del | definition changed +bier_route_add_del | definition changed +bier_table_add_del | definition changed +bond_create | definition changed +bond_create_reply | definition changed +bond_delete | definition changed +bond_detach_slave | definition changed +bond_enslave | definition changed +builtinurl_enable | only in image +builtinurl_enable_reply | only in image +bvi_create | definition changed +cdp_enable_disable | definition changed +classify_add_del_session | definition changed +classify_add_del_table | definition changed +classify_set_interface_ip_table | definition changed +classify_set_interface_l2_tables | definition changed +classify_table_by_interface | definition changed +classify_table_by_interface_reply | definition changed +cli_inband | definition changed +cli_inband_reply | definition changed +collect_detailed_interface_stats | definition changed +connect_sock | definition changed +cop_interface_enable_disable | definition changed +cop_whitelist_enable_disable | definition changed +create_loopback | definition changed +create_loopback_instance | definition changed +create_loopback_instance_reply | definition changed +create_loopback_reply | definition changed +create_subif | definition changed +create_subif_reply | definition changed +create_vhost_user_if | definition changed +create_vhost_user_if_reply | definition changed +create_vlan_subif | definition changed +create_vlan_subif_reply | definition changed +ct6_enable_disable | definition changed +delete_loopback | definition changed +delete_subif | definition changed +delete_vhost_user_if | definition changed +dhcp6_client_enable_disable | definition changed +dhcp6_clients_enable_disable | definition changed +dhcp6_pd_client_enable_disable | definition changed +dhcp6_pd_reply_event | definition changed +dhcp6_pd_send_client_message | definition changed +dhcp6_reply_event | definition changed +dhcp6_send_client_message | definition changed +dhcp_client_config | definition changed +dhcp_client_details | definition changed +dhcp_compl_event | definition changed +dhcp_plugin_control_ping | only in image +dhcp_plugin_control_ping_reply | only in image +dhcp_plugin_get_version | only in image +dhcp_plugin_get_version_reply | only in image +dhcp_proxy_config | definition changed +dhcp_proxy_details | definition changed +dhcp_proxy_dump | definition changed +dhcp_proxy_set_vss | definition changed +dslite_add_del_pool_addr_range | definition changed +dslite_address_details | definition changed +dslite_get_aftr_addr_reply | definition changed +dslite_get_b4_addr_reply | definition changed +dslite_set_aftr_addr | definition changed +dslite_set_b4_addr | definition changed +feature_enable_disable | definition changed +feature_gso_enable_disable | only in image +feature_gso_enable_disable_reply | only in image +flow_classify_details | definition changed +flow_classify_dump | definition changed +flow_classify_set_interface | definition changed +flowprobe_params | definition changed +flowprobe_tx_interface_add_del | definition changed +gbp_bridge_domain_add | definition changed +gbp_bridge_domain_details | definition changed +gbp_contract_add_del | definition changed +gbp_contract_details | definition changed +gbp_endpoint_add | definition changed +gbp_endpoint_details | definition changed +gbp_endpoint_group_add | definition changed +gbp_endpoint_group_details | definition changed +gbp_ext_itf_add_del | definition changed +gbp_ext_itf_details | definition changed +gbp_recirc_add_del | definition changed +gbp_recirc_details | definition changed +gbp_route_domain_add | definition changed +gbp_route_domain_details | definition changed +gbp_subnet_add_del | definition changed +gbp_subnet_details | definition changed +gbp_vxlan_tunnel_add | definition changed +gbp_vxlan_tunnel_add_reply | definition changed +gbp_vxlan_tunnel_details | definition changed +geneve_add_del_tunnel | definition changed +geneve_add_del_tunnel_reply | definition changed +geneve_tunnel_details | definition changed +geneve_tunnel_dump | definition changed +get_first_msg_id | definition changed +gre_tunnel_add_del | definition changed +gre_tunnel_add_del_reply | definition changed +gre_tunnel_details | definition changed +gre_tunnel_dump | definition changed +gtpu_add_del_tunnel | definition changed +gtpu_add_del_tunnel_reply | definition changed +gtpu_tunnel_details | definition changed +gtpu_tunnel_dump | definition changed +http_static_enable | definition changed +hw_interface_set_mtu | definition changed +igmp_clear_interface | definition changed +igmp_details | definition changed +igmp_dump | definition changed +igmp_enable_disable | definition changed +igmp_event | definition changed +igmp_group_prefix_details | definition changed +igmp_group_prefix_set | definition changed +igmp_listen | definition changed +igmp_proxy_device_add_del | definition changed +igmp_proxy_device_add_del_interface | definition changed +ikev2_initiate_sa_init | definition changed +ikev2_profile_add_del | definition changed +ikev2_profile_set_auth | definition changed +ikev2_profile_set_id | definition changed +ikev2_profile_set_ts | definition changed +ikev2_set_esp_transforms | definition changed +ikev2_set_ike_transforms | definition changed +ikev2_set_responder | definition changed +ikev2_set_sa_lifetime | definition changed +input_acl_set_interface | definition changed +interface_name_renumber | definition changed +ioam_cache_ip6_enable_disable | definition changed +ioam_enable | definition changed +ioam_export_ip6_enable_disable | definition changed +ip4_arp_event | only in file +ip6_add_del_address_using_prefix | definition changed +ip6_nd_address_autoconfig | definition changed +ip6_nd_event | only in file +ip6_ra_event | definition changed +ip6nd_proxy_add_del | definition changed +ip6nd_proxy_details | definition changed +ip6nd_send_router_solicitation | definition changed +ip_address_details | definition changed +ip_address_dump | definition changed +ip_container_proxy_add_del | definition changed +ip_container_proxy_details | definition changed +ip_details | definition changed +ip_dump | definition changed +ip_mroute_add_del | definition changed +ip_mroute_details | definition changed +ip_mroute_dump | definition changed +ip_mtable_details | definition changed +ip_neighbor_add_del | definition changed +ip_neighbor_config | only in image +ip_neighbor_config_reply | only in image +ip_neighbor_details | definition changed +ip_neighbor_dump | definition changed +ip_neighbor_event | only in image +ip_probe_neighbor | only in file +ip_probe_neighbor_reply | only in file +ip_punt_police | definition changed +ip_punt_redirect | definition changed +ip_punt_redirect_details | definition changed +ip_punt_redirect_dump | definition changed +ip_reassembly_enable_disable | definition changed +ip_reassembly_get | definition changed +ip_reassembly_get_reply | definition changed +ip_reassembly_set | definition changed +ip_route_add_del | definition changed +ip_route_details | definition changed +ip_route_dump | definition changed +ip_scan_neighbor_enable_disable | only in file +ip_scan_neighbor_enable_disable_reply | only in file +ip_source_and_port_range_check_add_del | definition changed +ip_source_and_port_range_check_interface_add_del | definition changed +ip_source_check_interface_add_del | definition changed +ip_table_add_del | definition changed +ip_table_details | definition changed +ip_table_flush | only in image +ip_table_flush_reply | only in image +ip_table_replace_begin | only in image +ip_table_replace_begin_reply | only in image +ip_table_replace_end | only in image +ip_table_replace_end_reply | only in image +ip_unnumbered_details | definition changed +ip_unnumbered_dump | definition changed +ipfix_classify_table_add_del | definition changed +ipfix_classify_table_details | definition changed +ipfix_exporter_details | definition changed +ipip_6rd_add_tunnel | definition changed +ipip_6rd_add_tunnel_reply | definition changed +ipip_6rd_del_tunnel | definition changed +ipip_add_tunnel | definition changed +ipip_add_tunnel_reply | definition changed +ipip_del_tunnel | definition changed +ipip_tunnel_details | definition changed +ipip_tunnel_dump | definition changed +ipsec_spd_details | definition changed +ipsec_spd_entry_add_del | definition changed +ipsec_tunnel_if_add_del | definition changed +ipsec_tunnel_protect_del | definition changed +ipsec_tunnel_protect_details | definition changed +ipsec_tunnel_protect_dump | definition changed +ipsec_tunnel_protect_update | definition changed +l2_arp_term_event | only in image +l2_emulation | definition changed +l2tpv3_create_tunnel | definition changed +l2tpv3_create_tunnel_reply | definition changed +l2tpv3_interface_enable_disable | definition changed +l2tpv3_set_lookup_key | definition changed +l2tpv3_set_tunnel_cookies | definition changed +l3xc_del | definition changed +l3xc_details | definition changed +l3xc_dump | definition changed +l3xc_update | definition changed +lb_add_del_as | definition changed +lb_add_del_intf_nat4 | only in image +lb_add_del_intf_nat4_reply | only in image +lb_add_del_intf_nat6 | only in image +lb_add_del_intf_nat6_reply | only in image +lb_add_del_vip | definition changed +lb_as_details | definition changed +lb_as_dump | definition changed +lb_conf | definition changed +lb_flush_vip | definition changed +lb_vip_details | definition changed +lb_vip_dump | definition changed +log_details | definition changed +log_dump | definition changed +mactime_add_del_range | definition changed +mactime_details | only in image +mactime_dump | only in image +mactime_dump_reply | only in image +mactime_enable_disable | definition changed +map_add_del_rule | definition changed +map_add_domain | definition changed +map_domain_details | definition changed +map_if_enable_disable | definition changed +map_param_add_del_pre_resolve | definition changed +map_param_get_reply | definition changed +map_param_set_icmp | definition changed +map_param_set_reassembly | only in file +map_param_set_reassembly_reply | only in file +map_param_set_traffic_class | definition changed +map_rule_details | definition changed +mdata_enable_disable | only in image +mdata_enable_disable_reply | only in image +memclnt_create | definition changed +memclnt_delete | definition changed +memif_create | definition changed +memif_create_reply | definition changed +memif_delete | definition changed +memif_details | definition changed +memif_socket_filename_add_del | definition changed +memif_socket_filename_details | definition changed +mfib_signal_details | definition changed +modify_vhost_user_if | definition changed +mpls_ip_bind_unbind | definition changed +mpls_route_add_del | definition changed +mpls_route_details | definition changed +mpls_route_dump | definition changed +mpls_table_add_del | definition changed +mpls_table_details | definition changed +mpls_tunnel_add_del | definition changed +mpls_tunnel_add_del_reply | definition changed +mpls_tunnel_details | definition changed +mpls_tunnel_dump | definition changed +nat44_add_del_address_range | definition changed +nat44_add_del_identity_mapping | 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 | definition changed +nat44_del_session | definition changed +nat44_identity_mapping_details | definition changed +nat44_interface_add_del_feature | definition changed +nat44_interface_add_del_output_feature | definition changed +nat44_interface_addr_details | definition changed +nat44_interface_details | definition changed +nat44_interface_output_feature_details | definition changed +nat44_lb_static_mapping_add_del_local | definition changed +nat44_lb_static_mapping_details | definition changed +nat44_static_mapping_details | definition changed +nat44_user_details | definition changed +nat44_user_session_details | definition changed +nat44_user_session_dump | definition changed +nat64_add_del_interface_addr | definition changed +nat64_add_del_interface | definition changed +nat64_add_del_pool_addr_range | definition changed +nat64_add_del_prefix | definition changed +nat64_add_del_static_bib | definition changed +nat64_bib_details | definition changed +nat64_interface_details | definition changed +nat64_pool_addr_details | definition changed +nat64_prefix_details | definition changed +nat64_st_details | definition changed +nat66_add_del_interface | definition changed +nat66_add_del_static_mapping | definition changed +nat66_interface_details | definition changed +nat66_static_mapping_details | 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_forward_reply | definition changed +nat_det_map_details | definition changed +nat_det_reverse | definition changed +nat_det_reverse_reply | definition changed +nat_det_session_details | definition changed +nat_det_session_dump | definition changed +nat_get_reass | only in file +nat_get_reass_reply | only in file +nat_ha_get_failover_reply | definition changed +nat_ha_get_listener_reply | definition changed +nat_ha_set_failover | definition changed +nat_ha_set_listener | definition changed +nat_reass_details | only in file +nat_reass_dump | only in file +nat_set_reass | only in file +nat_set_reass_reply | only in file +nat_worker_details | definition changed +nhrp_details | only in image +nhrp_dump | only in image +nhrp_entry_add_del | only in image +nhrp_entry_add_del_reply | only in image +nsh_add_del_entry | definition changed +nsh_add_del_map | definition changed +nsh_map_details | definition changed +nsim_cross_connect_enable_disable | definition changed +nsim_output_feature_enable_disable | definition changed +output_acl_set_interface | definition changed +p2p_ethernet_add | definition changed +p2p_ethernet_add_reply | definition changed +p2p_ethernet_del | definition changed +pipe_create | definition changed +pipe_create_reply | definition changed +pipe_delete | definition changed +pipe_details | definition changed +policer_classify_details | definition changed +policer_classify_dump | definition changed +policer_classify_set_interface | definition changed +pot_profile_activate | definition changed +pot_profile_add | definition changed +pot_profile_del | definition changed +pppoe_add_del_session | definition changed +pppoe_add_del_session_reply | definition changed +pppoe_session_details | definition changed +pppoe_session_dump | definition changed +proxy_arp_add_del | definition changed +proxy_arp_details | definition changed +proxy_arp_intfc_enable_disable | definition changed +punt_reason_details | definition changed +punt_reason_dump | definition changed +punt_socket_details | definition changed +punt_socket_register | definition changed +punt_socket_register_reply | definition changed +qos_mark_dump | definition changed +qos_mark_enable_disable | definition changed +qos_record_details | definition changed +qos_record_enable_disable | definition changed +qos_store_details | definition changed +qos_store_enable_disable | definition changed +rdma_create | only in image +rdma_create_reply | only in image +rdma_delete | only in image +rdma_delete_reply | only in image +reset_fib | only in file +reset_fib_reply | only in file +set_arp_neighbor_limit | only in file +set_arp_neighbor_limit_reply | only in file +set_ip_flow_hash | definition changed +set_ipfix_exporter | definition changed +set_punt | definition changed +show_version_reply | definition changed +show_vpe_system_time_reply | definition changed +sockclnt_create | definition changed +sockclnt_create_reply | definition changed +sr_set_encap_hop_limit | only in image +sr_set_encap_hop_limit_reply | only in image +stn_add_del_rule | definition changed +stn_rules_details | definition changed +svs_details | definition changed +svs_enable_disable | definition changed +svs_route_add_del | definition changed +svs_table_add_del | definition changed +sw_if_l2tpv3_tunnel_details | definition changed +sw_interface_add_del_address | definition changed +sw_interface_add_del_mac_address | only in image +sw_interface_add_del_mac_address_reply | only in image +sw_interface_bond_details | definition changed +sw_interface_clear_stats | definition changed +sw_interface_details | definition changed +sw_interface_dump | definition changed +sw_interface_event | definition changed +sw_interface_get_mac_address | definition changed +sw_interface_get_mac_address_reply | definition changed +sw_interface_get_table | definition changed +sw_interface_ip6_enable_disable | definition changed +sw_interface_ip6_set_link_local_address | definition changed +sw_interface_ip6nd_ra_config | definition changed +sw_interface_ip6nd_ra_prefix | definition changed +sw_interface_lacp_details | definition changed +sw_interface_rx_placement_details | definition changed +sw_interface_rx_placement_dump | definition changed +sw_interface_set_bond_weight | only in image +sw_interface_set_bond_weight_reply | only in image +sw_interface_set_flags | definition changed +sw_interface_set_geneve_bypass | definition changed +sw_interface_set_gtpu_bypass | definition changed +sw_interface_set_ip_directed_broadcast | definition changed +sw_interface_set_mac_address | definition changed +sw_interface_set_mpls_enable | definition changed +sw_interface_set_mtu | definition changed +sw_interface_set_rx_mode | definition changed +sw_interface_set_rx_placement | definition changed +sw_interface_set_table | definition changed +sw_interface_set_unnumbered | definition changed +sw_interface_set_vxlan_gbp_bypass | definition changed +sw_interface_slave_details | definition changed +sw_interface_slave_dump | definition changed +sw_interface_tag_add_del | definition changed +sw_interface_tap_v2_details | definition changed +sw_interface_tap_v2_dump | definition changed +sw_interface_vhost_user_details | definition changed +sw_interface_vhost_user_dump | definition changed +sw_interface_virtio_pci_details | definition changed +syslog_get_sender_reply | definition changed +syslog_set_sender | definition changed +tap_create_v2 | definition changed +tap_create_v2_reply | definition changed +tap_delete_v2 | definition changed +tcp_configure_src_addresses | definition changed +tls_openssl_set_engine | only in image +tls_openssl_set_engine_reply | only in image +trace_plugin_msg_ids | definition changed +udp_encap_add | definition changed +udp_encap_details | definition changed +udp_ping_add_del | definition changed +udp_ping_export | definition changed +virtio_pci_create | definition changed +virtio_pci_create_reply | definition changed +virtio_pci_delete | definition changed +vmxnet3_create | definition changed +vmxnet3_create_reply | definition changed +vmxnet3_delete | definition changed +vmxnet3_details | definition changed +vxlan_gbp_tunnel_add_del | definition changed +vxlan_gbp_tunnel_add_del_reply | definition changed +vxlan_gbp_tunnel_details | definition changed +vxlan_gbp_tunnel_dump | definition changed +vxlan_gpe_ioam_enable | definition changed +vxlan_gpe_ioam_export_enable_disable | definition changed +vxlan_gpe_ioam_transit_disable | definition changed +vxlan_gpe_ioam_transit_enable | definition changed +vxlan_gpe_ioam_vni_disable | definition changed +vxlan_gpe_ioam_vni_enable | definition changed +want_bfd_events | definition changed +want_dhcp6_pd_reply_events | definition changed +want_ip4_arp_events | only in file +want_ip4_arp_events_reply | only in file +want_ip6_nd_events | only in file +want_ip6_nd_events_reply | only in file +want_ip6_ra_events | definition changed +want_ip_neighbor_events | only in image +want_ip_neighbor_events_reply | only in image +want_l2_arp_term_events | only in image +want_l2_arp_term_events_reply | only in image +want_l2_macs_events | definition changed + +Found 493 api message signature differences + +### Patches that changed API definitions + +| @c src/vlibmemory/memclnt.api || +| ------- | ------- | +| [8e388390d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8e388390d) | vlib: use explicit types in api | +| [daa4bff16](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=daa4bff16) | api: memclnt api use string type. | +| [7adaa226e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7adaa226e) | api: revert use string type for strings in memclnt.api | +| [2959d42fe](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2959d42fe) | api: use string type for strings in memclnt.api | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/examples/sample-plugin/sample/sample.api || +| ------- | ------- | +| [33a58171e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=33a58171e) | api: autogenerate api trace print/endian | +| [78d91cf9a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=78d91cf9a) | sample-plugin: refactor .api to use explicit types | + +| @c src/vnet/interface.api || +| ------- | ------- | +| [418ebb711](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=418ebb711) | papi: support default for type alias decaying to basetype | +| [9485d99bd](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9485d99bd) | interface: Allow VLAN tag-rewrite on non-sub-interfaces too. | +| [c12eae73f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c12eae73f) | interface: shmemioerror while getting name_filter arg | +| [de312c2d5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=de312c2d5) | interface: dump the interface device type | +| [e0792fdff](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e0792fdff) | interface: callback to manage extra MAC addresses | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [053204ab0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=053204ab0) | api: Cleanup APIs interface.api | +| [0ad4a439d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0ad4a439d) | Fix vpp crash bug while deleting dhcp client | +| [9a29f795a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9a29f795a) | vpp_papi_provider.py: update defautmapping. | +| [b8591ac91](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b8591ac91) | API sw_interface_dump: Dump all if index is zero | +| [4a7240636](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4a7240636) | Make sw_interface_dump more compatible with 2.2.0 | +| [6407ba56a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6407ba56a) | api: Add to interface crud - read by sw_if_index. | + +| @c src/vnet/interface_types.api || +| ------- | ------- | +| [053204ab0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=053204ab0) | api: Cleanup APIs interface.api | + +| @c src/vnet/session/session.api || +| ------- | ------- | +| [c4c4cf506](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c4c4cf506) | session: move add/del segment msg to mq | +| [79f89537c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=79f89537c) | session: Add certificate store | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [458089bba](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=458089bba) | session: move ctrl messages from bapi to mq | +| [8ac1d6d05](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8ac1d6d05) | session: Use parent_handle instead of transport_opts | +| [ba65ca496](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ba65ca496) | Add transport_opts to connect_sock bapi | + +| @c src/vnet/classify/classify.api || +| ------- | ------- | +| [692bfc85f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=692bfc85f) | classify: API cleanup | + +| @c src/vnet/l2tp/l2tp.api || +| ------- | ------- | +| [3ae526271](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3ae526271) | l2: l2tp API cleanup | + +| @c src/vnet/gre/gre.api || +| ------- | ------- | +| [5f8f61733](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5f8f61733) | gre: Multi-point interfaces | +| [814f15948](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=814f15948) | gre: update gre.api with explicit types | +| [d0aed2eb3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d0aed2eb3) | GRE: set gre_tunnel_type init value to zero in API | +| [5a8844bdb](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5a8844bdb) | GRE: API update | + +| @c src/vnet/fib/fib_types.api || +| ------- | ------- | +| [1dbcf30b7](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1dbcf30b7) | fib: Support the POP of a Psuedo Wire Control Word | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | + +| @c src/vnet/lisp-cp/one.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/vnet/lisp-cp/lisp.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/vnet/feature/feature.api || +| ------- | ------- | +| [bf6c5c158](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bf6c5c158) | feature: API cleanup | + +| @c src/vnet/nhrp/nhrp.api || +| ------- | ------- | +| [5f8f61733](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5f8f61733) | gre: Multi-point interfaces | + +| @c src/vnet/qos/qos.api || +| ------- | ------- | +| [4b76c58be](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4b76c58be) | qos: api clenup | +| [83832e7ce](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=83832e7ce) | qos: Store function | +| [5281a9029](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5281a9029) | qos: QoS dump APIs | + +| @c src/vnet/ipsec/ipsec.api || +| ------- | ------- | +| [dbf68c9aa](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=dbf68c9aa) | ipsec: Changes to make ipsec encoder/decoders reusable by the plugins | +| [12989b538](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=12989b538) | ipsec: remove dedicated IPSec tunnels | +| [c87b66c86](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c87b66c86) | ipsec: ipsec-tun protect | +| [f2922422d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f2922422d) | ipsec: remove the set_key API | +| [80f6fd53f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=80f6fd53f) | IPSEC: Pass the algorithm salt (used in GCM) over the API | + +| @c src/vnet/ipsec/ipsec_types.api || +| ------- | ------- | +| [dbf68c9aa](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=dbf68c9aa) | ipsec: Changes to make ipsec encoder/decoders reusable by the plugins | + +| @c src/vnet/lisp-gpe/lisp_gpe.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/vnet/pci/pci_types.api || +| ------- | ------- | +| [2c504f89c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2c504f89c) | devices: virtio API cleanup | + +| @c src/vnet/bonding/bond.api || +| ------- | ------- | +| [3d1ef873d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3d1ef873d) | bonding: API cleanup | +| [a1876b84e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a1876b84e) | bonding: add weight support for active-backup mode | +| [751e3f382](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=751e3f382) | bonding: add support for numa-only in lacp mode | + +| @c src/vnet/tcp/tcp.api || +| ------- | ------- | +| [956819afa](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=956819afa) | tcp: api clenup | + +| @c src/vnet/cop/cop.api || +| ------- | ------- | +| [aa4438a31](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=aa4438a31) | cop: API cleanup | + +| @c src/vnet/ip-neighbor/ip_neighbor.api || +| ------- | ------- | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | + +| @c src/vnet/ethernet/p2p_ethernet.api || +| ------- | ------- | +| [8edca1361](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=8edca1361) | p2p ethernet: update p2p_ethernet.api with explicit types. | + +| @c src/vnet/ethernet/ethernet_types.api || +| ------- | ------- | +| [33a58171e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=33a58171e) | api: autogenerate api trace print/endian | + +| @c src/vnet/vxlan-gbp/vxlan_gbp.api || +| ------- | ------- | +| [fb27096ee](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=fb27096ee) | vxlan-gbp: api cleanup | + +| @c src/vnet/arp/arp.api || +| ------- | ------- | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | + +| @c src/vnet/ipip/ipip.api || +| ------- | ------- | +| [9534696b4](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9534696b4) | ipip: Tunnel flags controlling copying data to/from payload/encap | +| [288e09362](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=288e09362) | ipip: refactor ipip.api with explicit types | +| [cbd0824d6](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbd0824d6) | IPIP tunnel: use address types on API | + +| @c src/vnet/ipip/ipip_types.api || +| ------- | ------- | +| [9534696b4](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9534696b4) | ipip: Tunnel flags controlling copying data to/from payload/encap | + +| @c src/vnet/bfd/bfd.api || +| ------- | ------- | +| [4682feb1f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4682feb1f) | bfd: API cleanup | + +| @c src/vnet/l2/l2.api || +| ------- | ------- | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [bc764c8bc](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bc764c8bc) | l2: BD ARP termination entry API update | +| [54bc5e40c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=54bc5e40c) | Update API description | +| [5e6f7348c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5e6f7348c) | l2: Add support for arp unicast forwarding | + +| @c src/vnet/ip6-nd/ip6_nd.api || +| ------- | ------- | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | + +| @c src/vnet/ip6-nd/rd_cp.api || +| ------- | ------- | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | + +| @c src/vnet/udp/udp.api || +| ------- | ------- | +| [10dc2eabd](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=10dc2eabd) | udp: fix copyright typo | + +| @c src/vnet/mpls/mpls.api || +| ------- | ------- | +| [3eb8f207b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3eb8f207b) | mpls: api cleanup | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | + +| @c src/vnet/mfib/mfib_types.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | + +| @c src/vnet/ip/ip_types.api || +| ------- | ------- | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [33a58171e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=33a58171e) | api: autogenerate api trace print/endian | +| [515eed425](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=515eed425) | api: add prefix matcher typedef | +| [038e1dfbd](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=038e1dfbd) | dhcp ip: DSCP settings for transmitted DHCP packets | +| [53c501512](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=53c501512) | api: add DSCP definitions to ip_types.api | +| [ab05508e1](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ab05508e1) | api: refactor format_vl_api_prefix_t return keys | +| [b538dd868](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b538dd868) | Punt: specify packets by IP protocol Type | +| [50f0ac0f0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=50f0ac0f0) | Punt: socket register for exception dispatched/punted packets based on reason | + +| @c src/vnet/ip/punt.api || +| ------- | ------- | +| [f158944cc](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f158944cc) | ip: trivial typos in docs | +| [f72ad93d6](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f72ad93d6) | ip: punt API cleanup | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [719beb709](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=719beb709) | ip ipsec: Remove IPSec SPI-0 punt reason | +| [b538dd868](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b538dd868) | Punt: specify packets by IP protocol Type | +| [50f0ac0f0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=50f0ac0f0) | Punt: socket register for exception dispatched/punted packets based on reason | + +| @c src/vnet/ip/ip.api || +| ------- | ------- | +| [58989a37d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=58989a37d) | ip: API cleanup | +| [cbe25aab3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cbe25aab3) | ip: Protocol Independent IP Neighbors | +| [668605fc8](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=668605fc8) | ip: use explicit types in api | +| [9db6ada77](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9db6ada77) | fib: Table Replace | +| [de34c35fc](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=de34c35fc) | ip: add shallow virtual reassembly functionality | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | +| [3a343d42d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3a343d42d) | reassembly: prevent long chain attack | + +| @c src/vnet/pg/pg.api || +| ------- | ------- | +| [22e9cfd76](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=22e9cfd76) | pg: add GSO support | + +| @c src/vnet/bier/bier.api || +| ------- | ------- | +| [f1f5a8a1a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f1f5a8a1a) | bier: API cleanup | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | +| [e6eefb6e3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e6eefb6e3) | Trivial Typo's in bier comments/docs. | + +| @c src/vnet/ipfix-export/ipfix_export.api || +| ------- | ------- | +| [2f71a8889](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2f71a8889) | ip: ipfix-export API update | +| [21b83e96d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=21b83e96d) | api: implement ipfix_flush | + +| @c src/vnet/gso/gso.api || +| ------- | ------- | +| [29467b534](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=29467b534) | gso: Add gso feature arc | + +| @c src/vnet/devices/af_packet/af_packet.api || +| ------- | ------- | +| [97c998c28](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=97c998c28) | docs: devices-- add FEATURES.yaml | +| [3b2db9002](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3b2db9002) | devices: af_packet API cleanup | + +| @c src/vnet/devices/virtio/vhost_user.api || +| ------- | ------- | +| [5d4c99f27](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5d4c99f27) | devices: vhost API cleanup | +| [4208a4ce8](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4208a4ce8) | devices interface tests: vhosst GSO support | + +| @c src/vnet/devices/virtio/virtio_types.api || +| ------- | ------- | +| [5d4c99f27](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5d4c99f27) | devices: vhost API cleanup | + +| @c src/vnet/devices/virtio/virtio.api || +| ------- | ------- | +| [6d4af8918](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6d4af8918) | virtio: split gso and checksum offload functionality | +| [2c504f89c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2c504f89c) | devices: virtio API cleanup | +| [97c998c28](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=97c998c28) | docs: devices-- add FEATURES.yaml | +| [bbd6b746e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bbd6b746e) | virtio: Add gso support for native virtio driver | +| [43b512cac](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=43b512cac) | virtio: remove configurable queue size support | + +| @c src/vnet/devices/pipe/pipe.api || +| ------- | ------- | +| [97c998c28](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=97c998c28) | docs: devices-- add FEATURES.yaml | +| [df40cb5b5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=df40cb5b5) | devices: pipe API cleanup | + +| @c src/vnet/devices/tap/tapv2.api || +| ------- | ------- | +| [ba0061feb](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ba0061feb) | tap: split gso and checksum offload functionality | +| [5de4fb707](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5de4fb707) | devices: tap API cleanup | +| [44d06916b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=44d06916b) | tap: Move client registration check to top | +| [97c998c28](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=97c998c28) | docs: devices-- add FEATURES.yaml | +| [97d54ed43](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=97d54ed43) | tap: add support to configure tap interface host MTU size | + +| @c src/vnet/srv6/sr.api || +| ------- | ------- | +| [eeb5fb3a5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=eeb5fb3a5) | sr: add "set sr encaps hop-limit" command | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/vnet/geneve/geneve.api || +| ------- | ------- | +| [2d3282e17](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2d3282e17) | geneve: API cleanup | + +| @c src/plugins/marvell/pp2/pp2.api || +| ------- | ------- | +| [4a65b910a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4a65b910a) | marvell: use explicit types in api | +| [859b59133](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=859b59133) | api: Add API support for marvell PP2 plugin | + +| @c src/plugins/svs/svs.api || +| ------- | ------- | +| [5e913f374](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=5e913f374) | svs: use explicit types in api | + +| @c src/plugins/acl/acl_types.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [bb2e5221a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bb2e5221a) | api acl: breakout acl_types.api for reuse by others | + +| @c src/plugins/acl/acl.api || +| ------- | ------- | +| [b5076cbe1](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b5076cbe1) | acl: add missing square brackets to vat_help option in acl api | +| [709dad304](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=709dad304) | acl: remove api boilerplate | +| [bb2e5221a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bb2e5221a) | api acl: breakout acl_types.api for reuse by others | +| [f995c7122](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f995c7122) | acl: implement counters | + +| @c src/plugins/memif/memif.api || +| ------- | ------- | +| [3ae9f5a90](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3ae9f5a90) | memif: remove api boilerplate | +| [546f955b3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=546f955b3) | memif: API cleanup | + +| @c src/plugins/cdp/cdp.api || +| ------- | ------- | +| [07e557a73](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=07e557a73) | cdp: use explicit types in api | + +| @c src/plugins/dhcp/dhcp6_ia_na_client_cp.api || +| ------- | ------- | +| [02bfd641b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=02bfd641b) | dhcp: Move to plugin | + +| @c src/plugins/dhcp/dhcp6_pd_client_cp.api || +| ------- | ------- | +| [d5262831a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d5262831a) | dhcp: dhcp6_pd_client_cp API cleanup | +| [02bfd641b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=02bfd641b) | dhcp: Move to plugin | + +| @c src/plugins/dhcp/dhcp.api || +| ------- | ------- | +| [6bcc6a455](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6bcc6a455) | dhcp: fix crash on unicast renewal send | +| [02bfd641b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=02bfd641b) | dhcp: Move to plugin | + +| @c src/plugins/avf/avf.api || +| ------- | ------- | +| [a0bf06d74](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a0bf06d74) | avf: explicit types in api | +| [74af6f081](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=74af6f081) | avf: remote api boilerplate | + +| @c src/plugins/dpdk/api/dpdk.api || +| ------- | ------- | +| [6d75c20a6](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6d75c20a6) | dpdk: use explicit types in api | +| [025166dc7](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=025166dc7) | dpdk: remove api boilerplate | + +| @c src/plugins/builtinurl/builtinurl.api || +| ------- | ------- | +| [43765e2b4](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=43765e2b4) | builtinurl: initial working attempt | + +| @c src/plugins/mactime/mactime.api || +| ------- | ------- | +| [7b22df06f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7b22df06f) | mactime: update api to use explicit types | +| [2c41a61d5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2c41a61d5) | mactime: add a "top" command to watch device stats | +| [7071952df](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7071952df) | mactime: remove api boilerplate | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [7681b1c46](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7681b1c46) | mactime: add per-mac allow-with-quota feature | +| [0c6ac791d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0c6ac791d) | mactime: upstream new features | + +| @c src/plugins/ikev2/ikev2.api || +| ------- | ------- | +| [6aaee8c7c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=6aaee8c7c) | ikev2: use explicit api types | +| [fc7b77db7](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=fc7b77db7) | ikev2: remove api boilerplate | + +| @c src/plugins/http_static/http_static.api || +| ------- | ------- | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [68b24e2c9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=68b24e2c9) | plugins: http_static. Migrate to use api string type. | +| [22bc2c46e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=22bc2c46e) | Static http server | + +| @c src/plugins/gbp/gbp.api || +| ------- | ------- | +| [38277e407](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=38277e407) | gbp: use explicit types in api | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [3918bdbcb](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3918bdbcb) | gbp: update gbp-ext-itf API | +| [3c0d84c98](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3c0d84c98) | gbp: add anonymous l3-out subnets | +| [cfc7a107e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=cfc7a107e) | gbp: add anonymous l3-out external interfaces | +| [160c923f9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=160c923f9) | gbp: VRF scoped contracts | + +| @c src/plugins/l2e/l2e.api || +| ------- | ------- | +| [b2e463a10](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b2e463a10) | l2e: use explicit api types | + +| @c src/plugins/gtpu/gtpu.api || +| ------- | ------- | +| [55636cb62](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=55636cb62) | gtpu: use explicit types in api | +| [49228efce](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=49228efce) | gtpu: remove api boilerplate | + +| @c src/plugins/igmp/igmp.api || +| ------- | ------- | +| [4a7fc4cf1](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4a7fc4cf1) | igmp: use explicit types in api | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [4ff09ae34](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4ff09ae34) | API: Python and Unix domain socket improvement | + +| @c src/plugins/ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/ioam/udp-ping/udp_ping.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/ioam/export/ioam_export.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/ioam/ip6/ioam_cache.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/ioam/lib-pot/pot.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api || +| ------- | ------- | +| [0fa66d618](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=0fa66d618) | ioam: use explicit api types | + +| @c src/plugins/stn/stn.api || +| ------- | ------- | +| [7929f9f5c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7929f9f5c) | stn: use explicit types in api | + +| @c src/plugins/map/map.api || +| ------- | ------- | +| [be31c2a25](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=be31c2a25) | map: use explicit types in api | +| [7b2e9fb1a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7b2e9fb1a) | map: use ip6-full-reassembly instead of own code | +| [640edcd90](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=640edcd90) | map: use SVR for MAP-T | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [ff47fb645](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ff47fb645) | vppapigen map: raise ValueError when fieldname is python keyword | +| [4d376f67a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=4d376f67a) | map: Use vl_api_string macros. | + +| @c src/plugins/oddbuf/oddbuf.api || +| ------- | ------- | +| [7ff64fb97](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7ff64fb97) | oddbuf: remove api boilerplate | +| [a287a30dd](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a287a30dd) | misc: fix coverity warning in the oddbuf plugin | +| [c4abafd83](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c4abafd83) | ip: fix udp/tcp checksum corner cases | + +| @c src/plugins/l3xc/l3xc.api || +| ------- | ------- | +| [60f5108a9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=60f5108a9) | l3xc: use explicit types in api | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [59fa121f8](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=59fa121f8) | L3 cross connect | + +| @c src/plugins/pppoe/pppoe.api || +| ------- | ------- | +| [04338e85a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=04338e85a) | pppoe: use explicit types in api | +| [25fe57821](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=25fe57821) | pppoe: remove api boilerplate | + +| @c src/plugins/mdata/mdata.api || +| ------- | ------- | +| [d7b306657](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d7b306657) | mdata: buffer metadata change tracker plugin | + +| @c src/plugins/lb/lb.api || +| ------- | ------- | +| [ae0724034](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ae0724034) | lb: remove api boilerplate | +| [33538a150](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=33538a150) | lb: add APIs for set interface nat4 and nat6 | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [3efcd0d7c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3efcd0d7c) | lb: vip and as dump/detail api's | +| [a0cb32cb9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a0cb32cb9) | lb: update api.c to use scaffolding from latest skel | + +| @c src/plugins/lb/lb_types.api || +| ------- | ------- | +| [75761b933](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=75761b933) | api: split vl_api_prefix into two | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [3efcd0d7c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3efcd0d7c) | lb: vip and as dump/detail api's | + +| @c src/plugins/nsim/nsim.api || +| ------- | ------- | +| [e06e7c672](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e06e7c672) | nsim: use explicit api types | +| [2e7a43ca4](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2e7a43ca4) | nsim: remove api boilerplate | +| [7c91007e1](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=7c91007e1) | Make the loss / delay sim available as an output feature | + +| @c src/plugins/vmxnet3/vmxnet3.api || +| ------- | ------- | +| [277f03f06](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=277f03f06) | vmxnet3: use explicit types in api | +| [10bbfce02](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=10bbfce02) | vmxnet3: remove api boilerplate | +| [2985e0af6](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2985e0af6) | vmxnet3: per interface gso support | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | + +| @c src/plugins/tlsopenssl/tls_openssl.api || +| ------- | ------- | +| [1e582206a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=1e582206a) | tls: remove api boilerplate | +| [dd0cc9ec3](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=dd0cc9ec3) | tls: some rework based on TLS openssl C API | +| [be4d1aa2c](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=be4d1aa2c) | tls: Add C API for TLS openssl to set engine | + +| @c src/plugins/abf/abf.api || +| ------- | ------- | +| [bdde58534](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bdde58534) | abf: use explicit types in api | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [097fa66b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=097fa66b9) | fib: fib api updates | + +| @c src/plugins/nat/nat.api || +| ------- | ------- | +| [f126e746f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=f126e746f) | nat: use SVR | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [e6e09a4ac](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e6e09a4ac) | nat: elog rewrite for multi-worker support | +| [c1f93067e](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c1f93067e) | Add default value for API Nat flags | +| [dd1e3e780](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=dd1e3e780) | NAT: VPP-1531 api cleanup & update | +| [89fec713f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=89fec713f) | Revert "NAT: VPP-1531 api cleanup & update" | +| [bed1421b9](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=bed1421b9) | NAT: VPP-1531 api cleanup & update | + +| @c src/plugins/rdma/rdma.api || +| ------- | ------- | +| [d8c1ef925](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d8c1ef925) | rdma: api: prepare support for direct verb | +| [b644eb54f](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b644eb54f) | rdma: add explicit types in api | +| [812afe712](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=812afe712) | rdma: add rdma API | + +| @c src/plugins/sctp/sctp.api || +| ------- | ------- | +| [3ffe6cadf](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3ffe6cadf) | sctp: move to plugins, disabled by default | + +| @c src/plugins/ct6/ct6.api || +| ------- | ------- | +| [d4efce2e0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d4efce2e0) | ct6: use explicit type in api | +| [ee98904e0](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ee98904e0) | ct6: remove api boilerplate | + +| @c src/plugins/nsh/nsh.api || +| ------- | ------- | +| [d3f0a4869](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=d3f0a4869) | nsh: use explicit api types | + +| @c src/plugins/flowprobe/flowprobe.api || +| ------- | ------- | +| [3013e6988](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3013e6988) | flowprobe: use explicit types in api | +| [2a1ca787b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=2a1ca787b) | api: split api generated files | + +| @c src/plugins/lacp/lacp.api || +| ------- | ------- | +| [ebef4a9e5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=ebef4a9e5) | lacp: use explit api types | + +| @c src/plugins/dns/dns.api || +| ------- | ------- | +| [b922f16ba](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=b922f16ba) | dns: remove api boilerplate | +| [34af0ccf5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=34af0ccf5) | dns: make the dns name resolver a plugin | + +| @c src/vpp/api/vpe.api || +| ------- | ------- | +| [e5ff5a36d](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e5ff5a36d) | api: enforce vla is last and fixed string type | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [a47a5f20a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a47a5f20a) | api papi: add alias for timestamp(datetime)/timedelta | +| [888640a39](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=888640a39) | map gbp papi: match endianess of f64 | +| [03f1af23b](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=03f1af23b) | api: Implement log_dump/log_details | +| [c87b66c86](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=c87b66c86) | ipsec: ipsec-tun protect | +| [9ac113815](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=9ac113815) | API: Add support for limits to language. | + +| @c src/vpp/api/vpe_types.api || +| ------- | ------- | +| [e71748291](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e71748291) | vppapigen: remove support for legacy typedefs | +| [a47a5f20a](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=a47a5f20a) | api papi: add alias for timestamp(datetime)/timedelta | +| [3cf9e67f5](https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=3cf9e67f5) | api: add vl_api_version_t type | + +@page release_notes_19082 Release notes for VPP 19.08.2 + +The 19.08.2 is an LTS release. It contains numerous fixes, +as well as new features and API additions. + +## Features + +- API trace tool + - Add text output (c395ff143) +- Binary API Libraries + - Add API support for PP2 plugin to stable/1908 (1c3c9f039) +- Build System + - Pass 'no-pci' to autgenerated config (c0552134e) + - Add env variable to pass extra cmake args (116e05f57) +- Infrastructure Library + - Implement CLIB\_PAUSE () for aarch64 platforms (a3c45242b) + - Create unformat function for data size parsing (cb19100c1) +- Link Bonding + - Fix interface deletion (1517d5e72) + - Add GSO support (a06f68556) +- Physical Memory Allocator + - Always lock pages (5b2eea6e0) +- Plugins + - AVF Device driver + - Print queue id in packet trace (9e028d047) + - DPDK + - Ipsec tunnel support for ip6-in-ip4 (2dde5a478) + - QAT devices update, add c4xxx and xeon d15xx (f5d6c80ac) + - Add TSO support in DPDK plugin. (5564db853) + - Group Based Policy (GBP) + - Add extended SFC unit tests (30f7e4198) + - Host Stack Applications + - Make APP\_OPTIONS\_PREALLOC\_FIFO\_PAIRS configurable (47c6f36be) + - Internet Key Exchange (IKEv2) Protocol + - Add support for GCM cipher (2fa9f679c) + - QUIC protocol + - Add cli command for stats (88af6c3f4) + - Add Tx, Rx and packet drop counters (3a61a40dd) + - Create custom event logger (2f9ec5001) + - Make quic fifo size configurable via cli (7fc3d97b8) + - RDMA (ibverb) driver + - Add support for input feature arcs (cbae1e1c5) + - Add support for MAC changes (ffdfe308b) + - Http\_static + - Add dynamic GET / POST method hooks (faf5195e3) +- Python binding for the VPP API + - Let async calls return context (e6b29a9df) + - Introduce read\_blocking (1c45b85df) +- SVM Library + - Improve fifo segment verbose cli (d2bff0786) +- Statistics Segment + - Add /if/\/\/state for lacp interface state (d5e8ed7be) +- Test Infrastructure + - Support worker threads (51699e62c) + - Support setting random seed (fc000f0e1) + - Add cli\_return\_response to vpp\_papi\_provider (64d744350) + - Test tls case (87e1bcdd7) +- VNET + - Classifier + - Use vector code even when data is not aligned (bebbd7f62) + - VPP packet tracer support (7c5a3536c) + - IPSec + - Add 'detail' option to 'sh ipsec sa' (56417fa94) + - Add insecure option for format of SA (591aa64e8) + - Support 4o6 and 6o4 for tunnel protect (2e6d73934) + - IPv4 and IPv6 LPM + - Allow addrs from the same prefix on intf (da900b25c) + - Punt rather than drop unkown IPv6 ICMP packets (fd2f6f89e) + - Session Layer + - Add explicit reset api (a267cba29) + - Improve cli (2ff21af39) + - Add session enable option in config file (b1ef5567b) + - Limit pacer bucket size (079895d95) + - Builtin app rx notifications regardless of state (8e4afc86d) + - Infra for transports to send buffers (57997c874) + - Reschedule asap when snd space constrained (89ab1762d) + - TCP + - Allow cc algos to set pacing rate (82df1eb90) + - Set cc\_algo on connection alloc (7fe501a4b) + - Add option for always on event logging (e73bd8503) + - Track zero rwnd errors (a2c063712) + - Validate connections in output (ea584d137) + - Force zero window on full rx fifo (fbe948c81) + - Send rwnd update only if wnd is large enough (0ad8477ba) + - Enable gso in tcp hoststack (6f3621d77) + - Handle SACK reneging (9dba3dbf0) + - Use rate sample RTT in recovery if possible (6702641f5) + - Compute snd time for rate sample (69460ae11) + - Use sacks for timer based recovery (d4aa3d9f8) + - Custom checksum calculations for Ipv4/Ipv6 (3642782a2) + - Retry lost retransmits (7b135c639) + - Improve pacing after idle send periods (abdc7dfb5) + - Track lost rxt segments in byte tracker (6de46b40d) + - Validate the IP address while checking TCP connection (6c1ce53b4) + - Improve lost rxt heuristic (04b4204d9) +- VPP Comms Library + - Allow non-blocking connects (4767cf24f) + - Add api to set lcl ip (2c55610e2) +- Vector Library + - Add flag to explicitelly mark nodes which can init per-node packet trace (29dc11bde) + - Enhance the "show cli" debug CLI command (b5a0108ac) +- Libmemif + - Introduce 'memif\_per\_thread\_' namespace (2736fc7fc) + +## 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 +-------------------------------------------------------------|------------------ +app_attach | only in image +app_attach_reply | only in image + +Found 2 api message signature differences + +## Fixed issues + +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/1908) @page release_notes_19081 Release notes for VPP 19.08.1 diff --git a/build-root/Makefile b/build-root/Makefile index d810abb86262..4a675d6019b9 100644 --- a/build-root/Makefile +++ b/build-root/Makefile @@ -653,12 +653,10 @@ configure_check_timestamp = \ # NB: GNU Make 4.2 will let us use '$(file next; u64 bits = AVF_TXD_CMD_EOP | AVF_TXD_CMD_RSV; @@ -41,6 +41,8 @@ avf_tx_enqueue (vlib_main_t * vm, avf_txq_t * txq, u32 * buffers, u16 mask = txq->size - 1; vlib_buffer_t *b[4]; avf_tx_desc_t *d = txq->descs + next; + u16 n_desc_needed; + vlib_buffer_t *b0; /* avoid ring wrap */ n_desc_left = txq->size - clib_max (txq->next, txq->n_enqueued + 8); @@ -48,6 +50,7 @@ avf_tx_enqueue (vlib_main_t * vm, avf_txq_t * txq, u32 * buffers, if (n_desc_left == 0) return 0; + /* Fast path, no ring wrap */ while (n_packets_left && n_desc_left) { u32 or_flags; @@ -103,6 +106,57 @@ avf_tx_enqueue (vlib_main_t * vm, avf_txq_t * txq, u32 * buffers, txq->bufs[next] = buffers[0]; b[0] = vlib_get_buffer (vm, buffers[0]); + /* Deal with chain buffer if present */ + if (b[0]->flags & VLIB_BUFFER_NEXT_PRESENT) + { + n_desc_needed = 1; + b0 = b[0]; + + /* Wish there were a buffer count for chain buffer */ + while (b0->flags & VLIB_BUFFER_NEXT_PRESENT) + { + b0 = vlib_get_buffer (vm, b0->next_buffer); + n_desc_needed++; + } + + /* spec says data descriptor is limited to 8 segments */ + if (PREDICT_FALSE (n_desc_needed > 8)) + { + vlib_buffer_free_one (vm, buffers[0]); + vlib_error_count (vm, node->node_index, + AVF_TX_ERROR_SEGMENT_SIZE_EXCEEDED, 1); + n_packets_left -= 1; + buffers += 1; + continue; + } + + if (PREDICT_FALSE (n_desc_left < n_desc_needed)) + /* + * Slow path may be able to to deal with this since it can handle + * ring wrap + */ + break; + + while (b[0]->flags & VLIB_BUFFER_NEXT_PRESENT) + { + if (use_va_dma) + d[0].qword[0] = vlib_buffer_get_current_va (b[0]); + else + d[0].qword[0] = vlib_buffer_get_current_pa (vm, b[0]); + + d[0].qword[1] = (((u64) b[0]->current_length) << 34) | + AVF_TXD_CMD_RSV; + + next += 1; + n_desc += 1; + n_desc_left -= 1; + d += 1; + + txq->bufs[next] = b[0]->next_buffer; + b[0] = vlib_get_buffer (vm, b[0]->next_buffer); + } + } + if (use_va_dma) d[0].qword[0] = vlib_buffer_get_current_va (b[0]); else @@ -118,6 +172,84 @@ avf_tx_enqueue (vlib_main_t * vm, avf_txq_t * txq, u32 * buffers, d += 1; } + /* Slow path to support ring wrap */ + if (PREDICT_FALSE (n_packets_left)) + { + txq->n_enqueued += n_desc; + + n_desc = 0; + d = txq->descs + (next & mask); + + /* +8 to be consistent with fast path */ + n_desc_left = txq->size - (txq->n_enqueued + 8); + + while (n_packets_left && n_desc_left) + { + txq->bufs[next & mask] = buffers[0]; + b[0] = vlib_get_buffer (vm, buffers[0]); + + /* Deal with chain buffer if present */ + if (b[0]->flags & VLIB_BUFFER_NEXT_PRESENT) + { + n_desc_needed = 1; + b0 = b[0]; + + while (b0->flags & VLIB_BUFFER_NEXT_PRESENT) + { + b0 = vlib_get_buffer (vm, b0->next_buffer); + n_desc_needed++; + } + + /* Spec says data descriptor is limited to 8 segments */ + if (PREDICT_FALSE (n_desc_needed > 8)) + { + vlib_buffer_free_one (vm, buffers[0]); + vlib_error_count (vm, node->node_index, + AVF_TX_ERROR_SEGMENT_SIZE_EXCEEDED, 1); + n_packets_left -= 1; + buffers += 1; + continue; + } + + if (PREDICT_FALSE (n_desc_left < n_desc_needed)) + break; + + while (b[0]->flags & VLIB_BUFFER_NEXT_PRESENT) + { + if (use_va_dma) + d[0].qword[0] = vlib_buffer_get_current_va (b[0]); + else + d[0].qword[0] = vlib_buffer_get_current_pa (vm, b[0]); + + d[0].qword[1] = (((u64) b[0]->current_length) << 34) | + AVF_TXD_CMD_RSV; + + next += 1; + n_desc += 1; + n_desc_left -= 1; + d = txq->descs + (next & mask); + + txq->bufs[next & mask] = b[0]->next_buffer; + b[0] = vlib_get_buffer (vm, b[0]->next_buffer); + } + } + + if (use_va_dma) + d[0].qword[0] = vlib_buffer_get_current_va (b[0]); + else + d[0].qword[0] = vlib_buffer_get_current_pa (vm, b[0]); + + d[0].qword[1] = (((u64) b[0]->current_length) << 34) | bits; + + next += 1; + n_desc += 1; + buffers += 1; + n_packets_left -= 1; + n_desc_left -= 1; + d = txq->descs + (next & mask); + } + } + if ((slot = clib_ring_enq (txq->rs_slots))) { u16 rs_slot = slot[0] = (next - 1) & mask; @@ -177,15 +309,15 @@ VNET_DEVICE_CLASS_TX_FN (avf_device_class) (vlib_main_t * vm, n_free = (complete_slot + 1 - first) & mask; txq->n_enqueued -= n_free; - vlib_buffer_free_from_ring (vm, txq->bufs, first, txq->size, - n_free); + vlib_buffer_free_from_ring_no_next (vm, txq->bufs, first, txq->size, + n_free); } } if (ad->flags & AVF_DEVICE_F_VA_DMA) - n_enq = avf_tx_enqueue (vm, txq, buffers, n_left, 1); + n_enq = avf_tx_enqueue (vm, node, txq, buffers, n_left, 1); else - n_enq = avf_tx_enqueue (vm, txq, buffers, n_left, 0); + n_enq = avf_tx_enqueue (vm, node, txq, buffers, n_left, 0); n_left -= n_enq; diff --git a/src/plugins/crypto_openssl/main.c b/src/plugins/crypto_openssl/main.c index 7362d6bd16ea..5458e863a5b2 100644 --- a/src/plugins/crypto_openssl/main.c +++ b/src/plugins/crypto_openssl/main.c @@ -72,7 +72,8 @@ openssl_ops_enc_cbc (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 n_ops, int out_len; int iv_len; - if (op->op == VNET_CRYPTO_OP_3DES_CBC_ENC) + if (op->op == VNET_CRYPTO_OP_3DES_CBC_ENC + || op->op == VNET_CRYPTO_OP_DES_CBC_ENC) iv_len = 8; else iv_len = 16; diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index 441590cbcee3..6d3f7b47ce64 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -122,9 +122,7 @@ format_dhcp_client (u8 * s, va_list * va) s = format (s, "\n retry-count:%d, next-xmt:%.2f", c->retry_count, c->next_transmit); - s = - format (s, "\n adjacencies:[unicast:%d broadcast:%d]", c->ai_ucast, - c->ai_bcast); + s = format (s, "\n broadcast adjacency:%d", c->ai_bcast); } return s; } @@ -165,15 +163,6 @@ dhcp_client_acquire_address (dhcp_client_main_t * dcm, dhcp_client_t * c) FIB_ROUTE_PATH_FLAG_NONE); /* *INDENT-ON* */ } - if (c->learned.dhcp_server.as_u32) - { - ip46_address_t dst = { - .ip4 = c->learned.dhcp_server, - }; - c->ai_ucast = adj_nbr_add_or_lock (FIB_PROTOCOL_IP4, - VNET_LINK_IP4, &dst, - c->sw_if_index); - } } clib_memcpy (&c->installed, &c->learned, sizeof (c->installed)); c->addresses_installed = 1; @@ -210,8 +199,6 @@ dhcp_client_release_address (dhcp_client_main_t * dcm, dhcp_client_t * c) DPO_PROTO_IP4, &nh, c->sw_if_index, ~0, 1, FIB_ROUTE_PATH_FLAG_NONE); } - adj_unlock (c->ai_ucast); - c->ai_ucast = ADJ_INDEX_INVALID; } clib_memset (&c->installed, 0, sizeof (c->installed)); c->addresses_installed = 0; @@ -253,7 +240,7 @@ dhcp_client_addr_callback (u32 * cindex) if (c->event_callback) c->event_callback (c->client_index, c); - DHCP_INFO ("update: %U", format_dhcp_client, dcm, c); + DHCP_INFO ("update: %U", format_dhcp_client, dcm, c, 1 /* verbose */ ); } static void @@ -492,7 +479,7 @@ send_dhcp_pkt (dhcp_client_main_t * dcm, dhcp_client_t * c, DHCP_INFO ("send: type:%U bcast:%d %U", format_dhcp_packet_type, type, - is_broadcast, format_dhcp_client, dcm, c); + is_broadcast, format_dhcp_client, dcm, c, 1 /* verbose */ ); /* Interface(s) down? */ if ((hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) == 0) @@ -518,24 +505,13 @@ send_dhcp_pkt (dhcp_client_main_t * dcm, dhcp_client_t * c, vnet_buffer (b)->sw_if_index[VLIB_RX] = c->sw_if_index; b->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED; - if (ADJ_INDEX_INVALID == c->ai_ucast) - is_broadcast = 1; - if (is_broadcast) { node_index = ip4_rewrite_node.index; vnet_buffer (b)->ip.adj_index[VLIB_TX] = c->ai_bcast; } else - { - ip_adjacency_t *adj = adj_get (c->ai_ucast); - - if (IP_LOOKUP_NEXT_ARP == adj->lookup_next_index) - node_index = ip4_arp_node.index; - else - node_index = ip4_rewrite_node.index; - vnet_buffer (b)->ip.adj_index[VLIB_TX] = c->ai_ucast; - } + node_index = dcm->ip4_lookup_node_index; /* Enqueue the packet right now */ f = vlib_get_frame_to_node (vm, node_index); @@ -717,8 +693,6 @@ dhcp_discover_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) * State machine "DISCOVER" state. Send a dhcp discover packet, * eventually back off the retry rate. */ - DHCP_INFO ("enter discover: %U", format_dhcp_client, dcm, c); - /* * In order to accept any OFFER, whether broadcasted or unicasted, we * need to configure the dhcp-client-detect feature as an input feature @@ -753,7 +727,8 @@ dhcp_request_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) * State machine "REQUEST" state. Send a dhcp request packet, * eventually drop back to the discover state. */ - DHCP_INFO ("enter request: %U", format_dhcp_client, dcm, c); + DHCP_INFO ("enter request: %U", format_dhcp_client, dcm, c, + 1 /*verbose */ ); send_dhcp_pkt (dcm, c, DHCP_PACKET_REQUEST, 1 /* is_broadcast */ ); @@ -793,7 +768,8 @@ dhcp_bound_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) */ if (now > c->lease_expires) { - DHCP_INFO ("lease expired: %U", format_dhcp_client, dcm, c); + DHCP_INFO ("lease expired: %U", format_dhcp_client, dcm, c, + 1 /*verbose */ ); /* reset all data for the client. do not send any more messages * since the objects to do so have been lost */ @@ -801,7 +777,7 @@ dhcp_bound_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) return 1; } - DHCP_INFO ("enter bound: %U", format_dhcp_client, dcm, c); + DHCP_INFO ("enter bound: %U", format_dhcp_client, dcm, c, 1 /* verbose */ ); send_dhcp_pkt (dcm, c, DHCP_PACKET_REQUEST, 0 /* is_broadcast */ ); c->retry_count++; @@ -827,7 +803,9 @@ dhcp_client_sm (f64 now, f64 timeout, uword pool_index) /* Time for us to do something with this client? */ if (now < c->next_transmit) - return timeout; + return c->next_transmit; + + DHCP_INFO ("sm active session %d", c - dcm->clients); again: switch (c->state) @@ -853,17 +831,15 @@ dhcp_client_sm (f64 now, f64 timeout, uword pool_index) break; } - if (c->next_transmit < now + timeout) - return c->next_transmit - now; - - return timeout; + return c->next_transmit; } static uword dhcp_client_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) { - f64 timeout = 100.0; + f64 timeout = 1000.0; + f64 next_expire_time, this_next_expire_time; f64 now; uword event_type; uword *event_data = 0; @@ -883,20 +859,32 @@ dhcp_client_process (vlib_main_t * vm, { case EVENT_DHCP_CLIENT_WAKEUP: for (i = 0; i < vec_len (event_data); i++) - timeout = dhcp_client_sm (now, timeout, event_data[i]); - break; + (void) dhcp_client_sm (now, timeout, event_data[i]); + /* FALLTHROUGH */ case ~0: - /* *INDENT-OFF* */ - DHCP_INFO ("timeout"); - pool_foreach (c, dcm->clients, - ({ - timeout = dhcp_client_sm (now, timeout, - (uword) (c - dcm->clients)); - })); - /* *INDENT-ON* */ - if (pool_elts (dcm->clients) == 0) - timeout = 100.0; + if (pool_elts (dcm->clients)) + { + /* *INDENT-OFF* */ + next_expire_time = 1e70; + pool_foreach (c, dcm->clients, + ({ + this_next_expire_time = dhcp_client_sm + (now, timeout, (uword) (c - dcm->clients)); + next_expire_time = this_next_expire_time < next_expire_time ? + this_next_expire_time : next_expire_time; + })); + if (next_expire_time > now) + timeout = next_expire_time - now; + else + { + clib_warning ("BUG"); + timeout = 1.13; + } + /* *INDENT-ON* */ + } + else + timeout = 1000.0; break; } @@ -999,7 +987,6 @@ dhcp_client_add_del (dhcp_client_add_del_args_t * a) c->client_identifier = a->client_identifier; c->set_broadcast_flag = a->set_broadcast_flag; c->dscp = a->dscp; - c->ai_ucast = ADJ_INDEX_INVALID; c->ai_bcast = adj_nbr_add_or_lock (FIB_PROTOCOL_IP4, VNET_LINK_IP4, &ADJ_BCAST_ADDR, c->sw_if_index); @@ -1015,7 +1002,7 @@ dhcp_client_add_del (dhcp_client_add_del_args_t * a) vlib_process_signal_event (vm, dhcp_client_process_node.index, EVENT_DHCP_CLIENT_WAKEUP, c - dcm->clients); - DHCP_INFO ("create: %U", format_dhcp_client, dcm, c); + DHCP_INFO ("create: %U", format_dhcp_client, dcm, c, 1 /* verbose */ ); } else { @@ -1249,7 +1236,15 @@ static clib_error_t * dhcp_client_init (vlib_main_t * vm) { dhcp_client_main_t *dcm = &dhcp_client_main; + vlib_node_t *ip4_lookup_node; + + ip4_lookup_node = vlib_get_node_by_name (vm, (u8 *) "ip4-lookup"); + + /* Should never happen... */ + if (ip4_lookup_node == 0) + return clib_error_return (0, "ip4-lookup node not found"); + dcm->ip4_lookup_node_index = ip4_lookup_node->index; dcm->vlib_main = vm; dcm->vnet_main = vnet_get_main (); dcm->seed = (u32) clib_cpu_time_now (); diff --git a/src/plugins/dhcp/client.h b/src/plugins/dhcp/client.h index e9e3bcf67c4f..2855dcecd1e2 100644 --- a/src/plugins/dhcp/client.h +++ b/src/plugins/dhcp/client.h @@ -108,8 +108,6 @@ typedef struct dhcp_client_t_ u8 client_hardware_address[6]; u8 client_detect_feature_enabled; - /* the unicast adjacency for the DHCP server */ - adj_index_t ai_ucast; /* the broadcast adjacency on the link */ adj_index_t ai_bcast; /* IP DSCP to set in sent packets */ @@ -125,6 +123,9 @@ typedef struct uword *client_by_sw_if_index; u32 seed; + /* ip4-lookup node index */ + u32 ip4_lookup_node_index; + /* convenience */ vlib_main_t *vlib_main; vnet_main_t *vnet_main; diff --git a/src/plugins/dhcp/dhcp4_proxy_error.def b/src/plugins/dhcp/dhcp4_proxy_error.def index 83f11830ab63..bd814e34ff81 100644 --- a/src/plugins/dhcp/dhcp4_proxy_error.def +++ b/src/plugins/dhcp/dhcp4_proxy_error.def @@ -30,4 +30,4 @@ dhcp_proxy_error (BAD_YIADDR, "DHCP packets with bad your_ip_address fields") dhcp_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCP packets not from DHCP server or server FIB.") dhcp_proxy_error (PKT_TOO_BIG, "DHCP packets which are too big.") dhcp_proxy_error (FOR_US, "DHCP packets for local client.") - +dhcp_proxy_error (ALLOC_FAIL, "DHCP buffer allocation failures.") diff --git a/src/plugins/dhcp/dhcp4_proxy_node.c b/src/plugins/dhcp/dhcp4_proxy_node.c index 53c95c09f129..28c3e624aa1a 100644 --- a/src/plugins/dhcp/dhcp4_proxy_node.c +++ b/src/plugins/dhcp/dhcp4_proxy_node.c @@ -364,6 +364,13 @@ dhcp_proxy_to_server_input (vlib_main_t * vm, u32 ci0; c0 = vlib_buffer_copy (vm, b0); + if (c0 == NULL) + { + vlib_node_increment_counter + (vm, dhcp_proxy_to_server_node.index, + DHCP_PROXY_ERROR_ALLOC_FAIL, 1); + continue; + } VLIB_BUFFER_TRACE_TRAJECTORY_INIT (c0); ci0 = vlib_get_buffer_index (vm, c0); server = &proxy->dhcp_servers[ii]; diff --git a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c index 3cf2fb1b349c..c240beb3eb32 100644 --- a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c +++ b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c @@ -258,6 +258,9 @@ check_send_client_message (vlib_main_t * vm, next_index = ip6_rewrite_mcast_node.index; c0 = vlib_buffer_copy (vm, p0); + if (c0 == NULL) + return client_state->keep_sending_client_message; + ci0 = vlib_get_buffer_index (vm, c0); ip = (ip6_header_t *) vlib_buffer_get_current (c0); diff --git a/src/plugins/dhcp/dhcp6_pd_client_cp.c b/src/plugins/dhcp/dhcp6_pd_client_cp.c index 18466270800b..1c0b286bd307 100644 --- a/src/plugins/dhcp/dhcp6_pd_client_cp.c +++ b/src/plugins/dhcp/dhcp6_pd_client_cp.c @@ -70,6 +70,8 @@ typedef struct { prefix_info_t *prefix_pool; const u8 **prefix_group_name_by_index; + /* vector of active prefix pool indicies, prep-H for pool_foreach(..) */ + u32 *indices; } ip6_prefix_main_t; static ip6_prefix_main_t ip6_prefix_main; @@ -277,6 +279,7 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) f64 current_time; clib_error_t *error = 0; u32 i; + prefix_info_t *prefix_info; current_time = vlib_time_now (vm); @@ -363,13 +366,26 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) send_client_message_start_stop (sw_if_index, server_index, mp->msg_type, 0, 0); + vec_reset_length (pm->indices); + /* + * We're going to loop through the pool multiple times, + * so collect active indices. + */ + /* *INDENT-OFF* */ + pool_foreach (prefix_info, pm->prefix_pool, + ({ + vec_add1 (pm->indices, prefix_info - pm->prefix_pool); + })); + /* *INDENT-ON* */ + for (i = 0; i < n_prefixes; i++) { - prefix_info_t *prefix_info = 0; u8 prefix_length; u32 valid_time; u32 preferred_time; + int j; + prefix_info = 0; api_prefix = &mp->prefixes[i]; prefix = (ip6_address_t *) api_prefix->prefix.address; @@ -386,32 +402,40 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) continue; u8 address_prefix_present = 0; - /* *INDENT-OFF* */ - pool_foreach (prefix_info, pm->prefix_pool, - ({ - if (is_dhcpv6_pd_prefix (prefix_info) && - prefix_info->opaque_data == sw_if_index && - prefix_info->prefix_length == prefix_length && - ip6_prefixes_equal (&prefix_info->prefix, prefix, prefix_length)) - { - address_prefix_present = 1; - goto prefix_pool_foreach_out; - } - })); - /* *INDENT-ON* */ - prefix_pool_foreach_out: + + /* Look for a matching prefix_info */ + for (j = 0; j < vec_len (pm->indices); j++) + { + prefix_info = pool_elt_at_index (pm->prefix_pool, pm->indices[j]); + + if (is_dhcpv6_pd_prefix (prefix_info) && + prefix_info->opaque_data == sw_if_index && + prefix_info->prefix_length == prefix_length && + ip6_prefixes_equal (&prefix_info->prefix, prefix, + prefix_length)) + { + address_prefix_present = 1; + break; + } + } if (address_prefix_present) { + /* Found the (primary) prefix, update prefix timers */ + prefix_info->preferred_lt = preferred_time; + prefix_info->valid_lt = valid_time; + prefix_info->due_time = current_time + valid_time; + if (prefix_info->due_time > rm->max_valid_due_time) + rm->max_valid_due_time = prefix_info->due_time; + /* - * We found the prefix. Move along. - * Don't touch the prefix timers! - * If we happen to receive a renew reply just before we - * would have sent a solicit to renew the prefix delegation, - * we forget to renew the delegation. Worse luck, we start - * sending router advertisements with a valid time of zero, - * and the wheels fall off... + * Tell the RA code to update any secondary per-interface + * timers that it might be hoarding. */ + ip6_ra_update_secondary_radv_info + (prefix, prefix_length, + prefix_info->opaque_data /* sw_if_index */ , + valid_time, preferred_time); continue; } @@ -419,6 +443,7 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) continue; pool_get (pm->prefix_pool, prefix_info); + vec_add1 (pm->indices, prefix_info - pm->prefix_pool); prefix_info->prefix_group_index = client_state->prefix_group_index; set_is_dhcpv6_pd_prefix (prefix_info, 1); prefix_info->opaque_data = sw_if_index; diff --git a/src/plugins/dhcp/dhcp6_pd_client_dp.c b/src/plugins/dhcp/dhcp6_pd_client_dp.c index 980c83c7bbeb..b43e5a4754d9 100644 --- a/src/plugins/dhcp/dhcp6_pd_client_dp.c +++ b/src/plugins/dhcp/dhcp6_pd_client_dp.c @@ -264,6 +264,9 @@ check_pd_send_client_message (vlib_main_t * vm, next_index = ip6_rewrite_mcast_node.index; c0 = vlib_buffer_copy (vm, p0); + if (c0 == NULL) + return client_state->keep_sending_client_message; + ci0 = vlib_get_buffer_index (vm, c0); ip = (ip6_header_t *) vlib_buffer_get_current (c0); diff --git a/src/plugins/dhcp/dhcp6_proxy_error.def b/src/plugins/dhcp/dhcp6_proxy_error.def index 55fa731766c2..5a85c423c5f6 100644 --- a/src/plugins/dhcp/dhcp6_proxy_error.def +++ b/src/plugins/dhcp/dhcp6_proxy_error.def @@ -27,3 +27,4 @@ dhcpv6_proxy_error (NO_RELAY_MESSAGE_OPTION, "DHCPv6 reply packets without relay dhcpv6_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCPv6 packets not from DHCPv6 server or server FIB.") dhcpv6_proxy_error (PKT_TOO_BIG, "DHCPv6 packets which are too big.") dhcpv6_proxy_error (WRONG_INTERFACE_ID_OPTION, "DHCPv6 reply to invalid interface.") +dhcpv6_proxy_error (ALLOC_FAIL, "DHCPv6 buffer allocation failures.") diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c index 272c379b6a3b..95e5c9272f54 100644 --- a/src/plugins/dhcp/dhcp6_proxy_node.c +++ b/src/plugins/dhcp/dhcp6_proxy_node.c @@ -437,6 +437,13 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, u32 ci0; c0 = vlib_buffer_copy (vm, b0); + if (c0 == NULL) + { + vlib_node_increment_counter + (vm, dhcpv6_proxy_to_server_node.index, + DHCPV6_PROXY_ERROR_ALLOC_FAIL, 1); + continue; + } VLIB_BUFFER_TRACE_TRAJECTORY_INIT (c0); ci0 = vlib_get_buffer_index (vm, c0); server = &proxy->dhcp_servers[ii]; diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index d0125e93936a..34a1a82ef3c0 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -199,6 +199,15 @@ check_l3cache () return 0; } +static void +dpdk_enable_l4_csum_offload (dpdk_device_t * xd) +{ + xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_CKSUM; + xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM; + xd->flags |= DPDK_DEVICE_FLAG_TX_OFFLOAD | + DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM; +} + static clib_error_t * dpdk_lib_init (dpdk_main_t * dm) { @@ -496,6 +505,8 @@ dpdk_lib_init (dpdk_main_t * dm) /* Cisco VIC */ case VNET_DPDK_PMD_ENIC: xd->port_type = port_type_from_link_speed (l.link_speed); + if (dm->conf->enable_tcp_udp_checksum) + dpdk_enable_l4_csum_offload (xd); break; /* Intel Red Rock Canyon */ diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c index 112b96a12bd4..315251694ba9 100644 --- a/src/plugins/dpdk/ipsec/esp_decrypt.c +++ b/src/plugins/dpdk/ipsec/esp_decrypt.c @@ -256,7 +256,10 @@ dpdk_esp_decrypt_inline (vlib_main_t * vm, if (is_ip6) priv->next = DPDK_CRYPTO_INPUT_NEXT_DECRYPT6_POST; else - priv->next = DPDK_CRYPTO_INPUT_NEXT_DECRYPT4_POST; + { + priv->next = DPDK_CRYPTO_INPUT_NEXT_DECRYPT4_POST; + b0->flags |= VNET_BUFFER_F_IS_IP4; + } /* FIXME multi-seg */ vlib_increment_combined_counter diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c index dd37f081a154..7da5cf8876f5 100644 --- a/src/plugins/dpdk/ipsec/esp_encrypt.c +++ b/src/plugins/dpdk/ipsec/esp_encrypt.c @@ -66,6 +66,8 @@ static char *esp_encrypt_error_strings[] = { extern vlib_node_registration_t dpdk_esp4_encrypt_node; extern vlib_node_registration_t dpdk_esp6_encrypt_node; +extern vlib_node_registration_t dpdk_esp4_encrypt_tun_node; +extern vlib_node_registration_t dpdk_esp6_encrypt_tun_node; typedef struct { @@ -411,8 +413,16 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, } else /* transport mode */ { - priv->next = DPDK_CRYPTO_INPUT_NEXT_INTERFACE_OUTPUT; - rewrite_len = vnet_buffer (b0)->ip.save_rewrite_length; + if (is_tun) + { + rewrite_len = 0; + priv->next = DPDK_CRYPTO_INPUT_NEXT_MIDCHAIN; + } + else + { + priv->next = DPDK_CRYPTO_INPUT_NEXT_INTERFACE_OUTPUT; + rewrite_len = vnet_buffer (b0)->ip.save_rewrite_length; + } u16 adv = sizeof (esp_header_t) + iv_size + udp_encap_adv; vlib_buffer_advance (b0, -adv - rewrite_len); u8 *src = ((u8 *) ih0) - rewrite_len; @@ -576,7 +586,10 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, } if (is_ip6) { - vlib_node_increment_counter (vm, dpdk_esp6_encrypt_node.index, + vlib_node_increment_counter (vm, + (is_tun ? + dpdk_esp6_encrypt_tun_node.index : + dpdk_esp6_encrypt_node.index), ESP_ENCRYPT_ERROR_RX_PKTS, from_frame->n_vectors); @@ -585,7 +598,10 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, } else { - vlib_node_increment_counter (vm, dpdk_esp4_encrypt_node.index, + vlib_node_increment_counter (vm, + (is_tun ? + dpdk_esp4_encrypt_tun_node.index : + dpdk_esp4_encrypt_node.index), ESP_ENCRYPT_ERROR_RX_PKTS, from_frame->n_vectors); diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index 260775b06950..8837756554f5 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -1049,9 +1049,11 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt, "dpdk-esp4-encrypt", "dpdk-esp4-encrypt-tun", "dpdk-esp4-decrypt", + "dpdk-esp4-decrypt", "dpdk-esp6-encrypt", "dpdk-esp6-encrypt-tun", "dpdk-esp6-decrypt", + "dpdk-esp6-decrypt", dpdk_ipsec_check_support, add_del_sa_session); int rv = ipsec_select_esp_backend (im, idx); diff --git a/src/plugins/dpdk/ipsec/ipsec.h b/src/plugins/dpdk/ipsec/ipsec.h index 572845927c8d..741674376e3c 100644 --- a/src/plugins/dpdk/ipsec/ipsec.h +++ b/src/plugins/dpdk/ipsec/ipsec.h @@ -38,6 +38,7 @@ _(IP4_LOOKUP, "ip4-lookup") \ _(IP6_LOOKUP, "ip6-lookup") \ _(INTERFACE_OUTPUT, "interface-output") \ + _(MIDCHAIN, "adj-midchain-tx") \ _(DECRYPT4_POST, "dpdk-esp4-decrypt-post") \ _(DECRYPT6_POST, "dpdk-esp6-decrypt-post") diff --git a/src/plugins/gtpu/test/test_gtpu.py b/src/plugins/gtpu/test/test_gtpu.py index 667d61c01430..00f641c0088a 100644 --- a/src/plugins/gtpu/test/test_gtpu.py +++ b/src/plugins/gtpu/test/test_gtpu.py @@ -187,7 +187,7 @@ def test_encap(self): # Pick first received frame and check if it's correctly encapsulated. out = self.pg0.get_capture(1) pkt = out[0] - self.check_encapsulation(pkt, self.single_tunnel_bd) + self.check_encapsulation(pkt, self.single_tunnel_vni) # payload = self.decapsulate(pkt) # self.assert_eq_pkts(payload, self.frame_reply) @@ -343,13 +343,14 @@ def setUpClass(cls): # Create GTPU VTEP on VPP pg0, and put gtpu_tunnel0 and pg1 # into BD. cls.single_tunnel_bd = 11 + cls.single_tunnel_vni = 11 r = cls.vapi.gtpu_add_del_tunnel( is_add=True, mcast_sw_if_index=0xFFFFFFFF, decap_next_index=0xFFFFFFFF, src_address=cls.pg0.local_ip4, dst_address=cls.pg0.remote_ip4, - teid=cls.single_tunnel_bd) + teid=cls.single_tunnel_vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge( diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index c4ddd6764363..e2a44e1706b6 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -69,13 +69,12 @@ delete_proxy_session (session_t * s, int is_active_open) uword *p; u64 handle; + clib_spinlock_lock_if_init (&pm->sessions_lock); + handle = session_handle (s); - clib_spinlock_lock_if_init (&pm->sessions_lock); if (is_active_open) { - active_open_session = s; - p = hash_get (pm->proxy_session_by_active_open_handle, handle); if (p == 0) { @@ -85,17 +84,14 @@ delete_proxy_session (session_t * s, int is_active_open) } else if (!pool_is_free_index (pm->sessions, p[0])) { + active_open_session = s; ps = pool_elt_at_index (pm->sessions, p[0]); if (ps->vpp_server_handle != ~0) server_session = session_get_from_handle (ps->vpp_server_handle); - else - server_session = 0; } } else { - server_session = s; - p = hash_get (pm->proxy_session_by_server_handle, handle); if (p == 0) { @@ -105,12 +101,11 @@ delete_proxy_session (session_t * s, int is_active_open) } else if (!pool_is_free_index (pm->sessions, p[0])) { + server_session = s; ps = pool_elt_at_index (pm->sessions, p[0]); if (ps->vpp_active_open_handle != ~0) active_open_session = session_get_from_handle (ps->vpp_active_open_handle); - else - active_open_session = 0; } } @@ -121,8 +116,6 @@ delete_proxy_session (session_t * s, int is_active_open) pool_put (pm->sessions, ps); } - clib_spinlock_unlock_if_init (&pm->sessions_lock); - if (active_open_session) { a->handle = session_handle (active_open_session); @@ -140,6 +133,8 @@ delete_proxy_session (session_t * s, int is_active_open) session_handle (server_session)); vnet_disconnect_session (a); } + + clib_spinlock_unlock_if_init (&pm->sessions_lock); } static int @@ -232,6 +227,7 @@ proxy_rx_callback (session_t * s) if (PREDICT_FALSE (max_dequeue == 0)) return 0; + max_dequeue = clib_min (pm->rcv_buffer_size, max_dequeue); actual_transfer = svm_fifo_peek (rx_fifo, 0 /* relative_offset */ , max_dequeue, pm->rx_buf[thread_index]); @@ -239,7 +235,6 @@ proxy_rx_callback (session_t * s) clib_memset (a, 0, sizeof (*a)); - clib_spinlock_lock_if_init (&pm->sessions_lock); pool_get (pm->sessions, ps); clib_memset (ps, 0, sizeof (*ps)); ps->server_rx_fifo = rx_fifo; @@ -376,22 +371,6 @@ static session_cb_vft_t active_open_clients = { }; /* *INDENT-ON* */ - -static void -create_api_loopbacks (vlib_main_t * vm) -{ - proxy_main_t *pm = &proxy_main; - api_main_t *am = vlibapi_get_main (); - vl_shmem_hdr_t *shmem_hdr; - - shmem_hdr = am->shmem_hdr; - pm->vl_input_queue = shmem_hdr->vl_input_queue; - pm->server_client_index = - vl_api_memclnt_create_internal ("proxy_server", pm->vl_input_queue); - pm->active_open_client_index = - vl_api_memclnt_create_internal ("proxy_active_open", pm->vl_input_queue); -} - static int proxy_server_attach () { @@ -405,6 +384,7 @@ proxy_server_attach () if (pm->private_segment_size) segment_size = pm->private_segment_size; + a->name = format (0, "proxy-server"); a->api_client_index = pm->server_client_index; a->session_cb_vft = &proxy_session_cb_vft; a->options = options; @@ -424,6 +404,7 @@ proxy_server_attach () } pm->server_app_index = a->app_index; + vec_free (a->name); return 0; } @@ -439,6 +420,7 @@ active_open_attach (void) a->api_client_index = pm->active_open_client_index; a->session_cb_vft = &active_open_clients; + a->name = format (0, "proxy-active-open"); options[APP_OPTIONS_ACCEPT_COOKIE] = 0x12345678; options[APP_OPTIONS_SEGMENT_SIZE] = 512 << 20; @@ -458,6 +440,8 @@ active_open_attach (void) pm->active_open_app_index = a->app_index; + vec_free (a->name); + return 0; } @@ -480,9 +464,6 @@ proxy_server_create (vlib_main_t * vm) u32 num_threads; int i; - if (pm->server_client_index == (u32) ~ 0) - create_api_loopbacks (vm); - num_threads = 1 /* main thread */ + vtm->n_threads; vec_validate (proxy_main.server_event_queue, num_threads - 1); vec_validate (proxy_main.active_open_event_queue, num_threads - 1); @@ -535,6 +516,7 @@ proxy_server_create_command_fn (vlib_main_t * vm, unformat_input_t * input, pm->private_segment_count = 0; pm->private_segment_size = 0; pm->server_uri = 0; + pm->client_uri = 0; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { @@ -556,9 +538,9 @@ proxy_server_create_command_fn (vlib_main_t * vm, unformat_input_t * input, pm->private_segment_size = tmp; } else if (unformat (input, "server-uri %s", &pm->server_uri)) - ; + vec_add1 (pm->server_uri, 0); else if (unformat (input, "client-uri %s", &pm->client_uri)) - pm->client_uri = format (0, "%s%c", pm->client_uri, 0); + vec_add1 (pm->client_uri, 0); else return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); diff --git a/src/plugins/ioam/encap/ip6_ioam_trace.c b/src/plugins/ioam/encap/ip6_ioam_trace.c index 53fb63ea6fd1..234485757987 100644 --- a/src/plugins/ioam/encap/ip6_ioam_trace.c +++ b/src/plugins/ioam/encap/ip6_ioam_trace.c @@ -222,14 +222,16 @@ ip6_hbh_ioam_loopback_handler (vlib_buffer_t * b, ip6_header_t * ip, ioam_trace_option_t *opt; udp_ping_t *udp; + b0 = vlib_buffer_copy (hm->vlib_main, b); + if (b0 == NULL) + return; + + buf_index = vlib_get_buffer_index (hm->vlib_main, b0); next_node = vlib_get_node_by_name (hm->vlib_main, (u8 *) "ip6-lookup"); nf = vlib_get_frame_to_node (hm->vlib_main, next_node->index); nf->n_vectors = 0; to_next = vlib_frame_vector_args (nf); - b0 = vlib_buffer_copy (hm->vlib_main, b); - buf_index = vlib_get_buffer_index (hm->vlib_main, b0); - vnet_buffer (b0)->sw_if_index[VLIB_RX] = 0; vnet_buffer (b0)->sw_if_index[VLIB_TX] = ~0; diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c index c1a18394aff5..5ac10797f4ab 100755 --- a/src/plugins/nat/nat.c +++ b/src/plugins/nat/nat.c @@ -3928,8 +3928,8 @@ snat_config (vlib_main_t * vm, unformat_input_t * input) sm->worker_in2out_cb = snat_get_worker_in2out_cb; sm->worker_out2in_cb = snat_get_worker_out2in_cb; - sm->handoff_out2in_index = snat_in2out_node.index; - sm->handoff_in2out_index = snat_out2in_node.index; + sm->handoff_out2in_index = snat_out2in_node.index; + sm->handoff_in2out_index = snat_in2out_node.index; sm->handoff_in2out_output_index = snat_in2out_output_node.index; sm->in2out_node_index = snat_in2out_node.index; diff --git a/src/plugins/nsim/nsim.c b/src/plugins/nsim/nsim.c index 5bc9eaecdd68..c6414905018c 100644 --- a/src/plugins/nsim/nsim.c +++ b/src/plugins/nsim/nsim.c @@ -182,7 +182,8 @@ nsim_configure (nsim_main_t * nsm, f64 bandwidth, f64 delay, f64 packet_size, vec_validate (nsm->wheel_by_thread, num_workers); /* Initialize the output scheduler wheels */ - for (i = num_workers ? 1 : 0; i < num_workers + 1; i++) + i = (!nsm->poll_main_thread && num_workers) ? 1 : 0; + for (; i < num_workers + 1; i++) { nsim_wheel_t *wp; @@ -205,7 +206,8 @@ nsim_configure (nsim_main_t * nsm, f64 bandwidth, f64 delay, f64 packet_size, vlib_worker_thread_barrier_sync (vm); /* turn on the ring scrapers */ - for (i = num_workers ? 1 : 0; i < num_workers + 1; i++) + i = (!nsm->poll_main_thread && num_workers) ? 1 : 0; + for (; i < num_workers + 1; i++) { vlib_main_t *this_vm = vlib_mains[i]; @@ -287,6 +289,28 @@ nsim_cross_connect_enable_disable_command_fn (vlib_main_t * vm, return 0; } +static clib_error_t * +nsim_config (vlib_main_t * vm, unformat_input_t * input) +{ + nsim_main_t *nsm = &nsim_main; + + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) + { + if (unformat (input, "poll-main-thread")) + { + nsm->poll_main_thread = 1; + } + else + { + return clib_error_return (0, "unknown input '%U'", + format_unformat_error, input); + } + } + return 0; +} + +VLIB_CONFIG_FUNCTION (nsim_config, "nsim"); + /*? * Enable or disable network simulation cross-connect on two interfaces * The network simulator must have already been configured, see @@ -584,6 +608,8 @@ set_nsim_command_fn (vlib_main_t * vm, return clib_error_return (0, "drop fraction must be between zero and 1"); } + else if (unformat (input, "poll-main-thread")) + nsm->poll_main_thread = 1; else break; } diff --git a/src/plugins/nsim/nsim.h b/src/plugins/nsim/nsim.h index 6afe32dc7f71..0ed9b251fbc7 100644 --- a/src/plugins/nsim/nsim.h +++ b/src/plugins/nsim/nsim.h @@ -68,6 +68,7 @@ typedef struct f64 bandwidth; f64 packet_size; f64 drop_fraction; + u32 poll_main_thread; u64 mmap_size; diff --git a/src/plugins/ping/ping.c b/src/plugins/ping/ping.c index 7045648d8727..f56f44ffb263 100755 --- a/src/plugins/ping/ping.c +++ b/src/plugins/ping/ping.c @@ -933,6 +933,8 @@ ip46_enqueue_packet (vlib_main_t * vm, vlib_buffer_t * b0, u32 burst, * we did not enqueue it here yet. */ ship_and_ret: + ASSERT (n_to_send <= f->n_vectors); + f->n_vectors -= n_to_send; n_sent += f->n_vectors; vlib_put_frame_to_node (vm, lookup_node_index, f); return n_sent; diff --git a/src/plugins/rdma/input.c b/src/plugins/rdma/input.c index 30fae83e058b..95909f4c2517 100644 --- a/src/plugins/rdma/input.c +++ b/src/plugins/rdma/input.c @@ -318,8 +318,8 @@ rdma_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, &bt); if (n_tail < n_rx_packets) n_rx_bytes += - rdma_device_input_bufs (vm, rd, &to_next[n_tail], &rxq->bufs[0], wc, - n_rx_packets - n_tail, &bt); + rdma_device_input_bufs (vm, rd, &to_next[n_tail], &rxq->bufs[0], + &wc[n_tail], n_rx_packets - n_tail, &bt); rdma_device_input_ethernet (vm, node, rd, next_index); vlib_put_next_frame (vm, node, next_index, n_left_to_next - n_rx_packets); diff --git a/src/plugins/srv6-mobile/README.md b/src/plugins/srv6-mobile/README.md deleted file mode 100644 index 18628806cbc4..000000000000 --- a/src/plugins/srv6-mobile/README.md +++ /dev/null @@ -1,178 +0,0 @@ -SRv6 Mobile User Plane Plugin for VPP -======================== - -## Introduction - -This plugin module can provide the stateless mobile user plane protocols translation between GTP-U and SRv6. -The functions of the translation take advantage of SRv6 network programmability. -[SRv6 Mobile User Plane](https://tools.ietf.org/html/draft-ietf-dmm-srv6-mobile-uplane) defines the user plane protocol using SRv6 -including following stateless translation functions: - -- **T.M.GTP4.D:** - GTP-U over UDP/IPv4 -> SRv6 -- **End.M.GTP4.E:** - SRv6 -> GTP-U over UDP/IPv4 -- **End.M.GTP6.D:** - GTP-U over UDP/IPv6 -> SRv6 -- **End.M.GTP6.E:** - SRv6 -> GTP-U over UDP/IPv6 - -These functions benefit user plane(overlay) to be able to utilize data plane(underlay) networks properly. And also it benefits -data plane to be able to handle user plane in routing paradigm. - -## Getting started -To play with SRv6 Mobile User Plane on VPP, you need to install following packages: - - docker - python3 - pip3 - - Python packages (use pip): - docker - scapy - jinja2 - - -### Quick-start - -1. Build up the docker container image as following: - -``` -$ git clone https://github.com/filvarga/srv6-mobile.git -$ cd ./srv6-mobile/extras/ietf105 -$ ./runner.py infra build - -$ docker images -REPOSITORY TAG IMAGE ID CREATED SIZE -ietf105-image latest 577e786b7ec6 2 days ago 5.57GB -ubuntu 18.04 4c108a37151f 4 weeks ago 64.2MB - -``` - -The runner script [runner.py](test/runner.py) has features to automate configurations and procedures for the test. - -2. Instantiate test Scenario - -Let's try following command to instantiate a topology: - -``` -$ ./runner.py infra start -``` - -This command instantiates 4 VPP containers with following topology: - -![Topology Diagram](test/topo-init.png) - -You can check the instantiated docker instances with "docker ps". - - -``` -$ docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -44cb98994500 ietf105-image "/bin/sh -c 'vpp -c …" About a minute ago Up About a minute hck-vpp-4 -6d65fff8aee9 ietf105-image "/bin/sh -c 'vpp -c …" About a minute ago Up About a minute hck-vpp-3 -ad123b516b24 ietf105-image "/bin/sh -c 'vpp -c …" About a minute ago Up About a minute hck-vpp-2 -5efed405b96a ietf105-image "/bin/sh -c 'vpp -c …" About a minute ago Up About a minute hck-vpp-1 - -``` - -You can login to and configure each instantiated container. - -``` -$ ./runner.py cmd vppctl 0 - -Verified image: None -connecting to: hck-vpp-1 - _______ _ _ _____ ___ - __/ __/ _ \ (_)__ | | / / _ \/ _ \ - _/ _// // / / / _ \ | |/ / ___/ ___/ - /_/ /____(_)_/\___/ |___/_/ /_/ - -vpp# -``` - -## Test Scenarios -### SRv6 Drop-in between GTP-U tunnel - -This test scenario introduces SRv6 path between GTP-U tunnel transparently. A GTP-U packet sent out from one end to another is translated to SRv6 and then back to GTP-U. All GTP-U tunnel identifiers are preserved in IPv6 header and SRH. - - -#### GTP-U over UDP/IPv4 case - -This case uses SRv6 end functions, T.M.GTP4.D and End.M.GTP4.E. - -![Topology Diagram](test/topo-test_gtp4d.png) - -VPP1 is configured with "T.M.GTP4.D", and VPP4 is configured with "End.M.GTP4.E". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv4 toward the packet capture. VPP1 translates it to SRv6 toward D4::TEID with SR policy in SRH. VPP4 translates the SRv6 packet to the original GTP-U packet and send out to the packet capture. - -To start this case with IPv4 payload over GTP-U, you can run: - -``` -$ ./runner.py test tmap -``` - -If you want to use IPv6 payload instead of IPv4, you can run: - -``` -$ ./runner.py test tmap_ipv6 -``` - - -#### GTP-U over UDP/IPv6 case - -This case uses SRv6 end functions, End.M.GTP6.D.Di and End.M.GTP6.E. - -![Topology Diagram](test/topo-test_gtp6d.png) - -VPP1 is configured with "End.M.GTP6.D.Di", and VPP4 is configured with "End.M.GTP4.E". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv6 toward D:: of the packet capture. VPP1 translates it to SRv6 toward D:: with SR policy in SRH. VPP4 translates the SRv6 packet to the original GTP-U packet and send out to the packet capture. - -To start this case with IPv4 payload over GTP-U, you can run: - -``` -$ ./runner.py test gtp6_drop_in -``` - -If you want to use IPv6 payload instead of IPv4, you can run: - -``` -$ ./runner.py test gtp6_drop_in_ipv6 -``` - - -### GTP-U to SRv6 - -This test scenario demonstrates GTP-U to SRv6 translation. A GTP-U packet sent out from one end to another is translated to SRv6. - -#### GTP-U over UDP/IPv6 case - -##### IPv4 payload - -This case uses SRv6 end functions, End.M.GTP6.D and End.DT4. - -![Topology Diagram](test/topo-test_gtp6.png) - -VPP1 is configured with "End.M.GTP6.D", and VPP4 is configured with "End.DT4". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv6 toward D::2. VPP1 translates it to SRv6 toward the IPv6 destination consists of D4:: and TEID of GTP-U with SR policy in SRH. VPP4 decapsulates the SRv6 packet and lookup the table for the inner IPv4 packet and send out to the packet capture. - -To start this case, you can run: - -``` -$ ./runner.py test gtp6 -``` - -##### IPv6 payload - -This case uses SRv6 end functions, End.M.GTP6.D and End.DT6. - - -![Topology Diagram](test/topo-test_gtp6ip6.png) - -The configurations are same with IPv4 payload case, except D4:: is configured as "End.DT6" in VPP4. VPP4 decapsulates the SRv6 packet and lookup the table for the inner IPv6 packet and send out to the packet capture. - -If you want to use IPv6 payload instead of IPv4, you can run: - -``` -$ ./runner.py test gtp6_ipv6 -``` - -## More information -TBD diff --git a/src/plugins/srv6-mobile/extra/README.md b/src/plugins/srv6-mobile/extra/README.md deleted file mode 100644 index 3b24dea6fd6c..000000000000 --- a/src/plugins/srv6-mobile/extra/README.md +++ /dev/null @@ -1,173 +0,0 @@ -# What's `runner.py` doing? - -## Common configurations - -### VPP1 -``` -create host-interface name eth1 -set int ip addr host-eth1 A1::1/120 -set int state host-eth1 up -ip route add ::/0 via host-eth1 A1::2 -``` - - -### VPP2 - -``` -create host-interface name eth1 -set int ip addr host-eth1 A1::2/120 -create host-interface name eth2 -set int ip addr host-eth2 A2::1/120 -set int state host-eth1 up -set int state host-eth2 up -ip route add ::/0 via host-eth2 A2::2 -``` - - -### VPP3 - -``` -create host-interface name eth1 -set int ip addr host-eth1 A2::2/120 -create host-interface name eth2 -set int ip addr host-eth2 A3::1/120 -set int state host-eth1 up -set int state host-eth2 up -ip route add ::/0 via host-eth1 A2::1 -``` - -### VPP4 - -``` -create host-interface name eth1 -set int ip addr host-eth1 A3::2/120 -set int state host-eth1 up -ip route add ::/0 via host-eth1 A3::1 -``` - - -## Drop-in for GTP-U over IPv4 - -What's happened when you run `test tmap`: - - $ ./runner.py test tmap - - -Setting up a virtual interface of packet generator: - -#### VPP1 - -``` -create packet-generator interface pg0 -set int mac address pg0 aa:bb:cc:dd:ee:01 -set int ip addr pg0 172.16.0.1/30 -set ip arp pg0 172.16.0.2/30 aa:bb:cc:dd:ee:02 -``` - -#### VPP4 - -``` -create packet-generator interface pg0 -set int mac address pg0 aa:bb:cc:dd:ee:11 -set int ip addr pg0 1.0.0.2/30 -set ip arp pg0 1.0.0.1 aa:bb:cc:dd:ee:22 -``` - -SRv6 and IP routing settings: - -#### VPP1 - -``` -sr policy add bsid D1:: next D2:: next D3:: gtp4_removal sr_prefix D4::/32 v6src_prefix C1::/64 -sr steer l3 172.20.0.1/32 via bsid D1:: - -``` - -#### VPP2 - -``` -sr localsid address D2:: behavior end -ip route add D3::/128 via host-eth2 A2::2 -``` - -#### VPP3 - -``` -sr localsid address D3:: behavior end -ip route add D4::/32 via host-eth2 A3::2 -``` - -#### VPP4 - -``` -sr localsid prefix D4::/32 behavior end.m.gtp4.e v4src_position 64 -ip route add 172.20.0.1/32 via pg0 1.0.0.1 -``` - - - - -## Packet generator and testing - - Example how to build custom SRv6 packet in scapy and ipaddress pkgs - - s = '\x11' * 4 + IPv4Address(u"192.168.192.10").packed + '\x11' * 8 - ip6 = IPv6Address(s) - IPv6(dst=ip6, src=ip6) - - -## end.m.gtp4.e - - First set behavior so our localsid node is called with the packet - matching C1::1 in fib table - sr localsid address C1::1 behavior end.m.gtp4.ess - - show sr localsids behaviors - show sr localsid - - We should send a well formated packet to C::1 destination address - that contains the correct spec as for end.m.gtp4.e with encapsulated - ipv4 src and dst address and teid with port for the conversion to - GTPU IPv4 packet - - -## additional commands - - gdb - breakpoint - - break sr_policy_rewrite.c:1620 - - break src/plugins/srv6-end/node.c:84 - - TMAP - Linux: - - ip link add tmp1 type veth peer name tmp2 - ip link set dev tmp1 up - ip link set dev tmp2 up - ip addr add 172.20.0.2/24 dev tmp2 - - create host-interface name tmp1 - set int mac address host-tmp1 02:fe:98:c6:c8:7b - set interface ip address host-tmp1 172.20.0.1/24 - set interface state host-tmp1 up - - VPP - set sr encaps source addr C1:: - sr policy add bsid D1::999:2 next D2:: next D3:: gtp4_removal sr-prefix fc34:5678::/64 local-prefix C1::/64 - sr steer l3 172.21.0.0/24 via bsid d1::999:2 - - END - Linux - create host-interface name tmp1 - set int mac address host-tmp1 02:fe:98:c6:c8:7b - set interface ip address host-tmp1 A1::1/64 - set interface state host-tmp1 up - - VPP - sr localsid address 1111:1111:c0a8:c00a:1122:1111:1111:1111 behavior end.m.gtp4.e - - trace add af-packet-input 10 - - sr localsid address C3:: behavior end.m.gtp4.e - sr localsid address 2001:200:0:1ce1:3000:757f:0:2 behavior end.m.gtp4.e diff --git a/src/plugins/srv6-mobile/extra/runner_doc.md b/src/plugins/srv6-mobile/extra/runner_doc.md new file mode 100644 index 000000000000..64f06d772999 --- /dev/null +++ b/src/plugins/srv6-mobile/extra/runner_doc.md @@ -0,0 +1,105 @@ +# What's `runner.py` doing? {#srv6_mobile_runner_doc} + +## Common configurations + +### VPP1 +``` +create host-interface name eth1 +set int ip addr host-eth1 A1::1/120 +set int state host-eth1 up +ip route add ::/0 via host-eth1 A1::2 +``` + + +### VPP2 + +``` +create host-interface name eth1 +set int ip addr host-eth1 A1::2/120 +create host-interface name eth2 +set int ip addr host-eth2 A2::1/120 +set int state host-eth1 up +set int state host-eth2 up +ip route add ::/0 via host-eth2 A2::2 +``` + + +### VPP3 + +``` +create host-interface name eth1 +set int ip addr host-eth1 A2::2/120 +create host-interface name eth2 +set int ip addr host-eth2 A3::1/120 +set int state host-eth1 up +set int state host-eth2 up +ip route add ::/0 via host-eth1 A2::1 +``` + +### VPP4 + +``` +create host-interface name eth1 +set int ip addr host-eth1 A3::2/120 +set int state host-eth1 up +ip route add ::/0 via host-eth1 A3::1 +``` + + +## Drop-in for GTP-U over IPv4 + +Drop-in mode is handy to test both GTP-U-to-SRv6 and SRv6-to-GTP-U functions at same time. Let's see what's happened when you run `test gtp4`: + + $ ./runner.py test gtp4 + + +Setting up a virtual interface of packet generator: + +#### VPP1 + +``` +create packet-generator interface pg0 +set int mac address pg0 aa:bb:cc:dd:ee:01 +set int ip addr pg0 172.16.0.1/30 +set ip arp pg0 172.16.0.2/30 aa:bb:cc:dd:ee:02 +``` + +#### VPP4 + +``` +create packet-generator interface pg0 +set int mac address pg0 aa:bb:cc:dd:ee:11 +set int ip addr pg0 1.0.0.2/30 +set ip arp pg0 1.0.0.1 aa:bb:cc:dd:ee:22 +``` + +SRv6 and IP routing settings: + +#### VPP1 + +``` +sr policy add bsid D4:: next D2:: next D3:: +sr policy add bsid D5:: behavior t.m.gtp4.d D4::/32 v6src_prefix C1::/64 nhtype ipv4 +sr steer l3 172.20.0.1/32 via bsid D5:: +``` + +#### VPP2 + +``` +sr localsid address D2:: behavior end +ip route add D3::/128 via host-eth2 A2::2 +``` + +#### VPP3 + +``` +sr localsid address D3:: behavior end +ip route add D4::/32 via host-eth2 A3::2 +``` + +#### VPP4 + +``` +sr localsid prefix D4::/32 behavior end.m.gtp4.e v4src_position 64 +ip route add 172.20.0.1/32 via pg0 1.0.0.1 +``` diff --git a/src/plugins/srv6-mobile/extra/topo-init.png b/src/plugins/srv6-mobile/extra/topo-init.png deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/plugins/srv6-mobile/extra/topo-test_gtp4d.png b/src/plugins/srv6-mobile/extra/topo-test_gtp4d.png deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/plugins/srv6-mobile/extra/topo-test_gtp6.png b/src/plugins/srv6-mobile/extra/topo-test_gtp6.png deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/plugins/srv6-mobile/extra/topo-test_gtp6d.png b/src/plugins/srv6-mobile/extra/topo-test_gtp6d.png deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/plugins/srv6-mobile/extra/topo-test_gtp6ip6.png b/src/plugins/srv6-mobile/extra/topo-test_gtp6ip6.png deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/plugins/srv6-mobile/mobile_plugin_doc.md b/src/plugins/srv6-mobile/mobile_plugin_doc.md new file mode 100644 index 000000000000..df8af19280b4 --- /dev/null +++ b/src/plugins/srv6-mobile/mobile_plugin_doc.md @@ -0,0 +1,142 @@ +SRv6 Mobile User Plane Plugins {#srv6_mobile_plugin_doc} +======================== + +# Introduction + +This plugin module can provide the stateless mobile user plane protocols translation between GTP-U and SRv6. The functions of the translation take advantage of SRv6 network programmability. + +[SRv6 Mobile User Plane](https://tools.ietf.org/html/draft-ietf-dmm-srv6-mobile-uplane) defines the user plane protocol using SRv6 +including following stateless translation functions: + +- **T.M.GTP4.D:** + GTP-U over UDP/IPv4 -> SRv6 +- **End.M.GTP4.E:** + SRv6 -> GTP-U over UDP/IPv4 +- **End.M.GTP6.D:** + GTP-U over UDP/IPv6 -> SRv6 +- **End.M.GTP6.E:** + SRv6 -> GTP-U over UDP/IPv6 + +These functions benefit user plane(overlay) to be able to utilize data plane(underlay) networks properly. And also it benefits data plane to be able to handle user plane in routing paradigm. + +Noted that the prefix of function names follow naming convention of SRv6 network programming. "T" means transit function, "End" means end function, "M" means Mobility specific function. The suffix "D" and "E" mean that "decapsulation" and "encapsulation" respectively. + + +# Implementation + +All SRv6 mobile functions are implemented as VPP plugin modules. The plugin modules leverage the sr_policy and sr_localsid mechanisms. + +# Configurations + +## GTP-U to SRv6 + +The GTP-U tunnel and flow identifiers of a receiving packet are mapped to a Segment Identifier(SID) of sending SRv6 packets. + +### IPv4 infrastructure case + +In case that **IPv4** networks are the infrastructure of GTP-U, T.M.GTP4.D function translates the receiving GTP-U packets to SRv6 packets. + +A T.M.GTP4.D function is associated with the following mandatory parameters: + +- SID: A SRv6 SID to represents the function +- DST-PREFIX: Prefix of remote SRv6 segment. The destination address or last SID of out packets consists of the prefix followed by dst IPv4 address, QFI and TEID of the receiving packets. +- SRC-PREFIX: Prefix for src address of sending packets. The src IPv6 address consists of the prefix followed by the src IPv4 address of the receiving packets. + +The following command instantiates a new T.M.GTP4.D function. + +``` +sr policy add bsid SID behavior t.m.gtp4.d DST-PREFIX v6src_prefix SRC-PREFIX [nhtype {ipv4|ipv6|non-ip}] +``` + +For example, the below command configures the SID 2001:db8::1 with `t.m.gtp4.d` behavior for translating receiving GTP-U over IPv4 packets to SRv6 packets with next-header type is IPv4. + +``` +sr policy add bsid 2001:db8::1 behavior t.m.gtp4.d D1::/32 v6src_prefix A1::/64 nhtype ipv4 +``` + +It should be interesting how a SRv6 BSID works to decapsulate the receiving GTP-U packets over IPv4 header. To utilize ```t.m.gtp4.d``` function, you need to configure some SR steering policy like: + +``` +sr steer l3 172.20.0.1/32 via bsid 2001:db8::1 +``` + +The above steering policy with the BSID of `t.m.gtp4.d` would work properly for the GTP-U packets destined to 172.20.0.1. + +If you have a SID(s) list of SR policy which the configured gtp4.d function to be applied, the SR Policy can be configured as following: + +``` +sr policy add bsid D1:: next A1:: next B1:: next C1:: +``` + +### IPv6 infrastructure case + +In case that GTP-U is deployed over **IPv6** infrastructure, you don't need to configure T.M.GTP4.D function and associated SR steering policy. Instead of that, you just need to configure a localsid of End.M.GTP6.D segment. + +An End.M.GTP6.D segment is associated with the following mandatory parameters: + +- SID-PREFIX: SRv6 SID prefix to represent the function. In this function, it should be the dst address of receiving GTP-U packets. +- DST-PREFIX: Prefix of remote SRv6 Segment. The destination address or last SID of output packets consists of the prefix followed by QFI and TEID of the receiving packets. + +The following command instantiates a new End.M.GTP6.D function. + +``` +sr localsid prefix SID-PREFIX behavior end.m.gtp6.d DST-PREFIX [nhtype {ipv4|ipv6|non-ip}] +``` +For example, the below command configures the SID prefix 2001:db8::/64 with `end.m.gtp6.d` behavior for translating receiving GTP-U over IPv6 packets which have IPv6 destination addresses within 2001:db8::/64 to SRv6 packets. The dst IPv6 address of the outgoing packets consists of D4::/64 followed by QFI and TEID. + +``` +sr localsid prefix 2001:db8::/64 behavior end.m.gtp6.d D4::/64 +``` + +In another case, the translated packets from GTP-U over IPv6 to SRv6 will be re-translated back to GTP-U, which is so called 'Drop-In' mode. + +In Drop-In mode, an additional IPv6 specific end segment is required, named End.M.GTP6.D.Di. It is because that unlike `end.m.gtp6.d`, it needs to preserve original IPv6 dst address as the last SID in the SRH. + +Regardless of that difference exists, the required configuration parameters are same as `end.m.gtp6.d`. + +The following command instantiates a new End.M.GTP6.D.Di function. + +``` +sr localsid prefix 2001:db8::/64 behavior end.m.gtp6.d.di D4::/64 +``` + + +## SRv6 to GTP-U + +The SRv6 Mobile functions on SRv6 to GTP-U direction are End.M.GTP4.E and End.M.GTP6.D. + +In this direction with GTP-U over IPv4 infrastructure, an End.M.GTP4.E segment is associated with the following mandatory parameters: + +- SID-PREFIX: SRv6 SID prefix to represent the function. +- V4SRC-ADDR-POSITION: Integer number indicates bit position where IPv4 src address embedded. + +The following command instantiates a new End.M.GTP4.E function. + +``` +sr localsid prefix SID-PREFIX behavior end.m.gtp4.e v4src_position V4SRC-ADDR-POSITION +``` + +For example, the below command configures the SID prefix 2001:db8::/32 with `end.m.gtp4.e` behavior for translating the receiving SRv6 packets to GTP-U packets encapsulated with UDP/IPv4 header. All the GTP-U tunnel and flow identifiers are extracted from the active SID in the receiving packets. The src IPv4 address of sending GTP-U packets is extracted from the configured bit position in the src IPv6 address. + +``` +sr localsid prefix 2001:db8::/32 behavior end.m.gtp4.e v4src_position 64 +``` + +In IPv6 infrastructure case, an End.M.GTP6.E segment is associated with the following mandatory parameters: + +- SID-PREFIX: SRv6 SID prefix to represent the function. + +The following command instantiates a new End.M.GTP6.E function. + +``` +sr localsid prefix SID-PREFIX behavior end.m.gtp6.e +``` + +For example, the below command configures the SID prefix 2001:db8::/64 with `end.m.gtp6.e` behavior for translating the receiving SRv6 packets to GTP-U packets encapsulated with UDP/IPv6 header. While the last SID indicates GTP-U dst IPv6 address, 32-bits GTP-U TEID and 6-bits QFI are extracted from the active SID in the receiving packets. + +``` +sr localsid prefix 2001:db8::/64 behavior end.m.gtp6.e +``` + +To run some demo setup please refer to: @subpage srv6_mobile_runner_doc + diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index 57a30fd3c292..7a7b68737baa 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -769,7 +769,7 @@ def process(self, objs): if o.autoreply: s[tname].append(self.autoreply_block(o.name)) elif isinstance(o, Option): - s[tname][o[1]] = o[2] + s[tname][o.option] = o.value elif type(o) is list: for o2 in o: if isinstance(o2, Service): diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 690a15fd97ed..cc1329881a41 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -7276,15 +7276,20 @@ api_tap_create_v2 (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_tap_create_v2_t *mp; -#define TAP_FLAG_GSO (1 << 0) u8 mac_address[6]; u8 random_mac = 1; u32 id = ~0; + u32 num_rx_queues = 0; u8 *host_if_name = 0; + u8 host_if_name_set = 0; u8 *host_ns = 0; + u8 host_ns_set = 0; u8 host_mac_addr[6]; u8 host_mac_addr_set = 0; u8 *host_bridge = 0; + u8 host_bridge_set = 0; + u8 host_ip4_prefix_set = 0; + u8 host_ip6_prefix_set = 0; ip4_address_t host_ip4_addr; ip4_address_t host_ip4_gw; u8 host_ip4_gw_set = 0; @@ -7293,8 +7298,8 @@ api_tap_create_v2 (vat_main_t * vam) ip6_address_t host_ip6_gw; u8 host_ip6_gw_set = 0; u32 host_ip6_prefix_len = 0; - u8 host_mtu_set = 0; u32 host_mtu_size = 0; + u8 host_mtu_set = 0; u32 tap_flags = 0; int ret; u32 rx_ring_sz = 0, tx_ring_sz = 0; @@ -7304,38 +7309,40 @@ api_tap_create_v2 (vat_main_t * vam) /* Parse args required to build the message */ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { - if (unformat (i, "hw-addr %U", unformat_ethernet_address, mac_address)) - { - random_mac = 0; - } - else if (unformat (i, "id %u", &id)) + if (unformat (i, "id %u", &id)) ; + else + if (unformat + (i, "hw-addr %U", unformat_ethernet_address, mac_address)) + random_mac = 0; else if (unformat (i, "host-if-name %s", &host_if_name)) + host_if_name_set = 1; + else if (unformat (i, "num-rx-queues %u", &num_rx_queues)) ; else if (unformat (i, "host-ns %s", &host_ns)) - ; + host_ns_set = 1; else if (unformat (i, "host-mac-addr %U", unformat_ethernet_address, host_mac_addr)) host_mac_addr_set = 1; else if (unformat (i, "host-bridge %s", &host_bridge)) - ; - else if (unformat (i, "host-ip4-addr %U/%d", unformat_ip4_address, + host_bridge_set = 1; + else if (unformat (i, "host-ip4-addr %U/%u", unformat_ip4_address, &host_ip4_addr, &host_ip4_prefix_len)) - ; - else if (unformat (i, "host-ip6-addr %U/%d", unformat_ip6_address, + host_ip4_prefix_set = 1; + else if (unformat (i, "host-ip6-addr %U/%u", unformat_ip6_address, &host_ip6_addr, &host_ip6_prefix_len)) - ; + host_ip6_prefix_set = 1; else if (unformat (i, "host-ip4-gw %U", unformat_ip4_address, &host_ip4_gw)) host_ip4_gw_set = 1; else if (unformat (i, "host-ip6-gw %U", unformat_ip6_address, &host_ip6_gw)) host_ip6_gw_set = 1; - else if (unformat (i, "rx-ring-size %d", &rx_ring_sz)) + else if (unformat (i, "rx-ring-size %u", &rx_ring_sz)) ; - else if (unformat (i, "tx-ring-size %d", &tx_ring_sz)) + else if (unformat (i, "tx-ring-size %u", &tx_ring_sz)) ; - else if (unformat (i, "host-mtu-size %d", &host_mtu_size)) + else if (unformat (i, "host-mtu-size %u", &host_mtu_size)) host_mtu_set = 1; else if (unformat (i, "no-gso")) tap_flags &= ~TAP_FLAG_GSO; @@ -7401,33 +7408,43 @@ api_tap_create_v2 (vat_main_t * vam) /* Construct the API message */ M (TAP_CREATE_V2, mp); - mp->use_random_mac = random_mac; - mp->id = ntohl (id); - mp->host_namespace_set = host_ns != 0; - mp->host_bridge_set = host_bridge != 0; - mp->host_ip4_prefix_set = host_ip4_prefix_len != 0; - mp->host_ip6_prefix_set = host_ip6_prefix_len != 0; - mp->rx_ring_sz = ntohs (rx_ring_sz); + mp->use_random_mac = random_mac; + mp->num_rx_queues = (u8) num_rx_queues; mp->tx_ring_sz = ntohs (tx_ring_sz); + mp->rx_ring_sz = ntohs (rx_ring_sz); mp->host_mtu_set = host_mtu_set; mp->host_mtu_size = ntohl (host_mtu_size); + mp->host_mac_addr_set = host_mac_addr_set; + mp->host_ip4_prefix_set = host_ip4_prefix_set; + mp->host_ip6_prefix_set = host_ip6_prefix_set; + mp->host_ip4_gw_set = host_ip4_gw_set; + mp->host_ip6_gw_set = host_ip6_gw_set; mp->tap_flags = ntohl (tap_flags); + mp->host_namespace_set = host_ns_set; + mp->host_if_name_set = host_if_name_set; + mp->host_bridge_set = host_bridge_set; if (random_mac == 0) clib_memcpy (mp->mac_address, mac_address, 6); if (host_mac_addr_set) clib_memcpy (mp->host_mac_addr, host_mac_addr, 6); - if (host_if_name) + if (host_if_name_set) clib_memcpy (mp->host_if_name, host_if_name, vec_len (host_if_name)); - if (host_ns) + if (host_ns_set) clib_memcpy (mp->host_namespace, host_ns, vec_len (host_ns)); - if (host_bridge) + if (host_bridge_set) clib_memcpy (mp->host_bridge, host_bridge, vec_len (host_bridge)); - if (host_ip4_prefix_len) - clib_memcpy (mp->host_ip4_prefix.address, &host_ip4_addr, 4); - if (host_ip6_prefix_len) - clib_memcpy (mp->host_ip6_prefix.address, &host_ip6_addr, 16); + if (host_ip4_prefix_set) + { + clib_memcpy (mp->host_ip4_prefix.address, &host_ip4_addr, 4); + mp->host_ip4_prefix.len = (u8) host_ip4_prefix_len; + } + if (host_ip6_prefix_set) + { + clib_memcpy (mp->host_ip6_prefix.address, &host_ip6_addr, 16); + mp->host_ip6_prefix.len = (u8) host_ip6_prefix_len; + } if (host_ip4_gw_set) clib_memcpy (mp->host_ip4_gw, &host_ip4_gw, 4); if (host_ip6_gw_set) @@ -20722,7 +20739,7 @@ _(l2_flags, \ _(bridge_flags, \ "bd_id [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \ _(tap_create_v2, \ - "id [hw-addr ] [host-ns ] [rx-ring-size [tx-ring-size ] [host-mtu-size ] [gso | no-gso]") \ + "id [hw-addr ] [host-if-name ] [host-ns ] [num-rx-queues ] [rx-ring-size ] [tx-ring-size ] [host-bridge ] [host-mac-addr ] [host-ip4-addr ] [host-ip6-addr ] [host-mtu-size ] [gso | no-gso | csum-offload]") \ _(tap_delete_v2, \ " | sw_if_index ") \ _(sw_interface_tap_v2_dump, "") \ diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h index 58abdb188417..3db822f00ad4 100644 --- a/src/vlib/buffer_funcs.h +++ b/src/vlib/buffer_funcs.h @@ -1172,11 +1172,11 @@ vlib_buffer_clone_256 (vlib_main_t * vm, u32 src_buffer, u32 * buffers, d->next_buffer = src_buffer; } vlib_buffer_advance (s, head_end_offset); - s->ref_count = n_buffers; + s->ref_count = n_buffers ? n_buffers : s->ref_count; while (s->flags & VLIB_BUFFER_NEXT_PRESENT) { s = vlib_get_buffer (vm, s->next_buffer); - s->ref_count = n_buffers; + s->ref_count = n_buffers ? n_buffers : s->ref_count; } return n_buffers; diff --git a/src/vlib/main.h b/src/vlib/main.h index af6539efc75e..a2ed9ba69f96 100644 --- a/src/vlib/main.h +++ b/src/vlib/main.h @@ -96,7 +96,7 @@ typedef struct vlib_main_t u64 cpu_time_main_loop_start; /* Incremented once for each main loop. */ - u32 main_loop_count; + volatile u32 main_loop_count; /* Count of vectors processed this main loop. */ u32 main_loop_vectors_processed; @@ -278,6 +278,13 @@ void vlib_worker_loop (vlib_main_t * vm); always_inline f64 vlib_time_now (vlib_main_t * vm) { +#if CLIB_DEBUG > 0 + extern __thread uword __os_thread_index; +#endif + /* + * Make sure folks don't pass &vlib_global_main from a worker thread. + */ + ASSERT (vm->thread_index == __os_thread_index); return clib_time_now (&vm->clib_time) + vm->time_offset; } diff --git a/src/vlib/threads.c b/src/vlib/threads.c index 07e1d79cf4c3..26b9e7f8d562 100644 --- a/src/vlib/threads.c +++ b/src/vlib/threads.c @@ -1390,6 +1390,18 @@ vlib_worker_thread_initial_barrier_sync_and_release (vlib_main_t * vm) *vlib_worker_threads->wait_at_barrier = 0; } +/** + * Return true if the wroker thread barrier is held + */ +u8 +vlib_worker_thread_barrier_held (void) +{ + if (vec_len (vlib_mains) < 2) + return (1); + + return (*vlib_worker_threads->wait_at_barrier == 1); +} + void vlib_worker_thread_barrier_sync_int (vlib_main_t * vm, const char *func_name) { @@ -1586,6 +1598,41 @@ vlib_worker_thread_barrier_release (vlib_main_t * vm) } +/** + * Wait until each of the workers has been once around the track + */ +void +vlib_worker_wait_one_loop (void) +{ + ASSERT (vlib_get_thread_index () == 0); + + if (vec_len (vlib_mains) < 2) + return; + + if (vlib_worker_thread_barrier_held ()) + return; + + u32 *counts = 0; + u32 ii; + + vec_validate (counts, vec_len (vlib_mains) - 1); + + /* record the current loop counts */ + vec_foreach_index (ii, vlib_mains) + counts[ii] = vlib_mains[ii]->main_loop_count; + + /* spin until each changes, apart from the main thread, or we'd be + * a while */ + for (ii = 1; ii < vec_len (counts); ii++) + { + while (counts[ii] == vlib_mains[ii]->main_loop_count) + CLIB_PAUSE (); + } + + vec_free (counts); + return; +} + /* * Check the frame queue to see if any frames are available. * If so, pull the packets off the frames and put them to diff --git a/src/vlib/threads.h b/src/vlib/threads.h index 312323c096d0..2088c5b8b7a6 100644 --- a/src/vlib/threads.h +++ b/src/vlib/threads.h @@ -206,8 +206,13 @@ u32 vlib_frame_queue_main_init (u32 node_index, u32 frame_queue_nelts); void vlib_worker_thread_barrier_sync_int (vlib_main_t * vm, const char *func_name); void vlib_worker_thread_barrier_release (vlib_main_t * vm); +u8 vlib_worker_thread_barrier_held (void); void vlib_worker_thread_initial_barrier_sync_and_release (vlib_main_t * vm); void vlib_worker_thread_node_refork (void); +/** + * Wait until each of the workers has been once around the track + */ +void vlib_worker_wait_one_loop (void); static_always_inline uword vlib_get_thread_index (void) diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c index db4871179d6c..c79ac2bc75aa 100755 --- a/src/vlibmemory/vlib_api_cli.c +++ b/src/vlibmemory/vlib_api_cli.c @@ -671,6 +671,16 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename, am->replay_in_progress = 0; } +/** api_trace_command_fn - control the binary API trace / replay feature + + Note: this command MUST be marked thread-safe. Replay with + multiple worker threads depends in many cases on worker thread + graph replica maintenance. If we (implicitly) assert a worker + thread barrier at the debug CLI level, all graph replica changes + are deferred until the replay operation completes. If an interface + is deleted, the wheels fall off. + */ + static clib_error_t * api_trace_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -691,12 +701,16 @@ api_trace_command_fn (vlib_main_t * vm, { if (unformat (input, "nitems %d", &nitems)) ; + vlib_worker_thread_barrier_sync (vm); vl_msg_api_trace_configure (am, which, nitems); vl_msg_api_trace_onoff (am, which, 1 /* on */ ); + vlib_worker_thread_barrier_release (vm); } else if (unformat (input, "off")) { + vlib_worker_thread_barrier_sync (vm); vl_msg_api_trace_onoff (am, which, 0); + vlib_worker_thread_barrier_release (vm); } else if (unformat (input, "save %s", &filename)) { @@ -718,7 +732,9 @@ api_trace_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "Couldn't create %s\n", chroot_filename); goto out; } + vlib_worker_thread_barrier_sync (vm); rv = vl_msg_api_trace_save (am, which, fp); + vlib_worker_thread_barrier_release (vm); fclose (fp); if (rv == -1) vlib_cli_output (vm, "API Trace data not present\n"); @@ -775,8 +791,10 @@ api_trace_command_fn (vlib_main_t * vm, } else if (unformat (input, "free")) { + vlib_worker_thread_barrier_sync (vm); vl_msg_api_trace_onoff (am, which, 0); vl_msg_api_trace_free (am, which); + vlib_worker_thread_barrier_release (vm); } else if (unformat (input, "post-mortem-on")) vl_msg_api_post_mortem_dump_enable_disable (1 /* enable */ ); @@ -801,8 +819,9 @@ VLIB_CLI_COMMAND (api_trace_command, static) = { .path = "api trace", .short_help = "api trace [on|off][first ][last ][status][free]" - "[post-mortem-on][dump|custom-dump|save|replay ]", + "[post-mortem-on][dump|custom-dump|save|replay ]", .function = api_trace_command_fn, + .is_mp_safe = 1, }; /* *INDENT-ON* */ diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt index 56db74265cc6..ccddfe3af49a 100644 --- a/src/vnet/CMakeLists.txt +++ b/src/vnet/CMakeLists.txt @@ -67,6 +67,9 @@ list(APPEND VNET_HEADERS vnet_msg_enum.h util/radix.h util/refcount.h + format_fns.h + ip/ip_format_fns.h + ethernet/ethernet_format_fns.h ) list(APPEND VNET_API_FILES diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c index a603925e9057..b8b0188adc48 100644 --- a/src/vnet/adj/adj.c +++ b/src/vnet/adj/adj.c @@ -249,7 +249,7 @@ adj_last_lock_gone (ip_adjacency_t *adj) switch (adj->lookup_next_index) { case IP_LOOKUP_NEXT_MIDCHAIN: - dpo_reset(&adj->sub_type.midchain.next_dpo); + adj_midchain_teardown(adj); /* FALL THROUGH */ case IP_LOOKUP_NEXT_ARP: case IP_LOOKUP_NEXT_REWRITE: @@ -267,8 +267,10 @@ adj_last_lock_gone (ip_adjacency_t *adj) adj_glean_remove(adj->ia_nh_proto, adj->rewrite_header.sw_if_index); break; - case IP_LOOKUP_NEXT_MCAST: case IP_LOOKUP_NEXT_MCAST_MIDCHAIN: + adj_midchain_teardown(adj); + /* FALL THROUGH */ + case IP_LOOKUP_NEXT_MCAST: adj_mcast_remove(adj->ia_nh_proto, adj->rewrite_header.sw_if_index); break; diff --git a/src/vnet/adj/adj_internal.h b/src/vnet/adj/adj_internal.h index adb7a32375dd..c4dda51324c7 100644 --- a/src/vnet/adj/adj_internal.h +++ b/src/vnet/adj/adj_internal.h @@ -124,6 +124,7 @@ extern void adj_glean_remove(fib_protocol_t proto, u32 sw_if_index); extern void adj_mcast_remove(fib_protocol_t proto, u32 sw_if_index); +extern void adj_midchain_teardown(ip_adjacency_t *adj); extern u32 adj_dpo_get_urpf(const dpo_id_t *dpo); diff --git a/src/vnet/adj/adj_midchain.c b/src/vnet/adj/adj_midchain.c index 542b5a13250b..03b9166dec8a 100644 --- a/src/vnet/adj/adj_midchain.c +++ b/src/vnet/adj/adj_midchain.c @@ -30,6 +30,8 @@ static u32 adj_midchain_tx_feature_node[VNET_LINK_NUM]; static u32 adj_midchain_tx_no_count_feature_node[VNET_LINK_NUM]; +static u32 *adj_midchain_feat_count_per_sw_if_index[VNET_LINK_NUM]; + /** * @brief Trace data for packets traversing the midchain tx node */ @@ -445,6 +447,30 @@ adj_nbr_midchain_get_feature_node (ip_adjacency_t *adj) return (adj_midchain_tx_feature_node[adj->ia_link]); } +/** + * adj_midchain_setup + * + * Setup the adj as a mid-chain + */ +void +adj_midchain_teardown (ip_adjacency_t *adj) +{ + u32 feature_index; + u8 arc_index; + + dpo_reset(&adj->sub_type.midchain.next_dpo); + + arc_index = adj_midchain_get_feature_arc_index_for_link_type (adj); + feature_index = adj_nbr_midchain_get_feature_node(adj); + + if (0 == --adj_midchain_feat_count_per_sw_if_index[adj->ia_link][adj->rewrite_header.sw_if_index]) + { + vnet_feature_enable_disable_with_index (arc_index, feature_index, + adj->rewrite_header.sw_if_index, + 0, 0, 0); + } +} + /** * adj_midchain_setup * @@ -473,9 +499,15 @@ adj_midchain_setup (adj_index_t adj_index, feature_index = adj_nbr_midchain_get_feature_node(adj); tx_node = adj_nbr_midchain_get_tx_node(adj); - vnet_feature_enable_disable_with_index (arc_index, feature_index, - adj->rewrite_header.sw_if_index, - 1 /* enable */, 0, 0); + vec_validate (adj_midchain_feat_count_per_sw_if_index[adj->ia_link], + adj->rewrite_header.sw_if_index); + + if (0 == adj_midchain_feat_count_per_sw_if_index[adj->ia_link][adj->rewrite_header.sw_if_index]++) + { + vnet_feature_enable_disable_with_index (arc_index, feature_index, + adj->rewrite_header.sw_if_index, + 1 /* enable */, 0, 0); + } /* * stack the midchain on the drop so it's ready to forward in the adj-midchain-tx. diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c index f769c56d8ecf..a8b92e90096d 100644 --- a/src/vnet/adj/adj_nbr.c +++ b/src/vnet/adj/adj_nbr.c @@ -347,7 +347,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, u8 *rewrite) { ip_adjacency_t *walk_adj; - adj_index_t walk_ai; + adj_index_t walk_ai, ai; vlib_main_t * vm; u32 old_next; int do_walk; @@ -355,7 +355,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, vm = vlib_get_main(); old_next = adj->lookup_next_index; - walk_ai = adj_get_index(adj); + ai = walk_ai = adj_get_index(adj); if (VNET_LINK_MPLS == adj->ia_link) { /* @@ -399,7 +399,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, * DPO, this adj will no longer be in use and its lock count will drop to 0. * We don't want it to be deleted as part of this endeavour. */ - adj_lock(adj_get_index(adj)); + adj_lock(ai); adj_lock(walk_ai); /* @@ -452,6 +452,12 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, }; fib_walk_sync(FIB_NODE_TYPE_ADJ, walk_ai, &bw_ctx); + /* + * fib_walk_sync may allocate a new adjacency and potentially cuase a + * realloc for adj_pool. When that happens, adj pointer is no longer + * valid here. We refresh the adj pointer accordingly. + */ + adj = adj_get (ai); } /* @@ -511,10 +517,11 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, */ if (do_walk) { + walk_adj = adj_get(walk_ai); walk_adj->ia_flags &= ~ADJ_FLAG_SYNC_WALK_ACTIVE; } - adj_unlock(adj_get_index(adj)); + adj_unlock(ai); adj_unlock(walk_ai); } diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c index e6d8f1c2bc8c..63caf20a6f51 100644 --- a/src/vnet/bonding/cli.c +++ b/src/vnet/bonding/cli.c @@ -404,6 +404,7 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args) bif->id = args->id; bif->lb = args->lb; bif->mode = args->mode; + bif->gso = args->gso; // Adjust requested interface id if (bif->id == ~0) @@ -454,6 +455,17 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args) bif->sw_if_index = sw->sw_if_index; bif->group = bif->sw_if_index; bif->numa_only = args->numa_only; + + /* + * Add GSO and Checksum offload flags if GSO is enabled on Bond + */ + if (args->gso) + { + vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, bif->hw_if_index); + + hw->flags |= (VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO | + VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD); + } if (vlib_get_thread_main ()->n_vlib_mains > 1) clib_spinlock_init (&bif->lockp); @@ -496,6 +508,8 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.hw_addr_set = 1; else if (unformat (line_input, "id %u", &args.id)) ; + else if (unformat (line_input, "gso")) + args.gso = 1; else if (unformat (line_input, "numa-only")) { if (args.mode == BOND_MODE_LACP) @@ -526,8 +540,8 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input, VLIB_CLI_COMMAND (bond_create_command, static) = { .path = "create bond", .short_help = "create bond mode {round-robin | active-backup | broadcast | " - "{lacp | xor} [load-balance { l2 | l23 | l34 } [numa-only]]} [hw-addr ] " - "[id ]", + "{lacp | xor} [load-balance { l2 | l23 | l34 } [numa-only]]} " + "[hw-addr ] [id ] [gso]", .function = bond_create_command_fn, }; /* *INDENT-ON* */ @@ -615,6 +629,13 @@ bond_enslave (vlib_main_t * vm, bond_enslave_args_t * args) clib_error_return (0, "bond interface cannot be enslaved"); return; } + if (bif->gso && !(sif_hw->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO)) + { + args->rv = VNET_API_ERROR_INVALID_INTERFACE; + args->error = + clib_error_return (0, "slave interface is not gso capable"); + return; + } if (bif->mode == BOND_MODE_LACP) { u8 *name = format (0, "/if/lacp/%u/%u/state%c", bif->sw_if_index, @@ -901,6 +922,8 @@ show_bond_details (vlib_main_t * vm) format_bond_mode, bif->mode); vlib_cli_output (vm, " load balance: %U", format_bond_load_balance, bif->lb); + if (bif->gso) + vlib_cli_output (vm, " gso enable"); if (bif->mode == BOND_MODE_ROUND_ROBIN) vlib_cli_output (vm, " last xmit slave index: %u", bif->lb_rr_last_index); diff --git a/src/vnet/bonding/node.h b/src/vnet/bonding/node.h index 8ead02285235..ddd48feb1a3a 100644 --- a/src/vnet/bonding/node.h +++ b/src/vnet/bonding/node.h @@ -83,6 +83,7 @@ typedef struct u8 mode; u8 lb; u8 numa_only; + u8 gso; /* return */ u32 sw_if_index; int rv; @@ -196,6 +197,7 @@ typedef struct on local numa node works for lacp mode if have at least one, otherwise it works as usual. */ u8 numa_only; + u8 gso; /* How many slaves on local numa node are there in lacp mode? */ word n_numa_slaves; diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c index b02a5dc6e5e7..d97042eda369 100755 --- a/src/vnet/classify/vnet_classify.c +++ b/src/vnet/classify/vnet_classify.c @@ -1744,6 +1744,10 @@ classify_filter_command_fn (vlib_main_t * vm, if (sw_if_index == ~0 && pkt_trace == 0 && pcap == 0) return clib_error_return (0, "Must specify trace, pcap or interface..."); + if (pkt_trace && pcap) + return clib_error_return + (0, "Packet trace and pcap are mutually exclusive..."); + if (pkt_trace && sw_if_index != ~0) return clib_error_return (0, "Packet trace filter is per-system"); @@ -2070,7 +2074,6 @@ show_classify_filter_command_fn (vlib_main_t * vm, if (verbose) { - u8 *s = 0; u32 table_index; for (j = 0; j < vec_len (set->table_indices); j++) @@ -2087,8 +2090,7 @@ show_classify_filter_command_fn (vlib_main_t * vm, } else { - u8 *s = 0; - table_index = set->table_indices[0]; + table_index = set->table_indices ? set->table_indices[0] : ~0; if (table_index != ~0) s = format (s, " %u", table_index); @@ -2950,13 +2952,11 @@ vnet_classify_init (vlib_main_t * vm) vnet_classify_register_unformat_acl_next_index_fn (unformat_acl_next_node); /* Filter set 0 is grounded... */ - pool_get (cm->filter_sets, set); + pool_get_zero (cm->filter_sets, set); set->refcnt = 0x7FFFFFFF; - vec_validate (set->table_indices, 0); - set->table_indices[0] = ~0; /* Initialize the pcap filter set */ vec_validate (cm->filter_set_by_sw_if_index, 0); - cm->filter_set_by_sw_if_index[0] = ~0; + cm->filter_set_by_sw_if_index[0] = 0; /* Initialize the packet tracer filter set */ vlib_global_main.trace_filter.trace_filter_set_index = ~0; diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c index 8d5e3b44e31a..8d59210c2930 100644 --- a/src/vnet/devices/tap/cli.c +++ b/src/vnet/devices/tap/cli.c @@ -57,7 +57,8 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, else if (unformat (line_input, "host-ns %s", &args.host_namespace)) ; else if (unformat (line_input, "host-mac-addr %U", - unformat_ethernet_address, args.host_mac_addr)) + unformat_ethernet_address, + args.host_mac_addr.bytes)) ; else if (unformat (line_input, "host-bridge %s", &args.host_bridge)) ; diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c index a1cb69d2cf6b..067905c64b5f 100644 --- a/src/vnet/devices/tap/tap.c +++ b/src/vnet/devices/tap/tap.c @@ -170,10 +170,6 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) vif->num_rxqs = args->num_rx_queues; num_q_pairs = clib_max (vif->num_rxqs, vif->num_txqs); - if (ethernet_mac_address_is_zero (args->host_mac_addr.bytes)) - ethernet_mac_address_generate (args->host_mac_addr.bytes); - clib_memcpy (vif->host_mac_addr, args->host_mac_addr.bytes, 6); - if ((vif->tap_fd = tfd = open ("/dev/net/tun", O_RDWR | O_NONBLOCK)) < 0) { args->rv = VNET_API_ERROR_SYSCALL_ERROR_2; @@ -245,13 +241,6 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) tap_log_dbg (vif, "TUNSETOFFLOAD: fd %d offload 0x%lx", tfd, offload); _IOCTL (tfd, TUNSETOFFLOAD, offload); - clib_memset (&ifr, 0, sizeof (ifr)); - ifr.ifr_addr.sa_family = ARPHRD_ETHER; - clib_memcpy (ifr.ifr_hwaddr.sa_data, vif->host_mac_addr, 6); - tap_log_dbg (vif, "SIOCSIFHWADDR: fd %d hwaddr %U", tfd, - format_hex_bytes, ifr.ifr_hwaddr.sa_data, 6); - _IOCTL (tfd, SIOCSIFHWADDR, (void *) &ifr); - /* open vhost-net fd for each queue pair and set ownership */ for (i = 0; i < num_q_pairs; i++) { @@ -350,15 +339,14 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) } } - if (!ethernet_mac_address_is_zero (args->host_mac_addr.bytes)) + if (ethernet_mac_address_is_zero (args->host_mac_addr.bytes)) + ethernet_mac_address_generate (args->host_mac_addr.bytes); + args->error = vnet_netlink_set_link_addr (vif->ifindex, + args->host_mac_addr.bytes); + if (args->error) { - args->error = vnet_netlink_set_link_addr (vif->ifindex, - args->host_mac_addr.bytes); - if (args->error) - { - args->rv = VNET_API_ERROR_NETLINK_ERROR; - goto error; - } + args->rv = VNET_API_ERROR_NETLINK_ERROR; + goto error; } if (args->host_bridge) @@ -423,18 +411,6 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) } } - /* switch back to old net namespace */ - if (args->host_namespace) - { - if (setns (old_netns_fd, CLONE_NEWNET) == -1) - { - args->rv = VNET_API_ERROR_SYSCALL_ERROR_2; - args->error = clib_error_return_unix (0, "setns '%s'", - args->host_namespace); - goto error; - } - } - if (args->host_mtu_set) { args->error = @@ -458,6 +434,18 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) args->host_mtu_size = tm->host_mtu_size; } + /* switch back to old net namespace */ + if (args->host_namespace) + { + if (setns (old_netns_fd, CLONE_NEWNET) == -1) + { + args->rv = VNET_API_ERROR_SYSCALL_ERROR_2; + args->error = clib_error_return_unix (0, "setns '%s'", + args->host_namespace); + goto error; + } + } + for (i = 0; i < num_q_pairs; i++) { if (i < vif->num_rxqs && (args->error = @@ -614,10 +602,10 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) vnet_hw_interface_assign_rx_thread (vnm, vif->hw_if_index, i, ~0); vnet_hw_interface_set_rx_mode (vnm, vif->hw_if_index, i, VNET_HW_INTERFACE_RX_MODE_DEFAULT); + virtio_vring_set_numa_node (vm, vif, RX_QUEUE (i)); } vif->per_interface_next_index = ~0; - virtio_vring_set_numa_node (vm, vif, RX_QUEUE (0)); vif->flags |= VIRTIO_IF_FLAG_ADMIN_UP; vnet_hw_interface_set_flags (vnm, vif->hw_if_index, VNET_HW_INTERFACE_FLAG_LINK_UP); @@ -633,6 +621,7 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) args->rv = VNET_API_ERROR_SYSCALL_ERROR_3; } + tap_log_err (vif, "%U", format_clib_error, args->error); tap_free (vm, vif); done: if (vhost_mem) diff --git a/src/vnet/devices/tap/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c index 1f1e18a7b6ed..e0121a83c2fa 100644 --- a/src/vnet/devices/tap/tapv2_api.c +++ b/src/vnet/devices/tap/tapv2_api.c @@ -77,15 +77,10 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp) ap->rx_ring_sz = ntohs (mp->rx_ring_sz); ap->tx_ring_sz = ntohs (mp->tx_ring_sz); ap->sw_if_index = (u32) ~ 0; + ap->num_rx_queues = 1; - if (mp->num_rx_queues < 1) - { - ap->rv = VNET_API_ERROR_INVALID_ARGUMENT; - ap->sw_if_index = ~0; - goto done; - } - - ap->num_rx_queues = mp->num_rx_queues; + if (mp->num_rx_queues > 1) + ap->num_rx_queues = mp->num_rx_queues; if (mp->host_if_name_set) ap->host_if_name = mp->host_if_name; @@ -143,7 +138,6 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp) vnet_set_sw_interface_tag (vnm, tag, ap->sw_if_index); } -done: rmp = vl_msg_api_alloc (sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_TAP_CREATE_V2_REPLY); rmp->context = mp->context; diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c index ecc8b8c1aa79..856e5f275e3d 100644 --- a/src/vnet/devices/virtio/device.c +++ b/src/vnet/devices/virtio/device.c @@ -33,7 +33,8 @@ _(NO_FREE_SLOTS, "no free tx slots") \ _(TRUNC_PACKET, "packet > buffer size -- truncated in tx ring") \ _(PENDING_MSGS, "pending msgs in tx ring") \ -_(NO_TX_QUEUES, "no tx queues") +_(NO_TX_QUEUES, "no tx queues") \ +_(OUT_OF_ORDER, "out-of-order buffers in used ring") typedef enum { @@ -73,13 +74,31 @@ format_virtio_tx_trace (u8 * s, va_list * args) } static_always_inline void -virtio_free_used_device_desc (vlib_main_t * vm, virtio_vring_t * vring) +virtio_memset_ring_u32 (u32 * ring, u32 start, u32 ring_size, u32 n_buffers) +{ + ASSERT (n_buffers <= ring_size); + + if (PREDICT_TRUE (start + n_buffers <= ring_size)) + { + clib_memset_u32 (ring + start, ~0, n_buffers); + } + else + { + clib_memset_u32 (ring + start, ~0, ring_size - start); + clib_memset_u32 (ring, ~0, n_buffers - (ring_size - start)); + } +} + +static_always_inline void +virtio_free_used_device_desc (vlib_main_t * vm, virtio_vring_t * vring, + uword node_index) { u16 used = vring->desc_in_use; u16 sz = vring->size; u16 mask = sz - 1; u16 last = vring->last_used_idx; u16 n_left = vring->used->idx - last; + u16 out_of_order_count = 0; if (n_left == 0) return; @@ -90,7 +109,7 @@ virtio_free_used_device_desc (vlib_main_t * vm, virtio_vring_t * vring) u16 slot, n_buffers; slot = n_buffers = e->id; - while (e->id == n_buffers) + while (e->id == (n_buffers & mask)) { n_left--; last++; @@ -101,18 +120,29 @@ virtio_free_used_device_desc (vlib_main_t * vm, virtio_vring_t * vring) } vlib_buffer_free_from_ring (vm, vring->buffers, slot, sz, (n_buffers - slot)); + virtio_memset_ring_u32 (vring->buffers, slot, sz, (n_buffers - slot)); used -= (n_buffers - slot); if (n_left > 0) { - slot = e->id; - - vlib_buffer_free (vm, &vring->buffers[slot], 1); + vlib_buffer_free (vm, &vring->buffers[e->id], 1); + vring->buffers[e->id] = ~0; used--; last++; n_left--; + out_of_order_count++; + vring->flags |= VRING_TX_OUT_OF_ORDER; } } + + /* + * Some vhost-backends give buffers back in out-of-order fashion in used ring. + * It impacts the overall virtio-performance. + */ + if (out_of_order_count) + vlib_error_count (vm, node_index, VIRTIO_TX_ERROR_OUT_OF_ORDER, + out_of_order_count); + vring->desc_in_use = used; vring->last_used_idx = last; } @@ -302,6 +332,42 @@ add_buffer_to_slot (vlib_main_t * vm, virtio_if_t * vif, return n_added; } +static_always_inline void +virtio_find_free_desc (virtio_vring_t * vring, u16 size, u16 mask, + u16 req, u16 next, u32 * first_free_desc_index, + u16 * free_desc_count) +{ + u16 start = 0; + /* next is used as hint: from where to start looking */ + for (u16 i = 0; i < size; i++, next++) + { + if (vring->buffers[next & mask] == ~0) + { + if (*first_free_desc_index == ~0) + { + *first_free_desc_index = (next & mask); + start = i; + (*free_desc_count)++; + req--; + if (req == 0) + break; + } + else + { + if (start + *free_desc_count == i) + { + (*free_desc_count)++; + req--; + if (req == 0) + break; + } + else + break; + } + } + } +} + static_always_inline uword virtio_interface_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame, virtio_if_t * vif, @@ -314,6 +380,7 @@ virtio_interface_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node, u16 used, next, avail; u16 sz = vring->size; u16 mask = sz - 1; + u16 retry_count = 2; u32 *buffers = vlib_frame_vector_args (frame); clib_spinlock_lock_if_init (&vring->lockp); @@ -322,14 +389,30 @@ virtio_interface_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node, (vring->last_kick_avail_idx != vring->avail->idx)) virtio_kick (vm, vring, vif); +retry: /* free consumed buffers */ - virtio_free_used_device_desc (vm, vring); + virtio_free_used_device_desc (vm, vring, node->node_index); used = vring->desc_in_use; next = vring->desc_next; avail = vring->avail->idx; - while (n_left && used < sz) + u16 free_desc_count = 0; + + if (PREDICT_FALSE (vring->flags & VRING_TX_OUT_OF_ORDER)) + { + u32 first_free_desc_index = ~0; + + virtio_find_free_desc (vring, sz, mask, n_left, next, + &first_free_desc_index, &free_desc_count); + + if (free_desc_count) + next = first_free_desc_index; + } + else + free_desc_count = sz - used; + + while (n_left && free_desc_count) { u16 n_added = 0; n_added = @@ -342,6 +425,7 @@ virtio_interface_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node, used += n_added; buffers++; n_left--; + free_desc_count--; } if (n_left != frame->n_vectors) @@ -356,6 +440,9 @@ virtio_interface_tx_inline (vlib_main_t * vm, vlib_node_runtime_t * node, if (n_left) { + if (retry_count--) + goto retry; + vlib_error_count (vm, node->node_index, VIRTIO_TX_ERROR_NO_FREE_SLOTS, n_left); vlib_buffer_free (vm, buffers, n_left); @@ -444,10 +531,16 @@ virtio_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) virtio_if_t *vif = pool_elt_at_index (mm->interfaces, hw->dev_instance); if (flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) - vif->flags |= VIRTIO_IF_FLAG_ADMIN_UP; + { + vif->flags |= VIRTIO_IF_FLAG_ADMIN_UP; + vnet_hw_interface_set_flags (vnm, vif->hw_if_index, + VNET_HW_INTERFACE_FLAG_LINK_UP); + } else - vif->flags &= ~VIRTIO_IF_FLAG_ADMIN_UP; - + { + vif->flags &= ~VIRTIO_IF_FLAG_ADMIN_UP; + vnet_hw_interface_set_flags (vnm, vif->hw_if_index, 0); + } return 0; } diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c index c956e7b75fae..65dab0ae769e 100644 --- a/src/vnet/devices/virtio/pci.c +++ b/src/vnet/devices/virtio/pci.c @@ -823,6 +823,7 @@ virtio_pci_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 queue_num) { virtio_log_debug (vif, "tx-queue: number %u, size %u", queue_num, queue_size); + clib_memset_u32 (vring->buffers, ~0, queue_size); } else { diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c index 11d45812e396..86ab3bff8a64 100644 --- a/src/vnet/devices/virtio/vhost_user_input.c +++ b/src/vnet/devices/virtio/vhost_user_input.c @@ -275,14 +275,14 @@ vhost_user_handle_rx_offload (vlib_buffer_t * b0, u8 * b0_data, vnet_buffer (b0)->l4_hdr_offset = hdr->csum_start; b0->flags |= (VNET_BUFFER_F_L2_HDR_OFFSET_VALID | VNET_BUFFER_F_L3_HDR_OFFSET_VALID | - VNET_BUFFER_F_L4_HDR_OFFSET_VALID | - VNET_BUFFER_F_OFFLOAD_IP_CKSUM); + VNET_BUFFER_F_L4_HDR_OFFSET_VALID); if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP4)) { ip4_header_t *ip4 = (ip4_header_t *) (b0_data + l2hdr_sz); l4_proto = ip4->protocol; - b0->flags |= VNET_BUFFER_F_IS_IP4; + b0->flags |= (VNET_BUFFER_F_IS_IP4 | + VNET_BUFFER_F_OFFLOAD_IP_CKSUM); } else if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP6)) { @@ -559,17 +559,7 @@ vhost_user_if_input (vlib_main_t * vm, } } - if (PREDICT_TRUE (vui->is_any_layout) || - (!(desc_table[desc_current].flags & VIRTQ_DESC_F_NEXT))) - { - /* ANYLAYOUT or single buffer */ - desc_data_offset = vui->virtio_net_hdr_sz; - } - else - { - /* CSR case without ANYLAYOUT, skip 1st buffer */ - desc_data_offset = desc_table[desc_current].len; - } + desc_data_offset = vui->virtio_net_hdr_sz; if (enable_csum) { diff --git a/src/vnet/devices/virtio/vhost_user_output.c b/src/vnet/devices/virtio/vhost_user_output.c index a47583d64fa1..c1b8fe1a92ab 100644 --- a/src/vnet/devices/virtio/vhost_user_output.c +++ b/src/vnet/devices/virtio/vhost_user_output.c @@ -307,6 +307,7 @@ VNET_DEVICE_CLASS_TX_FN (vhost_user_device_class) (vlib_main_t * vm, u8 retry = 8; u16 copy_len; u16 tx_headers_len; + u32 or_flags; if (PREDICT_FALSE (!vui->admin_up)) { @@ -400,8 +401,13 @@ VNET_DEVICE_CLASS_TX_FN (vhost_user_device_class) (vlib_main_t * vm, hdr->hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE; hdr->num_buffers = 1; //This is local, no need to check - /* Guest supports csum offload? */ - if (vui->features & (1ULL << FEAT_VIRTIO_NET_F_GUEST_CSUM)) + or_flags = (b0->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM) || + (b0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM) || + (b0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM); + + /* Guest supports csum offload and buffer requires checksum offload? */ + if (or_flags + && (vui->features & (1ULL << FEAT_VIRTIO_NET_F_GUEST_CSUM))) vhost_user_handle_tx_offload (vui, b0, &hdr->hdr); // Prepare a copy order executed later for the header diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c index c0c163fc850c..d78c9114e5c8 100644 --- a/src/vnet/devices/virtio/virtio.c +++ b/src/vnet/devices/virtio/virtio.c @@ -113,6 +113,11 @@ virtio_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 idx, u16 sz) ASSERT (vring->buffers == 0); vec_validate_aligned (vring->buffers, sz, CLIB_CACHE_LINE_BYTES); + if (idx & 1) + { + clib_memset_u32 (vring->buffers, ~0, sz); + } + vring->size = sz; vring->call_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC); vring->kick_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC); @@ -299,6 +304,8 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type) if (vif->host_mtu_size) vlib_cli_output (vm, " host-mtu-size \"%d\"", vif->host_mtu_size); + vlib_cli_output (vm, " host-mac-addr: %U", + format_ethernet_address, vif->host_mac_addr); vec_foreach_index (i, vif->vhost_fds) str = format (str, " %d", vif->vhost_fds[i]); diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index 4b8662699da0..e28922bf654d 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -112,6 +112,7 @@ typedef struct u8 buffer_pool_index; u16 size; u16 queue_id; +#define VRING_TX_OUT_OF_ORDER 1 u16 flags; u32 call_file_index; u32 *buffers; diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c index d8c57fd1032b..3bef28e3ad0a 100644 --- a/src/vnet/fib/fib_entry.c +++ b/src/vnet/fib/fib_entry.c @@ -708,7 +708,7 @@ fib_entry_post_install_actions (fib_entry_t *fib_entry, { fib_entry = fib_entry_post_flag_update_actions(fib_entry, old_flags); - fib_entry_src_action_installed(fib_entry, source); + fib_entry = fib_entry_src_action_installed(fib_entry, source); return (fib_entry); } diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c index d534135d330c..ad8b23e4af18 100644 --- a/src/vnet/fib/fib_entry_src.c +++ b/src/vnet/fib/fib_entry_src.c @@ -91,7 +91,7 @@ fib_entry_src_action_init (fib_entry_t *fib_entry, .fes_entry_flags = flags, }; - FIB_ENTRY_SRC_VFT_INVOKE(&esrc, fesv_init, (&esrc)); + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, &esrc, fesv_init, (&esrc)); vec_add1(fib_entry->fe_srcs, esrc); vec_sort_with_function(fib_entry->fe_srcs, @@ -213,7 +213,7 @@ fib_entry_src_action_deinit (fib_entry_t *fib_entry, ASSERT(NULL != esrc); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_deinit, (esrc)); + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_deinit, (esrc)); fib_path_ext_list_flush(&esrc->fes_path_exts); vec_del1(fib_entry->fe_srcs, index); @@ -776,7 +776,7 @@ fib_entry_src_action_copy (fib_entry_t *fib_entry, orig_src->fes_src, orig_src->fes_entry_flags); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_copy, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_copy, (orig_src, fib_entry, esrc)); fib_path_list_unlock(esrc->fes_pl); @@ -1095,7 +1095,7 @@ fib_entry_src_action_deactivate (fib_entry_t *fib_entry, ASSERT(esrc->fes_flags & FIB_ENTRY_SRC_FLAG_ACTIVE); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_deactivate, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_deactivate, (esrc, fib_entry)); esrc->fes_flags &= ~(FIB_ENTRY_SRC_FLAG_ACTIVE | @@ -1134,7 +1134,7 @@ fib_entry_src_action_fwd_update (const fib_entry_t *fib_entry, vec_foreach(esrc, fib_entry->fe_srcs) { - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_fwd_update, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_fwd_update, (esrc, fib_entry, source)); } } @@ -1223,18 +1223,20 @@ fib_entry_src_action_reactivate (fib_entry_t *fib_entry, fib_entry_src_action_fwd_update(fib_entry, source); } -void -fib_entry_src_action_installed (const fib_entry_t *fib_entry, +fib_entry_t * +fib_entry_src_action_installed (fib_entry_t *fib_entry, fib_source_t source) { fib_entry_src_t *esrc; esrc = fib_entry_src_find(fib_entry, source); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_installed, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_installed, (esrc, fib_entry)); fib_entry_src_action_fwd_update(fib_entry, source); + + return (fib_entry); } /* @@ -1251,7 +1253,6 @@ fib_entry_src_action_add (fib_entry_t *fib_entry, fib_entry_flag_t flags, const dpo_id_t *dpo) { - fib_node_index_t fib_entry_index; fib_entry_src_t *esrc; esrc = fib_entry_src_find_or_create(fib_entry, source, flags); @@ -1261,7 +1262,7 @@ fib_entry_src_action_add (fib_entry_t *fib_entry, if (flags != esrc->fes_entry_flags) { - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_flags_change, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_flags_change, (esrc, fib_entry, flags)); } esrc->fes_entry_flags = flags; @@ -1274,20 +1275,13 @@ fib_entry_src_action_add (fib_entry_t *fib_entry, return (fib_entry); } - /* - * save variable so we can recover from a fib_entry realloc. - */ - fib_entry_index = fib_entry_get_index(fib_entry); - - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_add, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_add, (esrc, fib_entry, flags, fib_entry_get_dpo_proto(fib_entry), dpo)); - fib_entry = fib_entry_get(fib_entry_index); - esrc->fes_flags |= FIB_ENTRY_SRC_FLAG_ADDED; fib_path_list_lock(esrc->fes_pl); @@ -1314,7 +1308,7 @@ fib_entry_src_action_update (fib_entry_t *fib_entry, fib_entry_flag_t flags, const dpo_id_t *dpo) { - fib_node_index_t fib_entry_index, old_path_list_index; + fib_node_index_t old_path_list_index; fib_entry_src_t *esrc; esrc = fib_entry_src_find_or_create(fib_entry, source, flags); @@ -1327,20 +1321,13 @@ fib_entry_src_action_update (fib_entry_t *fib_entry, old_path_list_index = esrc->fes_pl; esrc->fes_entry_flags = flags; - /* - * save variable so we can recover from a fib_entry realloc. - */ - fib_entry_index = fib_entry_get_index(fib_entry); - - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_add, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_add, (esrc, fib_entry, flags, fib_entry_get_dpo_proto(fib_entry), dpo)); - fib_entry = fib_entry_get(fib_entry_index); - esrc->fes_flags |= FIB_ENTRY_SRC_FLAG_ADDED; fib_path_list_lock(esrc->fes_pl); @@ -1435,14 +1422,14 @@ fib_entry_src_action_remove (fib_entry_t *fib_entry, } else if (esrc->fes_flags & FIB_ENTRY_SRC_FLAG_CONTRIBUTING) { - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_deactivate, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_deactivate, (esrc, fib_entry)); esrc->fes_flags &= ~FIB_ENTRY_SRC_FLAG_CONTRIBUTING; } old_path_list = esrc->fes_pl; - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_remove, (esrc)); + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_remove, (esrc)); fib_path_list_unlock(old_path_list); fib_entry_unlock(fib_entry_get_index(fib_entry)); @@ -1584,15 +1571,10 @@ fib_entry_src_action_path_add (fib_entry_t *fib_entry, fib_entry_flag_t flags, const fib_route_path_t *rpaths) { - fib_node_index_t old_path_list, fib_entry_index; + fib_node_index_t old_path_list; fib_path_list_flags_t pl_flags; fib_entry_src_t *esrc; - /* - * save variable so we can recover from a fib_entry realloc. - */ - fib_entry_index = fib_entry_get_index(fib_entry); - esrc = fib_entry_src_find(fib_entry, source); if (NULL == esrc) { @@ -1625,9 +1607,8 @@ fib_entry_src_action_path_add (fib_entry_t *fib_entry, pl_flags = fib_entry_src_flags_2_path_list_flags(fib_entry_get_flags_i(fib_entry)); fib_entry_flags_update(fib_entry, rpaths, &pl_flags, esrc); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_path_add, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_path_add, (esrc, fib_entry, pl_flags, rpaths)); - fib_entry = fib_entry_get(fib_entry_index); fib_path_list_lock(esrc->fes_pl); fib_path_list_unlock(old_path_list); @@ -1650,17 +1631,12 @@ fib_entry_src_action_path_swap (fib_entry_t *fib_entry, fib_entry_flag_t flags, const fib_route_path_t *rpaths) { - fib_node_index_t old_path_list, fib_entry_index; + fib_node_index_t old_path_list; fib_path_list_flags_t pl_flags; fib_entry_src_t *esrc; esrc = fib_entry_src_find(fib_entry, source); - /* - * save variable so we can recover from a fib_entry realloc. - */ - fib_entry_index = fib_entry_get_index(fib_entry); - if (NULL == esrc) { const dpo_id_t *dpo; @@ -1681,7 +1657,7 @@ fib_entry_src_action_path_swap (fib_entry_t *fib_entry, { if (flags != esrc->fes_entry_flags) { - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_flags_change, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_flags_change, (esrc, fib_entry, flags)); } esrc->fes_entry_flags = flags; @@ -1700,12 +1676,10 @@ fib_entry_src_action_path_swap (fib_entry_t *fib_entry, fib_entry_flags_update(fib_entry, rpaths, &pl_flags, esrc); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_path_swap, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_path_swap, (esrc, fib_entry, pl_flags, rpaths)); - fib_entry = fib_entry_get(fib_entry_index); - fib_path_list_lock(esrc->fes_pl); fib_path_list_unlock(old_path_list); @@ -1739,7 +1713,7 @@ fib_entry_src_action_path_remove (fib_entry_t *fib_entry, pl_flags = fib_entry_src_flags_2_path_list_flags(fib_entry_get_flags_i(fib_entry)); fib_entry_flags_update(fib_entry, rpaths, &pl_flags, esrc); - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_path_remove, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_path_remove, (esrc, pl_flags, rpaths)); /* @@ -1901,7 +1875,7 @@ fib_entry_set_source_data (fib_node_index_t fib_entry_index, if (NULL != esrc) { - FIB_ENTRY_SRC_VFT_INVOKE(esrc, fesv_set_data, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, esrc, fesv_set_data, (esrc, fib_entry, data)); } } diff --git a/src/vnet/fib/fib_entry_src.h b/src/vnet/fib/fib_entry_src.h index 308005777a06..edeaaf980e8a 100644 --- a/src/vnet/fib/fib_entry_src.h +++ b/src/vnet/fib/fib_entry_src.h @@ -226,14 +226,16 @@ typedef struct fib_entry_src_vft_t_ { } \ } -#define FIB_ENTRY_SRC_VFT_INVOKE(esrc, func, args) \ +#define FIB_ENTRY_SRC_VFT_INVOKE(_fe, esrc, func, args) \ { \ const fib_entry_src_vft_t *_vft; \ + fib_node_index_t _fei = fib_entry_get_index(_fe); \ _vft = fib_entry_src_get_vft(esrc); \ if (_vft->func) { \ (esrc)->fes_flags &= ~FIB_ENTRY_SRC_FLAG_STALE; \ _vft->func args; \ } \ + _fe = fib_entry_get(_fei); \ } #define FIB_ENTRY_SRC_VFT_INVOKE_AND_RETURN(esrc, func, args) \ @@ -313,8 +315,8 @@ extern fib_entry_src_flag_t fib_entry_src_action_path_remove(fib_entry_t *fib_en fib_source_t source, const fib_route_path_t *path); -extern void fib_entry_src_action_installed(const fib_entry_t *fib_entry, - fib_source_t source); +extern fib_entry_t* fib_entry_src_action_installed(fib_entry_t *fib_entry, + fib_source_t source); extern void fib_entry_src_inherit (const fib_entry_t *cover, fib_entry_t *covered); diff --git a/src/vnet/fib/fib_entry_src_interface.c b/src/vnet/fib/fib_entry_src_interface.c index 88154ef90be3..e1725773d936 100644 --- a/src/vnet/fib/fib_entry_src_interface.c +++ b/src/vnet/fib/fib_entry_src_interface.c @@ -56,8 +56,10 @@ fib_entry_src_interface_path_swap (fib_entry_src_t *src, fib_path_list_flags_t pl_flags, const fib_route_path_t *paths) { + fib_node_index_t fib_entry_index; ip_adjacency_t *adj; + fib_entry_index = fib_entry_get_index(entry); src->fes_pl = fib_path_list_create(pl_flags, paths); /* @@ -69,7 +71,8 @@ fib_entry_src_interface_path_swap (fib_entry_src_t *src, adj_index_t ai; ai = fib_path_list_get_adj(src->fes_pl, - fib_entry_get_default_chain_type(entry)); + fib_entry_get_default_chain_type( + fib_entry_get(fib_entry_index))); if (INDEX_INVALID != ai) { adj = adj_get(ai); diff --git a/src/vnet/fib/fib_entry_src_interpose.c b/src/vnet/fib/fib_entry_src_interpose.c index 02db3911dfcb..af650a925979 100644 --- a/src/vnet/fib/fib_entry_src_interpose.c +++ b/src/vnet/fib/fib_entry_src_interpose.c @@ -207,7 +207,7 @@ fib_entry_src_interpose_deactivate (fib_entry_src_t *src, * there is another source for this entry. activate it so it * can provide forwarding */ - FIB_ENTRY_SRC_VFT_INVOKE(best_src, fesv_deactivate, + FIB_ENTRY_SRC_VFT_INVOKE(fib_entry, best_src, fesv_deactivate, (best_src, fib_entry)); } } diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c index c8a2a09cbff6..1918b08df0c8 100644 --- a/src/vnet/fib/fib_path.c +++ b/src/vnet/fib/fib_path.c @@ -645,14 +645,16 @@ fib_path_last_lock_gone (fib_node_t *node) ASSERT(0); } -static void +static fib_path_t* fib_path_attached_next_hop_get_adj (fib_path_t *path, vnet_link_t link, dpo_id_t *dpo) { + fib_node_index_t fib_path_index; fib_protocol_t nh_proto; adj_index_t ai; + fib_path_index = fib_path_get_index(path); nh_proto = dpo_proto_to_fib(path->fp_nh_proto); if (vnet_sw_interface_is_p2p(vnet_get_main(), @@ -676,6 +678,8 @@ fib_path_attached_next_hop_get_adj (fib_path_t *path, dpo_set(dpo, DPO_ADJACENCY, vnet_link_to_dpo_proto(link), ai); adj_unlock(ai); + + return (fib_path_get(fib_path_index)); } static void @@ -685,9 +689,9 @@ fib_path_attached_next_hop_set (fib_path_t *path) * resolve directly via the adjacency discribed by the * interface and next-hop */ - fib_path_attached_next_hop_get_adj(path, - dpo_proto_to_link(path->fp_nh_proto), - &path->fp_dpo); + path = fib_path_attached_next_hop_get_adj(path, + dpo_proto_to_link(path->fp_nh_proto), + &path->fp_dpo); ASSERT(dpo_is_adj(&path->fp_dpo)); @@ -1111,7 +1115,7 @@ FIXME comment vnet_get_main(), path->attached_next_hop.fp_interface); - fib_path_attached_next_hop_get_adj( + path = fib_path_attached_next_hop_get_adj( path, dpo_proto_to_link(path->fp_nh_proto), &path->fp_dpo); @@ -2446,10 +2450,10 @@ fib_path_contribute_forwarding (fib_node_index_t path_index, case FIB_FORW_CHAIN_TYPE_NSH: case FIB_FORW_CHAIN_TYPE_MCAST_IP4: case FIB_FORW_CHAIN_TYPE_MCAST_IP6: - fib_path_attached_next_hop_get_adj( - path, - fib_forw_chain_type_to_link_type(fct), - dpo); + path = fib_path_attached_next_hop_get_adj( + path, + fib_forw_chain_type_to_link_type(fct), + dpo); break; case FIB_FORW_CHAIN_TYPE_BIER: break; diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c index ac0f2da6696c..ec2acc59c52f 100644 --- a/src/vnet/fib/fib_table.c +++ b/src/vnet/fib/fib_table.c @@ -580,6 +580,13 @@ fib_table_entry_path_add (u32 fib_index, return (fib_entry_index); } +static int +fib_route_path_cmp_for_sort (void * v1, + void * v2) +{ + return (fib_route_path_cmp(v1, v2)); +} + fib_node_index_t fib_table_entry_path_add2 (u32 fib_index, const fib_prefix_t *prefix, @@ -598,6 +605,11 @@ fib_table_entry_path_add2 (u32 fib_index, { fib_table_route_path_fixup(prefix, &flags, &rpaths[ii]); } + /* + * sort the paths provided by the control plane. this means + * the paths and the extension on the entry will be sorted. + */ + vec_sort_with_function(rpaths, fib_route_path_cmp_for_sort); if (FIB_NODE_INDEX_INVALID == fib_entry_index) { @@ -740,13 +752,6 @@ fib_table_entry_path_remove (u32 fib_index, vec_free(paths); } -static int -fib_route_path_cmp_for_sort (void * v1, - void * v2) -{ - return (fib_route_path_cmp(v1, v2)); -} - fib_node_index_t fib_table_entry_update (u32 fib_index, const fib_prefix_t *prefix, diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c index 784f52c0460d..8de7e2a4f9ba 100644 --- a/src/vnet/fib/ip6_fib.c +++ b/src/vnet/fib/ip6_fib.c @@ -248,14 +248,29 @@ ip6_fib_table_lookup_exact_match (u32 fib_index, static void compute_prefix_lengths_in_search_order (ip6_fib_table_instance_t *table) { + u8 *old, *prefix_lengths_in_search_order = NULL; int i; - vec_reset_length (table->prefix_lengths_in_search_order); + + /* + * build the list in a scratch space then cutover so the workers + * can continue uninterrupted. + */ + old = table->prefix_lengths_in_search_order; + /* Note: bitmap reversed so this is in fact a longest prefix match */ clib_bitmap_foreach (i, table->non_empty_dst_address_length_bitmap, ({ int dst_address_length = 128 - i; - vec_add1(table->prefix_lengths_in_search_order, dst_address_length); + vec_add1(prefix_lengths_in_search_order, dst_address_length); })); + + table->prefix_lengths_in_search_order = prefix_lengths_in_search_order; + + /* + * let the workers go once round the track before we free the old set + */ + vlib_worker_wait_one_loop(); + vec_free(old); } void @@ -311,12 +326,13 @@ ip6_fib_table_entry_insert (u32 fib_index, clib_bihash_add_del_24_8(&table->ip6_hash, &kv, 1); - table->dst_address_length_refcounts[len]++; - - table->non_empty_dst_address_length_bitmap = - clib_bitmap_set (table->non_empty_dst_address_length_bitmap, - 128 - len, 1); - compute_prefix_lengths_in_search_order (table); + if (0 == table->dst_address_length_refcounts[len]++) + { + table->non_empty_dst_address_length_bitmap = + clib_bitmap_set (table->non_empty_dst_address_length_bitmap, + 128 - len, 1); + compute_prefix_lengths_in_search_order (table); + } } u32 ip6_fib_table_fwding_lookup_with_if_index (ip6_main_t * im, @@ -363,12 +379,13 @@ ip6_fib_table_fwding_dpo_update (u32 fib_index, clib_bihash_add_del_24_8(&table->ip6_hash, &kv, 1); - table->dst_address_length_refcounts[len]++; - - table->non_empty_dst_address_length_bitmap = - clib_bitmap_set (table->non_empty_dst_address_length_bitmap, - 128 - len, 1); - compute_prefix_lengths_in_search_order (table); + if (0 == table->dst_address_length_refcounts[len]++) + { + table->non_empty_dst_address_length_bitmap = + clib_bitmap_set (table->non_empty_dst_address_length_bitmap, + 128 - len, 1); + compute_prefix_lengths_in_search_order (table); + } } void diff --git a/src/vnet/geneve/decap.c b/src/vnet/geneve/decap.c index e30a56c03277..7914ef66005f 100644 --- a/src/vnet/geneve/decap.c +++ b/src/vnet/geneve/decap.c @@ -213,7 +213,7 @@ geneve_input (vlib_main_t * vm, if (is_ip4) { key4_0.remote = ip4_0->src_address.as_u32; - key4_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key4_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure GENEVE tunnel exist according to packet SIP and VNI */ if (PREDICT_FALSE (key4_0.as_u64 != last_key4.as_u64)) @@ -248,7 +248,7 @@ geneve_input (vlib_main_t * vm, (ip4_address_is_multicast (&ip4_0->dst_address))) { key4_0.remote = ip4_0->dst_address.as_u32; - key4_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key4_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure mcast GENEVE tunnel exist by packet DIP and VNI */ p0 = hash_get (vxm->geneve4_tunnel_by_key, key4_0.as_u64); if (PREDICT_TRUE (p0 != NULL)) @@ -266,7 +266,7 @@ geneve_input (vlib_main_t * vm, { key6_0.remote.as_u64[0] = ip6_0->src_address.as_u64[0]; key6_0.remote.as_u64[1] = ip6_0->src_address.as_u64[1]; - key6_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key6_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure GENEVE tunnel exist according to packet SIP and VNI */ if (PREDICT_FALSE @@ -303,7 +303,7 @@ geneve_input (vlib_main_t * vm, { key6_0.remote.as_u64[0] = ip6_0->dst_address.as_u64[0]; key6_0.remote.as_u64[1] = ip6_0->dst_address.as_u64[1]; - key6_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key6_0.vni = vnet_get_geneve_vni_network_order (geneve0); p0 = hash_get_mem (vxm->geneve6_tunnel_by_key, &key6_0); if (PREDICT_TRUE (p0 != NULL)) { @@ -380,7 +380,7 @@ geneve_input (vlib_main_t * vm, if (is_ip4) { key4_1.remote = ip4_1->src_address.as_u32; - key4_1.vni = vnet_get_geneve_vni_bigendian (geneve1); + key4_1.vni = vnet_get_geneve_vni_network_order (geneve1); /* Make sure unicast GENEVE tunnel exist by packet SIP and VNI */ if (PREDICT_FALSE (key4_1.as_u64 != last_key4.as_u64)) @@ -415,7 +415,7 @@ geneve_input (vlib_main_t * vm, (ip4_address_is_multicast (&ip4_1->dst_address))) { key4_1.remote = ip4_1->dst_address.as_u32; - key4_1.vni = vnet_get_geneve_vni_bigendian (geneve1); + key4_1.vni = vnet_get_geneve_vni_network_order (geneve1); /* Make sure mcast GENEVE tunnel exist by packet DIP and VNI */ p1 = hash_get (vxm->geneve4_tunnel_by_key, key4_1.as_u64); if (PREDICT_TRUE (p1 != NULL)) @@ -433,7 +433,7 @@ geneve_input (vlib_main_t * vm, { key6_1.remote.as_u64[0] = ip6_1->src_address.as_u64[0]; key6_1.remote.as_u64[1] = ip6_1->src_address.as_u64[1]; - key6_1.vni = vnet_get_geneve_vni_bigendian (geneve1); + key6_1.vni = vnet_get_geneve_vni_network_order (geneve1); /* Make sure GENEVE tunnel exist according to packet SIP and VNI */ if (PREDICT_FALSE @@ -472,7 +472,7 @@ geneve_input (vlib_main_t * vm, { key6_1.remote.as_u64[0] = ip6_1->dst_address.as_u64[0]; key6_1.remote.as_u64[1] = ip6_1->dst_address.as_u64[1]; - key6_1.vni = vnet_get_geneve_vni_bigendian (geneve1); + key6_1.vni = vnet_get_geneve_vni_network_order (geneve1); p1 = hash_get_mem (vxm->geneve6_tunnel_by_key, &key6_1); if (PREDICT_TRUE (p1 != NULL)) { @@ -618,7 +618,7 @@ geneve_input (vlib_main_t * vm, if (is_ip4) { key4_0.remote = ip4_0->src_address.as_u32; - key4_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key4_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure unicast GENEVE tunnel exist by packet SIP and VNI */ if (PREDICT_FALSE (key4_0.as_u64 != last_key4.as_u64)) @@ -653,7 +653,7 @@ geneve_input (vlib_main_t * vm, (ip4_address_is_multicast (&ip4_0->dst_address))) { key4_0.remote = ip4_0->dst_address.as_u32; - key4_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key4_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure mcast GENEVE tunnel exist by packet DIP and VNI */ p0 = hash_get (vxm->geneve4_tunnel_by_key, key4_0.as_u64); if (PREDICT_TRUE (p0 != NULL)) @@ -671,7 +671,7 @@ geneve_input (vlib_main_t * vm, { key6_0.remote.as_u64[0] = ip6_0->src_address.as_u64[0]; key6_0.remote.as_u64[1] = ip6_0->src_address.as_u64[1]; - key6_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key6_0.vni = vnet_get_geneve_vni_network_order (geneve0); /* Make sure GENEVE tunnel exist according to packet SIP and VNI */ if (PREDICT_FALSE @@ -708,7 +708,7 @@ geneve_input (vlib_main_t * vm, { key6_0.remote.as_u64[0] = ip6_0->dst_address.as_u64[0]; key6_0.remote.as_u64[1] = ip6_0->dst_address.as_u64[1]; - key6_0.vni = vnet_get_geneve_vni_bigendian (geneve0); + key6_0.vni = vnet_get_geneve_vni_network_order (geneve0); p0 = hash_get_mem (vxm->geneve6_tunnel_by_key, &key6_0); if (PREDICT_TRUE (p0 != NULL)) { @@ -1262,24 +1262,17 @@ VLIB_NODE_FN (ip4_geneve_bypass_node) (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_geneve_bypass_node) = { - .name = "ip4-geneve-bypass",.vector_size = - sizeof (u32),.n_next_nodes = IP_GENEVE_BYPASS_N_NEXT,.next_nodes = + .name = "ip4-geneve-bypass", + .vector_size = sizeof (u32), + .n_next_nodes = IP_GENEVE_BYPASS_N_NEXT,.next_nodes = { - [IP_GENEVE_BYPASS_NEXT_DROP] = "error-drop", - [IP_GENEVE_BYPASS_NEXT_GENEVE] = "geneve4-input",} -,.format_buffer = format_ip4_header,.format_trace = - format_ip4_forward_next_trace,}; - -#ifndef CLIB_MARCH_VARIANT -/* Dummy init function to get us linked in. */ - clib_error_t *ip4_geneve_bypass_init (vlib_main_t * vm) -{ - return 0; -} - -VLIB_INIT_FUNCTION (ip4_geneve_bypass_init); + [IP_GENEVE_BYPASS_NEXT_DROP] = "error-drop", + [IP_GENEVE_BYPASS_NEXT_GENEVE] = "geneve4-input", + }, + .format_buffer = format_ip4_header, + .format_trace = format_ip4_forward_next_trace, +}; /* *INDENT-ON* */ -#endif /* CLIB_MARCH_VARIANT */ VLIB_NODE_FN (ip6_geneve_bypass_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1291,26 +1284,19 @@ VLIB_NODE_FN (ip6_geneve_bypass_node) (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_geneve_bypass_node) = { - .name = "ip6-geneve-bypass",.vector_size = - sizeof (u32),.n_next_nodes = IP_GENEVE_BYPASS_N_NEXT,.next_nodes = + .name = "ip6-geneve-bypass", + .vector_size = sizeof (u32), + .n_next_nodes = IP_GENEVE_BYPASS_N_NEXT, + .next_nodes = { - [IP_GENEVE_BYPASS_NEXT_DROP] = "error-drop", - [IP_GENEVE_BYPASS_NEXT_GENEVE] = "geneve6-input",} -,.format_buffer = format_ip6_header,.format_trace = - format_ip6_forward_next_trace,}; + [IP_GENEVE_BYPASS_NEXT_DROP] = "error-drop", + [IP_GENEVE_BYPASS_NEXT_GENEVE] = "geneve6-input", + }, + .format_buffer = format_ip6_header, + .format_trace = format_ip6_forward_next_trace, +}; /* *INDENT-ON* */ -#ifndef CLIB_MARCH_VARIANT -/* Dummy init function to get us linked in. */ -clib_error_t * -ip6_geneve_bypass_init (vlib_main_t * vm) -{ - return 0; -} - -VLIB_INIT_FUNCTION (ip6_geneve_bypass_init); -#endif /* CLIB_MARCH_VARIANT */ - /* * fd.io coding-style-patch-verification: ON * diff --git a/src/vnet/geneve/geneve.c b/src/vnet/geneve/geneve.c index 0c551a0545e3..f04917a71a44 100644 --- a/src/vnet/geneve/geneve.c +++ b/src/vnet/geneve/geneve.c @@ -321,14 +321,15 @@ vtep_addr_unref (ip46_address_t * ip) return 0; } -typedef CLIB_PACKED (union - { - struct - { - fib_node_index_t mfib_entry_index; - adj_index_t mcast_adj_index; - }; u64 as_u64; - }) mcast_shared_t; +typedef union +{ + struct + { + fib_node_index_t mfib_entry_index; + adj_index_t mcast_adj_index; + }; + u64 as_u64; +} __clib_packed mcast_shared_t; static inline mcast_shared_t mcast_shared_get (ip46_address_t * ip) @@ -381,15 +382,13 @@ int vnet_geneve_add_del_tunnel if (!is_ip6) { key4.remote = a->remote.ip4.as_u32; - key4.vni = - clib_host_to_net_u32 ((a->vni << GENEVE_VNI_SHIFT) & GENEVE_VNI_MASK); + key4.vni = clib_host_to_net_u32 (a->vni << GENEVE_VNI_SHIFT); p = hash_get (vxm->geneve4_tunnel_by_key, key4.as_u64); } else { key6.remote = a->remote.ip6; - key6.vni = - clib_host_to_net_u32 ((a->vni << GENEVE_VNI_SHIFT) & GENEVE_VNI_MASK); + key6.vni = clib_host_to_net_u32 (a->vni << GENEVE_VNI_SHIFT); p = hash_get_mem (vxm->geneve6_tunnel_by_key, &key6); } diff --git a/src/vnet/geneve/geneve_packet.h b/src/vnet/geneve/geneve_packet.h index ab37f5378df8..a0d0687434c8 100644 --- a/src/vnet/geneve/geneve_packet.h +++ b/src/vnet/geneve/geneve_packet.h @@ -137,21 +137,14 @@ typedef struct static inline u32 vnet_get_geneve_vni (geneve_header_t * h) { - return (clib_net_to_host_u32 (h->vni_rsvd & GENEVE_VNI_MASK) >> + return ((clib_net_to_host_u32 (h->vni_rsvd) & GENEVE_VNI_MASK) >> GENEVE_VNI_SHIFT); } -/* - * Return the VNI in network-byte order - * - * To be used in the DECAP phase to create the lookup key (IP + VNI) - */ static inline u32 -vnet_get_geneve_vni_bigendian (geneve_header_t * h) +vnet_get_geneve_vni_network_order (geneve_header_t * h) { - u32 vni_host = vnet_get_geneve_vni (h); - return clib_host_to_net_u32 ((vni_host << GENEVE_VNI_SHIFT) & - GENEVE_VNI_MASK); + return (h->vni_rsvd & clib_net_to_host_u32 (GENEVE_VNI_MASK)); } static inline void diff --git a/src/vnet/gso/gso.c b/src/vnet/gso/gso.c index cf90d22696d1..231196adc5d5 100644 --- a/src/vnet/gso/gso.c +++ b/src/vnet/gso/gso.c @@ -34,9 +34,11 @@ vnet_sw_interface_gso_enable_disable (u32 sw_if_index, u8 enable) em = ðernet_main; si = vnet_get_sw_interface (vnm, sw_if_index); - /* - * only ethernet HW interfaces are supported at this time - */ + if (si->type == VNET_SW_INTERFACE_TYPE_SUB) + { + si = vnet_get_sup_sw_interface (vnm, sw_if_index); + } + if (si->type != VNET_SW_INTERFACE_TYPE_HARDWARE) { return (VNET_API_ERROR_INVALID_VALUE); diff --git a/src/vnet/gso/gso.h b/src/vnet/gso/gso.h index 79869c2644b9..27d4bc765a94 100644 --- a/src/vnet/gso/gso.h +++ b/src/vnet/gso/gso.h @@ -51,20 +51,6 @@ vnet_gso_header_offset_parser (vlib_buffer_t * b0, int is_ip6) u8 l4_proto = 0; u8 l4_hdr_sz = 0; - if (PREDICT_TRUE ((b0->flags & (VNET_BUFFER_F_L2_HDR_OFFSET_VALID | - VNET_BUFFER_F_L3_HDR_OFFSET_VALID | - VNET_BUFFER_F_L4_HDR_OFFSET_VALID)) == - (VNET_BUFFER_F_L2_HDR_OFFSET_VALID | - VNET_BUFFER_F_L3_HDR_OFFSET_VALID | - VNET_BUFFER_F_L4_HDR_OFFSET_VALID))) - { - gho.l2_hdr_offset = vnet_buffer (b0)->l2_hdr_offset; - gho.l3_hdr_offset = vnet_buffer (b0)->l3_hdr_offset; - gho.l4_hdr_offset = vnet_buffer (b0)->l4_hdr_offset; - gho.l4_hdr_sz = vnet_buffer2 (b0)->gso_l4_hdr_sz; - return gho; - } - ethernet_header_t *eh = (ethernet_header_t *) vlib_buffer_get_current (b0); u16 ethertype = clib_net_to_host_u16 (eh->type); u16 l2hdr_sz = sizeof (ethernet_header_t); diff --git a/src/vnet/gso/node.c b/src/vnet/gso/node.c index a48a8b69a23b..89520f5b7fdb 100644 --- a/src/vnet/gso/node.c +++ b/src/vnet/gso/node.c @@ -55,17 +55,38 @@ static_always_inline u16 tso_alloc_tx_bufs (vlib_main_t * vm, vnet_interface_per_thread_data_t * ptd, vlib_buffer_t * b0, u32 n_bytes_b0, u16 l234_sz, - u16 gso_size, gso_header_offset_t * gho) + u16 gso_size, u16 first_data_size, + gso_header_offset_t * gho) { - u16 size = + + u16 n_alloc, size; + u16 first_packet_length = l234_sz + first_data_size; + + /* + * size is the amount of data per segmented buffer except the 1st + * segmented buffer. + * l2_hdr_offset is an offset == current_data of vlib_buffer_t. + * l234_sz is hdr_sz from l2_hdr_offset. + */ + size = clib_min (gso_size, vlib_buffer_get_default_data_size (vm) - l234_sz - gho->l2_hdr_offset); - /* rounded-up division */ - u16 n_bufs = (n_bytes_b0 - l234_sz + (size - 1)) / size; - u16 n_alloc; + /* + * First segmented buffer length is calculated separately. + * As it may contain less data than gso_size (when gso_size is + * greater than current_length of 1st buffer from GSO chained + * buffers) and/or size calculated above. + */ + u16 n_bufs = 1; + + /* + * Total packet length minus first packet length including l234 header. + * rounded-up division + */ + ASSERT (n_bytes_b0 > first_packet_length); + n_bufs += ((n_bytes_b0 - first_packet_length + (size - 1)) / size); - ASSERT (n_bufs > 0); vec_validate (ptd->split_buffers, n_bufs - 1); n_alloc = vlib_buffer_alloc (vm, ptd->split_buffers, n_bufs); @@ -126,12 +147,10 @@ tso_fixup_segmented_buf (vlib_buffer_t * b0, u8 tcp_flags, int is_ip6, if (is_ip6) ip6->payload_length = - clib_host_to_net_u16 (b0->current_length - - (gho->l4_hdr_offset - gho->l2_hdr_offset)); + clib_host_to_net_u16 (b0->current_length - gho->l4_hdr_offset); else ip4->length = - clib_host_to_net_u16 (b0->current_length - - (gho->l3_hdr_offset - gho->l2_hdr_offset)); + clib_host_to_net_u16 (b0->current_length - gho->l3_hdr_offset); } /** @@ -166,12 +185,13 @@ tso_segment_buffer (vlib_main_t * vm, vnet_interface_per_thread_data_t * ptd, u32 default_bflags = sb0->flags & ~(VNET_BUFFER_F_GSO | VLIB_BUFFER_NEXT_PRESENT); - u16 l234_sz = gho->l4_hdr_offset + l4_hdr_sz - gho->l2_hdr_offset; + u16 l234_sz = gho->l4_hdr_offset + l4_hdr_sz; int first_data_size = clib_min (gso_size, sb0->current_length - l234_sz); next_tcp_seq += first_data_size; if (PREDICT_FALSE - (!tso_alloc_tx_bufs (vm, ptd, sb0, n_bytes_b0, l234_sz, gso_size, gho))) + (!tso_alloc_tx_bufs + (vm, ptd, sb0, n_bytes_b0, l234_sz, gso_size, first_data_size, gho))) return 0; vlib_buffer_t *b0 = vlib_get_buffer (vm, ptd->split_buffers[0]); @@ -489,6 +509,7 @@ vnet_gso_node_inline (vlib_main_t * vm, { sbi0 = to_next[0] = from_seg[0]; sb0 = vlib_get_buffer (vm, sbi0); + ASSERT (sb0->current_length > 0); to_next += 1; from_seg += 1; n_left_to_next -= 1; @@ -509,6 +530,7 @@ vnet_gso_node_inline (vlib_main_t * vm, { sbi0 = to_next[0] = from_seg[0]; sb0 = vlib_get_buffer (vm, sbi0); + ASSERT (sb0->current_length > 0); to_next += 1; from_seg += 1; n_left_to_next -= 1; diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c index fe3426cb8275..5197c60115f3 100644 --- a/src/vnet/interface_api.c +++ b/src/vnet/interface_api.c @@ -1003,6 +1003,7 @@ static void vl_api_sw_interface_set_rx_mode_t_handler vnet_sw_interface_t *si; clib_error_t *error; int rv = 0; + vnet_hw_interface_rx_mode rx_mode; VALIDATE_SW_IF_INDEX (mp); @@ -1013,11 +1014,12 @@ static void vl_api_sw_interface_set_rx_mode_t_handler goto bad_sw_if_index; } + rx_mode = (vnet_hw_interface_rx_mode) ntohl (mp->mode); error = set_hw_interface_change_rx_mode (vnm, si->hw_if_index, mp->queue_id_valid, ntohl (mp->queue_id), (vnet_hw_interface_rx_mode) - mp->mode); + rx_mode); if (error) { @@ -1045,7 +1047,7 @@ send_interface_rx_placement_details (vpe_api_main_t * am, mp->sw_if_index = htonl (sw_if_index); mp->queue_id = htonl (queue_id); mp->worker_id = htonl (worker_id); - mp->mode = mode; + mp->mode = htonl (mode); mp->context = context; vl_api_send_msg (rp, (u8 *) mp); diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c index 8fb315b4846a..2e5714c3c0f8 100644 --- a/src/vnet/interface_cli.c +++ b/src/vnet/interface_cli.c @@ -1954,7 +1954,7 @@ vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t * a) /* Classify filter specified, but no classify filter configured */ if ((a->rx_enable + a->tx_enable + a->drop_enable) && a->filter && - (set->table_indices[0] == ~0)) + (set->table_indices == 0 || set->table_indices[0] == ~0)) return VNET_API_ERROR_NO_SUCH_LABEL; if (a->rx_enable + a->tx_enable + a->drop_enable) diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c index d8c386dd527a..6af76d262a4e 100644 --- a/src/vnet/ip-neighbor/ip_neighbor.c +++ b/src/vnet/ip-neighbor/ip_neighbor.c @@ -615,6 +615,13 @@ ip_neighbor_update (vnet_main_t * vnm, adj_index_t ai) * wouldn't be bad either, but that's more code than i'm prepared to * write at this time for relatively little reward. */ + /* + * adj_nbr_update_rewrite may actually call fib_walk_sync. + * fib_walk_sync may allocate a new adjacency and potentially cause + * a realloc for adj_pool. When that happens, adj pointer is no + * longer valid here.x We refresh adj pointer accordingly. + */ + adj = adj_get (ai); ip_neighbor_probe (adj); } break; diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 69ae86d5b2cc..f7f7b780fc8f 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -1021,31 +1021,23 @@ u16 ip6_tcp_udp_icmp_compute_checksum (vlib_main_t * vm, vlib_buffer_t * p0, ip6_header_t * ip0, int *bogus_lengthp) { - ip_csum_t sum0; - u16 payload_length_host_byte_order; + ip_csum_t sum0 = 0; + u16 payload_length, payload_length_host_byte_order; u32 i; u32 headers_size = sizeof (ip0[0]); u8 *data_this_buffer; + u8 next_hdr = ip0->protocol; ASSERT (bogus_lengthp); *bogus_lengthp = 0; - /* Initialize checksum with ip header. */ - sum0 = ip0->payload_length + clib_host_to_net_u16 (ip0->protocol); payload_length_host_byte_order = clib_net_to_host_u16 (ip0->payload_length); data_this_buffer = (u8 *) (ip0 + 1); - - for (i = 0; i < ARRAY_LEN (ip0->src_address.as_uword); i++) - { - sum0 = ip_csum_with_carry - (sum0, clib_mem_unaligned (&ip0->src_address.as_uword[i], uword)); - sum0 = ip_csum_with_carry - (sum0, clib_mem_unaligned (&ip0->dst_address.as_uword[i], uword)); - } + payload_length = ip0->payload_length; /* some icmp packets may come with a "router alert" hop-by-hop extension header (e.g., mldv2 packets) * or UDP-Ping packets */ - if (PREDICT_FALSE (ip0->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS)) + if (PREDICT_FALSE (next_hdr == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS)) { u32 skip_bytes; ip6_hop_by_hop_ext_t *ext_hdr = @@ -1060,6 +1052,24 @@ ip6_tcp_udp_icmp_compute_checksum (vlib_main_t * vm, vlib_buffer_t * p0, payload_length_host_byte_order -= skip_bytes; headers_size += skip_bytes; + + /* pseudo-header adjustments: + * exclude ext header bytes from payload length + * use payload IP proto rather than ext header IP proto + */ + payload_length = clib_host_to_net_u16 (payload_length_host_byte_order); + next_hdr = ext_hdr->next_hdr; + } + + /* Initialize checksum with ip pseudo-header. */ + sum0 = payload_length + clib_host_to_net_u16 (next_hdr); + + for (i = 0; i < ARRAY_LEN (ip0->src_address.as_uword); i++) + { + sum0 = ip_csum_with_carry + (sum0, clib_mem_unaligned (&ip0->src_address.as_uword[i], uword)); + sum0 = ip_csum_with_carry + (sum0, clib_mem_unaligned (&ip0->dst_address.as_uword[i], uword)); } if (p0) diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 3b30fb9ce5ef..a0cb28b89065 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -640,7 +640,6 @@ VLIB_CLI_COMMAND (ip4_table_command, static) = { .path = "ip table", .short_help = "ip table [add|del] ", .function = vnet_ip4_table_cmd, - .is_mp_safe = 1, }; /* *INDENT-ON* */ @@ -656,7 +655,6 @@ VLIB_CLI_COMMAND (ip6_table_command, static) = { .path = "ip6 table", .short_help = "ip6 table [add|del] ", .function = vnet_ip6_table_cmd, - .is_mp_safe = 1, }; static clib_error_t * diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c index ebc2c4be417b..af82a06eb2b3 100644 --- a/src/vnet/ip6-nd/ip6_ra.c +++ b/src/vnet/ip6-nd/ip6_ra.c @@ -559,13 +559,18 @@ icmp6_router_solicitation (vlib_main_t * vm, } h.unused = 0; - clib_warning ("Prefix %U valid %u preferred %u", - format_ip6_address, &pr_info->prefix, - clib_net_to_host_u32 (h.valid_time), - clib_net_to_host_u32 (h.preferred_time)); + /* Handy for debugging, but too noisy... */ + if (0 && CLIB_DEBUG > 0) + clib_warning + ("send RA for prefix %U/%d " + "sw_if_index %d valid %u preferred %u", + format_ip6_address, &pr_info->prefix, + pr_info->prefix_len, sw_if_index0, + clib_net_to_host_u32 (h.valid_time), + clib_net_to_host_u32 (h.preferred_time)); if (h.valid_time == 0) - clib_warning ("WARNING: valid_time 0!!!"); + clib_warning ("BUG: send RA with valid_time 0"); clib_memcpy(&h.dst_address, &pr_info->prefix, sizeof(ip6_address_t)); @@ -1214,6 +1219,9 @@ check_send_rs (vlib_main_t * vm, ip6_ra_t * radv_info, f64 current_time, next_index = ip6_rewrite_mcast_node.index; c0 = vlib_buffer_copy (vm, p0); + if (c0 == NULL) + return radv_info->keep_sending_rs; + ci0 = vlib_get_buffer_index (vm, c0); f = vlib_get_frame_to_node (vm, next_index); @@ -1414,6 +1422,66 @@ ip6_ra_delegate_disable (index_t rai) pool_put (ip6_ra_pool, radv_info); } +void +ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len, + u32 primary_sw_if_index, + u32 valid_time, u32 preferred_time) +{ + vlib_main_t *vm = vlib_get_main (); + static u32 *radv_indices; + ip6_ra_t *radv_info; + int i; + ip6_address_t mask; + ip6_address_mask_from_width (&mask, prefix_len); + + vec_reset_length (radv_indices); + /* *INDENT-OFF* */ + pool_foreach (radv_info, ip6_ra_pool, + ({ + vec_add1 (radv_indices, radv_info - ip6_ra_pool); + })); + /* *INDENT-ON* */ + + /* + * If we have another customer for this prefix, + * tell the RA code about it... + */ + for (i = 0; i < vec_len (radv_indices); i++) + { + ip6_radv_prefix_t *this_prefix; + radv_info = pool_elt_at_index (ip6_ra_pool, radv_indices[i]); + + /* We already took care of these timers... */ + if (radv_info->sw_if_index == primary_sw_if_index) + continue; + + /* *INDENT-OFF* */ + pool_foreach (this_prefix, radv_info->adv_prefixes_pool, + ({ + if (this_prefix->prefix_len == prefix_len + && ip6_address_is_equal_masked (&this_prefix->prefix, address, + &mask)) + { + int rv = ip6_ra_prefix (vm, + radv_info->sw_if_index, + address, + prefix_len, + 0 /* use_default */, + valid_time, + preferred_time, + 0 /* no_advertise */, + 0 /* off_link */, + 0 /* no_autoconfig */, + 0 /* no_onlink */, + 0 /* is_no */); + if (rv != 0) + clib_warning ("ip6_neighbor_ra_prefix returned %d", rv); + } + })); + /* *INDENT-ON*/ + } +} + /* send a RA or update the timer info etc.. */ static uword ip6_ra_process_timer_event (vlib_main_t * vm, @@ -1882,34 +1950,28 @@ ip6_ra_cmd (vlib_main_t * vm, unformat_ip6_address, &ip6_addr, &addr_len)) { add_radv_info = 0; - break; } else if (unformat (line_input, "ra-managed-config-flag")) { managed = 1; - break; } else if (unformat (line_input, "ra-other-config-flag")) { other = 1; - break; } else if (unformat (line_input, "ra-suppress") || unformat (line_input, "ra-surpress")) { suppress = 1; - break; } else if (unformat (line_input, "ra-suppress-link-layer") || unformat (line_input, "ra-surpress-link-layer")) { suppress_ll_option = 1; - break; } else if (unformat (line_input, "ra-send-unicast")) { send_unicast = 1; - break; } else if (unformat (line_input, "ra-lifetime")) { @@ -1919,7 +1981,6 @@ ip6_ra_cmd (vlib_main_t * vm, goto done; } use_lifetime = 1; - break; } else if (unformat (line_input, "ra-initial")) { @@ -1929,7 +1990,6 @@ ip6_ra_cmd (vlib_main_t * vm, error = unformat_parse_error (line_input); goto done; } - break; } else if (unformat (line_input, "ra-interval")) { @@ -1941,12 +2001,10 @@ ip6_ra_cmd (vlib_main_t * vm, if (!unformat (line_input, "%d", &ra_min_interval)) ra_min_interval = 0; - break; } else if (unformat (line_input, "ra-cease")) { cease = 1; - break; } else { diff --git a/src/vnet/ip6-nd/ip6_ra.h b/src/vnet/ip6-nd/ip6_ra.h index 4efd92e6968e..d09e8c0c9752 100644 --- a/src/vnet/ip6-nd/ip6_ra.h +++ b/src/vnet/ip6-nd/ip6_ra.h @@ -77,6 +77,11 @@ typedef void (*ip6_ra_report_notify_t) (const ip6_ra_report_t * rap); extern void ip6_ra_report_register (ip6_ra_report_notify_t fn); extern void ip6_ra_report_unregister (ip6_ra_report_notify_t fn); +extern void ip6_ra_update_secondary_radv_info (ip6_address_t * address, + u8 prefix_len, + u32 primary_sw_if_index, + u32 valid_time, + u32 preferred_time); #endif /* included_ip6_neighbor_h */ diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index ee53b018552c..56724c002395 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -506,6 +507,7 @@ esp_decrypt_inline (vlib_main_t * vm, switch (clib_net_to_host_u16 (gre->protocol)) { case GRE_PROTOCOL_teb: + vnet_update_l2_len (b[0]); next[0] = ESP_DECRYPT_NEXT_L2_INPUT; break; case GRE_PROTOCOL_ip4: diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c index 1075fe48d84a..c6511fd9b032 100644 --- a/src/vnet/ipsec/ipsec.c +++ b/src/vnet/ipsec/ipsec.c @@ -167,9 +167,11 @@ ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im, const char *esp4_encrypt_node_name, const char *esp4_encrypt_node_tun_name, const char *esp4_decrypt_node_name, + const char *esp4_decrypt_tun_node_name, const char *esp6_encrypt_node_name, const char *esp6_encrypt_node_tun_name, const char *esp6_decrypt_node_name, + const char *esp6_decrypt_tun_node_name, check_support_cb_t esp_check_support_cb, add_del_sa_sess_cb_t esp_add_del_sa_sess_cb) { @@ -186,6 +188,12 @@ ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im, &b->esp6_encrypt_node_index, &b->esp6_encrypt_next_index); ipsec_add_node (vm, esp6_decrypt_node_name, "ipsec6-input-feature", &b->esp6_decrypt_node_index, &b->esp6_decrypt_next_index); + ipsec_add_node (vm, esp4_decrypt_tun_node_name, "ipsec4-tun-input", + &b->esp4_decrypt_tun_node_index, + &b->esp4_decrypt_tun_next_index); + ipsec_add_node (vm, esp6_decrypt_tun_node_name, "ipsec6-tun-input", + &b->esp6_decrypt_tun_node_index, + &b->esp6_decrypt_tun_next_index); ipsec_add_feature ("ip4-output", esp4_encrypt_node_tun_name, &b->esp44_encrypt_tun_feature_index); @@ -255,6 +263,10 @@ ipsec_select_esp_backend (ipsec_main_t * im, u32 backend_idx) im->esp6_decrypt_node_index = b->esp6_decrypt_node_index; im->esp6_encrypt_next_index = b->esp6_encrypt_next_index; im->esp6_decrypt_next_index = b->esp6_decrypt_next_index; + im->esp4_decrypt_tun_node_index = b->esp4_decrypt_tun_node_index; + im->esp4_decrypt_tun_next_index = b->esp4_decrypt_tun_next_index; + im->esp6_decrypt_tun_node_index = b->esp6_decrypt_tun_node_index; + im->esp6_decrypt_tun_next_index = b->esp6_decrypt_tun_next_index; im->esp44_encrypt_tun_feature_index = b->esp44_encrypt_tun_feature_index; im->esp64_encrypt_tun_feature_index = b->esp64_encrypt_tun_feature_index; @@ -303,9 +315,11 @@ ipsec_init (vlib_main_t * vm) "esp4-encrypt", "esp4-encrypt-tun", "esp4-decrypt", + "esp4-decrypt-tun", "esp6-encrypt", "esp6-encrypt-tun", "esp6-decrypt", + "esp6-decrypt-tun", ipsec_check_esp_support, NULL); im->esp_default_backend = idx; diff --git a/src/vnet/ipsec/ipsec.h b/src/vnet/ipsec/ipsec.h index 65b888e51a2d..0c3e5778e6d2 100644 --- a/src/vnet/ipsec/ipsec.h +++ b/src/vnet/ipsec/ipsec.h @@ -61,6 +61,10 @@ typedef struct u32 esp6_decrypt_node_index; u32 esp6_encrypt_next_index; u32 esp6_decrypt_next_index; + u32 esp4_decrypt_tun_node_index; + u32 esp4_decrypt_tun_next_index; + u32 esp6_decrypt_tun_node_index; + u32 esp6_decrypt_tun_next_index; u32 esp44_encrypt_tun_feature_index; u32 esp46_encrypt_tun_feature_index; u32 esp66_encrypt_tun_feature_index; @@ -120,19 +124,23 @@ typedef struct u32 error_drop_node_index; u32 esp4_encrypt_node_index; u32 esp4_decrypt_node_index; + u32 esp4_decrypt_tun_node_index; u32 ah4_encrypt_node_index; u32 ah4_decrypt_node_index; u32 esp6_encrypt_node_index; u32 esp6_decrypt_node_index; + u32 esp6_decrypt_tun_node_index; u32 ah6_encrypt_node_index; u32 ah6_decrypt_node_index; /* next node indices */ u32 esp4_encrypt_next_index; u32 esp4_decrypt_next_index; + u32 esp4_decrypt_tun_next_index; u32 ah4_encrypt_next_index; u32 ah4_decrypt_next_index; u32 esp6_encrypt_next_index; u32 esp6_decrypt_next_index; + u32 esp6_decrypt_tun_next_index; u32 ah6_encrypt_next_index; u32 ah6_decrypt_next_index; @@ -248,9 +256,11 @@ u32 ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im, const char *esp4_encrypt_node_name, const char *esp4_encrypt_tun_node_name, const char *esp4_decrypt_node_name, + const char *esp4_decrypt_tun_node_name, const char *esp6_encrypt_node_name, const char *esp6_encrypt_tun_node_name, const char *esp6_decrypt_node_name, + const char *esp6_decrypt_tun_node_name, check_support_cb_t esp_check_support_cb, add_del_sa_sess_cb_t esp_add_del_sa_sess_cb); diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c index 4252acd26884..b86de045fc9f 100644 --- a/src/vnet/ipsec/ipsec_api.c +++ b/src/vnet/ipsec/ipsec_api.c @@ -990,13 +990,6 @@ ipsec_api_hookup (vlib_main_t * vm) foreach_vpe_api_msg; #undef _ - /* - * Adding and deleting SAs is MP safe since when they are added/delete - * no traffic is using them - */ - am->is_mp_safe[VL_API_IPSEC_SAD_ENTRY_ADD_DEL] = 1; - am->is_mp_safe[VL_API_IPSEC_SAD_ENTRY_ADD_DEL_REPLY] = 1; - /* * Set up the (msg_name, crc, message-id) table */ diff --git a/src/vnet/ipsec/ipsec_tun_in.c b/src/vnet/ipsec/ipsec_tun_in.c index e6ad67b433a4..35d268f58bc6 100644 --- a/src/vnet/ipsec/ipsec_tun_in.c +++ b/src/vnet/ipsec/ipsec_tun_in.c @@ -55,8 +55,7 @@ typedef enum ipsec_tun_next_t_ #define _(v, s) IPSEC_TUN_PROTECT_NEXT_##v, foreach_ipsec_input_next #undef _ - IPSEC_TUN_PROTECT_NEXT_DECRYPT, - IPSEC_TUN_PROTECT_N_NEXT, + IPSEC_TUN_PROTECT_N_NEXT, } ipsec_tun_next_t; typedef struct @@ -311,7 +310,7 @@ ipsec_tun_protect_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, n_bytes = len0; } - next[0] = IPSEC_TUN_PROTECT_NEXT_DECRYPT; + next[0] = im->esp4_decrypt_tun_next_index; //IPSEC_TUN_PROTECT_NEXT_DECRYPT; } trace00: if (PREDICT_FALSE (is_trace)) @@ -358,8 +357,7 @@ VLIB_NODE_FN (ipsec4_tun_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { - return ipsec_tun_protect_input_inline (vm, node, from_frame, - 0 /* is_ip6 */ ); + return ipsec_tun_protect_input_inline (vm, node, from_frame, 0); } /* *INDENT-OFF* */ @@ -374,7 +372,6 @@ VLIB_REGISTER_NODE (ipsec4_tun_input_node) = { .next_nodes = { [IPSEC_TUN_PROTECT_NEXT_DROP] = "ip4-drop", [IPSEC_TUN_PROTECT_NEXT_PUNT] = "punt-dispatch", - [IPSEC_TUN_PROTECT_NEXT_DECRYPT] = "esp4-decrypt-tun", } }; /* *INDENT-ON* */ @@ -383,8 +380,7 @@ VLIB_NODE_FN (ipsec6_tun_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { - return ipsec_tun_protect_input_inline (vm, node, from_frame, - 1 /* is_ip6 */ ); + return ipsec_tun_protect_input_inline (vm, node, from_frame, 1); } /* *INDENT-OFF* */ @@ -399,7 +395,6 @@ VLIB_REGISTER_NODE (ipsec6_tun_input_node) = { .next_nodes = { [IPSEC_TUN_PROTECT_NEXT_DROP] = "ip6-drop", [IPSEC_TUN_PROTECT_NEXT_PUNT] = "punt-dispatch", - [IPSEC_TUN_PROTECT_NEXT_DECRYPT] = "esp6-decrypt-tun", } }; /* *INDENT-ON* */ diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c index 10e087767e44..b5eb5fe6381a 100644 --- a/src/vnet/l2/l2_flood.c +++ b/src/vnet/l2/l2_flood.c @@ -230,6 +230,13 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm, if (PREDICT_FALSE (n_cloned != n_clones)) { b0->error = node->errors[L2FLOOD_ERROR_REPL_FAIL]; + /* Worst-case, no clones, consume the original buf */ + if (n_cloned == 0) + { + ci0 = bi0; + member = msm->members[thread_index][0]; + goto use_original_buffer; + } } /* @@ -284,6 +291,7 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm, member = msm->members[thread_index][0]; } + use_original_buffer: /* * the last clone that might go to a BVI */ @@ -306,8 +314,6 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm, clib_memcpy_fast (t->src, h0->src_address, 6); clib_memcpy_fast (t->dst, h0->dst_address, 6); } - - /* Forward packet to the current member */ if (PREDICT_FALSE (member->flags & L2_FLOOD_MEMBER_BVI)) { diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 0b66cf87c4dc..39ddf3ff274f 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -1520,7 +1520,7 @@ session_manager_main_enable (vlib_main_t * vm) wrk->new_head = clib_llist_make_head (wrk->event_elts, evt_list); wrk->old_head = clib_llist_make_head (wrk->event_elts, evt_list); wrk->vm = vlib_mains[i]; - wrk->last_vlib_time = vlib_time_now (vlib_mains[i]); + wrk->last_vlib_time = vlib_time_now (vm); wrk->last_vlib_us_time = wrk->last_vlib_time * CLIB_US_TIME_FREQ; if (num_threads > 1) diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 540f6e6d7470..bc22cc0a98cb 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -501,7 +501,7 @@ format_session_queue_trace (u8 * s, va_list * args) CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); session_queue_trace_t *t = va_arg (*args, session_queue_trace_t *); - s = format (s, "SESSION_QUEUE: session index %d, server thread index %d", + s = format (s, "session index %d thread index %d", t->session_index, t->server_thread_index); return s; } @@ -543,7 +543,7 @@ session_tx_trace_frame (vlib_main_t * vm, vlib_node_runtime_t * node, for (i = 0; i < clib_min (n_trace, n_segs); i++) { - b = vlib_get_buffer (vm, to_next[i - n_segs]); + b = vlib_get_buffer (vm, to_next[i]); vlib_trace_buffer (vm, node, next_index, b, 1 /* follow_chain */ ); t = vlib_add_trace (vm, node, b, sizeof (*t)); t->session_index = s->session_index; @@ -1610,6 +1610,7 @@ session_queue_pre_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, session_main_t *sm = &session_main; if (!sm->wrk[0].vpp_event_queue) return 0; + node = vlib_node_get_runtime (vm, session_queue_node.index); return session_queue_node_fn (vm, node, frame); } diff --git a/src/vnet/srv6/sr_doc.md b/src/vnet/srv6/sr_doc.md index cf9c72911eb1..c80a0fc18f7b 100644 --- a/src/vnet/srv6/sr_doc.md +++ b/src/vnet/srv6/sr_doc.md @@ -59,4 +59,5 @@ Available SRv6 plugins include: - @subpage srv6_as_plugin_doc - @subpage srv6_ad_plugin_doc - @subpage srv6_am_plugin_doc +- @subpage srv6_mobile_plugin_doc diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 915675c11ed6..bbcf671c7b77 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1036,7 +1036,7 @@ format_tcp_vars (u8 * s, va_list * args) return s; } -static u8 * +u8 * format_tcp_connection_id (u8 * s, va_list * args) { tcp_connection_t *tc = va_arg (*args, tcp_connection_t *); @@ -1535,13 +1535,14 @@ tcp_expired_timers_dispatch (u32 * expired_timers) static void tcp_initialize_timer_wheels (tcp_main_t * tm) { + vlib_main_t *vm = vlib_get_main (); tw_timer_wheel_16t_2w_512sl_t *tw; /* *INDENT-OFF* */ foreach_vlib_main (({ tw = &tm->wrk_ctx[ii].timer_wheel; tw_timer_wheel_init_16t_2w_512sl (tw, tcp_expired_timers_dispatch, TCP_TIMER_TICK, ~0); - tw->last_run_time = vlib_time_now (this_vlib_main); + tw->last_run_time = vlib_time_now (vm); })); /* *INDENT-ON* */ } diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 52cc308871b3..896a69b83368 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -761,6 +761,7 @@ int tcp_configure_v6_source_address_range (vlib_main_t * vm, ip6_address_t * end, u32 table_id); void tcp_api_reference (void); u8 *format_tcp_connection (u8 * s, va_list * args); +u8 *format_tcp_connection_id (u8 * s, va_list * args); always_inline tcp_connection_t * tcp_listener_get (u32 tli) diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index cf74fb91ce14..46d82ef82227 100755 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -2029,12 +2029,12 @@ format_tcp_rx_trace (u8 * s, va_list * args) CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); tcp_rx_trace_t *t = va_arg (*args, tcp_rx_trace_t *); + tcp_connection_t *tc = &t->tcp_connection; u32 indent = format_get_indent (s); - s = format (s, "%U\n%U%U", - format_tcp_header, &t->tcp_header, 128, - format_white_space, indent, - format_tcp_connection, &t->tcp_connection, 1); + s = format (s, "%U state %U\n%U%U", format_tcp_connection_id, tc, + format_tcp_state, tc->state, format_white_space, indent, + format_tcp_header, &t->tcp_header, 128); return s; } diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 631b33ae8190..e843c7ea990d 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -55,12 +55,12 @@ format_tcp_tx_trace (u8 * s, va_list * args) CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); tcp_tx_trace_t *t = va_arg (*args, tcp_tx_trace_t *); + tcp_connection_t *tc = &t->tcp_connection; u32 indent = format_get_indent (s); - s = format (s, "%U\n%U%U", - format_tcp_header, &t->tcp_header, 128, - format_white_space, indent, - format_tcp_connection, &t->tcp_connection, 1); + s = format (s, "%U state %U\n%U%U", format_tcp_connection_id, tc, + format_tcp_state, tc->state, format_white_space, indent, + format_tcp_header, &t->tcp_header, 128); return s; } @@ -2223,16 +2223,17 @@ static void tcp46_output_trace_frame (vlib_main_t * vm, vlib_node_runtime_t * node, u32 * to_next, u32 n_bufs) { - u32 n_trace = vlib_get_trace_count (vm, node); tcp_connection_t *tc; tcp_tx_trace_t *t; vlib_buffer_t *b; tcp_header_t *th; int i; - for (i = 0; i < clib_min (n_trace, n_bufs); i++) + for (i = 0; i < n_bufs; i++) { b = vlib_get_buffer (vm, to_next[i]); + if (!(b->flags & VLIB_BUFFER_IS_TRACED)) + continue; th = vlib_buffer_get_current (b); tc = tcp_connection_get (vnet_buffer (b)->tcp.connection_index, vm->thread_index); diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 6e47a79a6164..3c1bb53d5140 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -571,6 +571,8 @@ static void *vl_api_tap_create_v2_t_print s = format (s, "host-ip6-gw %U ", format_ip6_address, mp->host_ip6_prefix.address); + if (mp->num_rx_queues) + s = format (s, "num_rx_queues %u ", mp->num_rx_queues); if (mp->tx_ring_sz) s = format (s, "tx-ring-size %u ", (mp->tx_ring_sz)); if (mp->rx_ring_sz) diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c index 23b4dfcac444..099b85ea5d18 100644 --- a/src/vppinfra/dlmalloc.c +++ b/src/vppinfra/dlmalloc.c @@ -1249,7 +1249,7 @@ static struct malloc_state _gm_; #define disable_expand(M) ((M)->mflags |= USE_NOEXPAND_BIT) #define use_trace(M) ((M)->mflags & USE_TRACE_BIT) #define enable_trace(M) ((M)->mflags |= USE_TRACE_BIT) -#define disable_trace(M) ((M)->mflags |= USE_TRACE_BIT) +#define disable_trace(M) ((M)->mflags &= ~USE_TRACE_BIT) #define set_lock(M,L)\ ((M)->mflags = (L)?\ diff --git a/src/vppinfra/pool.c b/src/vppinfra/pool.c index ed04eb68e31b..30848d558485 100644 --- a/src/vppinfra/pool.c +++ b/src/vppinfra/pool.c @@ -55,9 +55,7 @@ _pool_init_fixed (void **pool_ptr, u32 elt_size, u32 max_elts) ASSERT (elt_size); ASSERT (max_elts); - vector_size = pool_aligned_header_bytes + vec_header_bytes (0) - + (u64) elt_size *max_elts; - + vector_size = pool_aligned_header_bytes + (u64) elt_size *max_elts; free_index_size = vec_header_bytes (0) + sizeof (u32) * max_elts; /* Round up to a cache line boundary */ diff --git a/src/vppinfra/tw_timer_template.c b/src/vppinfra/tw_timer_template.c index 9ad74624521a..07e300f5eac0 100644 --- a/src/vppinfra/tw_timer_template.c +++ b/src/vppinfra/tw_timer_template.c @@ -476,7 +476,7 @@ void TW (tw_timer_wheel_free) (TWT (tw_timer_wheel) * tw) } } -#if TW_OVERFLOW_VECVOR > 0 +#if TW_OVERFLOW_VECTOR > 0 ts = &tw->overflow; head = pool_elt_at_index (tw->timers, ts->head_index); next_index = head->next; diff --git a/test/Makefile b/test/Makefile index cbdcff1a2d5d..a9202b1726f6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -270,10 +270,8 @@ wipe: reset @rm -rf $(VENV_PATH) @rm -rf $(patsubst %,%/__pycache__, $(VPP_TEST_DIRS) $(BUILD_TEST_SRC)) -$(TEST_DOC_BR): +$(TEST_DOC_BR): $(PIP_INSTALL_DONE) @mkdir -p $@ - @bash -c "source $(VENV_PATH)/bin/activate && \ - $(PYTHON_INTERP) -m pip install sphinx sphinx-rtd-theme" @bash -c "source $(VENV_PATH)/bin/activate && make -C doc html" .PHONY: doc diff --git a/test/requirements-3.txt b/test/requirements-3.txt index f5dbc22c4c99..a32dc6e1581d 100644 --- a/test/requirements-3.txt +++ b/test/requirements-3.txt @@ -4,77 +4,143 @@ # # make test-refresh-deps (or update requirements.txt) # -asn1crypto==0.24.0 \ - --hash=sha256:2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87 \ - --hash=sha256:9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49 \ - # via cryptography -cffi==1.12.3 \ - --hash=sha256:041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774 \ - --hash=sha256:046ef9a22f5d3eed06334d01b1e836977eeef500d9b78e9ef693f9380ad0b83d \ - --hash=sha256:066bc4c7895c91812eff46f4b1c285220947d4aa46fa0a2651ff85f2afae9c90 \ - --hash=sha256:066c7ff148ae33040c01058662d6752fd73fbc8e64787229ea8498c7d7f4041b \ - --hash=sha256:2444d0c61f03dcd26dbf7600cf64354376ee579acad77aef459e34efcb438c63 \ - --hash=sha256:300832850b8f7967e278870c5d51e3819b9aad8f0a2c8dbe39ab11f119237f45 \ - --hash=sha256:34c77afe85b6b9e967bd8154e3855e847b70ca42043db6ad17f26899a3df1b25 \ - --hash=sha256:46de5fa00f7ac09f020729148ff632819649b3e05a007d286242c4882f7b1dc3 \ - --hash=sha256:4aa8ee7ba27c472d429b980c51e714a24f47ca296d53f4d7868075b175866f4b \ - --hash=sha256:4d0004eb4351e35ed950c14c11e734182591465a33e960a4ab5e8d4f04d72647 \ - --hash=sha256:4e3d3f31a1e202b0f5a35ba3bc4eb41e2fc2b11c1eff38b362de710bcffb5016 \ - --hash=sha256:50bec6d35e6b1aaeb17f7c4e2b9374ebf95a8975d57863546fa83e8d31bdb8c4 \ - --hash=sha256:55cad9a6df1e2a1d62063f79d0881a414a906a6962bc160ac968cc03ed3efcfb \ - --hash=sha256:5662ad4e4e84f1eaa8efce5da695c5d2e229c563f9d5ce5b0113f71321bcf753 \ - --hash=sha256:59b4dc008f98fc6ee2bb4fd7fc786a8d70000d058c2bbe2698275bc53a8d3fa7 \ - --hash=sha256:73e1ffefe05e4ccd7bcea61af76f36077b914f92b76f95ccf00b0c1b9186f3f9 \ - --hash=sha256:a1f0fd46eba2d71ce1589f7e50a9e2ffaeb739fb2c11e8192aa2b45d5f6cc41f \ - --hash=sha256:a2e85dc204556657661051ff4bab75a84e968669765c8a2cd425918699c3d0e8 \ - --hash=sha256:a5457d47dfff24882a21492e5815f891c0ca35fefae8aa742c6c263dac16ef1f \ - --hash=sha256:a8dccd61d52a8dae4a825cdbb7735da530179fea472903eb871a5513b5abbfdc \ - --hash=sha256:ae61af521ed676cf16ae94f30fe202781a38d7178b6b4ab622e4eec8cefaff42 \ - --hash=sha256:b012a5edb48288f77a63dba0840c92d0504aa215612da4541b7b42d849bc83a3 \ - --hash=sha256:d2c5cfa536227f57f97c92ac30c8109688ace8fa4ac086d19d0af47d134e2909 \ - --hash=sha256:d42b5796e20aacc9d15e66befb7a345454eef794fdb0737d1af593447c6c8f45 \ - --hash=sha256:dee54f5d30d775f525894d67b1495625dd9322945e7fee00731952e0368ff42d \ - --hash=sha256:e070535507bd6aa07124258171be2ee8dfc19119c28ca94c9dfb7efd23564512 \ - --hash=sha256:e1ff2748c84d97b065cc95429814cdba39bcbd77c9c85c89344b317dc0d9cbff \ - --hash=sha256:ed851c75d1e0e043cbf5ca9a8e1b13c4c90f3fbd863dacb01c0808e2b5204201 -click==7.0 \ - --hash=sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13 \ - --hash=sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7 \ +alabaster==0.7.12 \ + --hash=sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359 \ + --hash=sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02 \ + # via sphinx +babel==2.8.0 \ + --hash=sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38 \ + --hash=sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4 \ + # via sphinx +certifi==2020.4.5.1 \ + --hash=sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304 \ + --hash=sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519 \ + # via requests +cffi==1.14.0 \ + --hash=sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff \ + --hash=sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b \ + --hash=sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac \ + --hash=sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0 \ + --hash=sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384 \ + --hash=sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26 \ + --hash=sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6 \ + --hash=sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b \ + --hash=sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e \ + --hash=sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd \ + --hash=sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2 \ + --hash=sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66 \ + --hash=sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc \ + --hash=sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8 \ + --hash=sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55 \ + --hash=sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4 \ + --hash=sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5 \ + --hash=sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d \ + --hash=sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78 \ + --hash=sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa \ + --hash=sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793 \ + --hash=sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f \ + --hash=sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a \ + --hash=sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f \ + --hash=sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30 \ + --hash=sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f \ + --hash=sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3 \ + --hash=sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c +chardet==3.0.4 \ + --hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae \ + --hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691 \ + # via requests +click==7.1.1 \ + --hash=sha256:8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc \ + --hash=sha256:e345d143d80bf5ee7534056164e5e112ea5e22716bbb1ce727941f4c8b471b9a \ # via pip-tools -cryptography==2.7 \ - --hash=sha256:24b61e5fcb506424d3ec4e18bca995833839bf13c59fc43e530e488f28d46b8c \ - --hash=sha256:25dd1581a183e9e7a806fe0543f485103232f940fcfc301db65e630512cce643 \ - --hash=sha256:3452bba7c21c69f2df772762be0066c7ed5dc65df494a1d53a58b683a83e1216 \ - --hash=sha256:41a0be220dd1ed9e998f5891948306eb8c812b512dc398e5a01846d855050799 \ - --hash=sha256:5751d8a11b956fbfa314f6553d186b94aa70fdb03d8a4d4f1c82dcacf0cbe28a \ - --hash=sha256:5f61c7d749048fa6e3322258b4263463bfccefecb0dd731b6561cb617a1d9bb9 \ - --hash=sha256:72e24c521fa2106f19623a3851e9f89ddfdeb9ac63871c7643790f872a305dfc \ - --hash=sha256:7b97ae6ef5cba2e3bb14256625423413d5ce8d1abb91d4f29b6d1a081da765f8 \ - --hash=sha256:961e886d8a3590fd2c723cf07be14e2a91cf53c25f02435c04d39e90780e3b53 \ - --hash=sha256:96d8473848e984184b6728e2c9d391482008646276c3ff084a1bd89e15ff53a1 \ - --hash=sha256:ae536da50c7ad1e002c3eee101871d93abdc90d9c5f651818450a0d3af718609 \ - --hash=sha256:b0db0cecf396033abb4a93c95d1602f268b3a68bb0a9cc06a7cff587bb9a7292 \ - --hash=sha256:cfee9164954c186b191b91d4193989ca994703b2fff406f71cf454a2d3c7327e \ - --hash=sha256:e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6 \ - --hash=sha256:f27d93f0139a3c056172ebb5d4f9056e770fdf0206c2f422ff2ebbad142e09ed \ - --hash=sha256:f57b76e46a58b63d1c6375017f4564a28f19a5ca912691fd2e4261b3414b618d -deprecation==2.0.6 \ - --hash=sha256:68071e5ae7cd7e9da6c7dffd750922be4825c7c3a6780d29314076009cc39c35 \ - --hash=sha256:fecd0f05024126466ba7e5309b905f09fce7d25d67e4648f7ec5488f9e764310 +cryptography==2.9 \ + --hash=sha256:0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e \ + --hash=sha256:192ca04a36852a994ef21df13cca4d822adbbdc9d5009c0f96f1d2929e375d4f \ + --hash=sha256:19ae795137682a9778892fb4390c07811828b173741bce91e30f899424b3934d \ + --hash=sha256:1b9b535d6b55936a79dbe4990b64bb16048f48747c76c29713fea8c50eca2acf \ + --hash=sha256:2a2ad24d43398d89f92209289f15265107928f22a8d10385f70def7a698d6a02 \ + --hash=sha256:3be7a5722d5bfe69894d3f7bbed15547b17619f3a88a318aab2e37f457524164 \ + --hash=sha256:49870684da168b90110bbaf86140d4681032c5e6a2461adc7afdd93be5634216 \ + --hash=sha256:587f98ce27ac4547177a0c6fe0986b8736058daffe9160dcf5f1bd411b7fbaa1 \ + --hash=sha256:5aca6f00b2f42546b9bdf11a69f248d1881212ce5b9e2618b04935b87f6f82a1 \ + --hash=sha256:6b744039b55988519cc183149cceb573189b3e46e16ccf6f8c46798bb767c9dc \ + --hash=sha256:6b91cab3841b4c7cb70e4db1697c69f036c8bc0a253edc0baa6783154f1301e4 \ + --hash=sha256:7598974f6879a338c785c513e7c5a4329fbc58b9f6b9a6305035fca5b1076552 \ + --hash=sha256:7a279f33a081d436e90e91d1a7c338553c04e464de1c9302311a5e7e4b746088 \ + --hash=sha256:95e1296e0157361fe2f5f0ed307fd31f94b0ca13372e3673fa95095a627636a1 \ + --hash=sha256:9fc9da390e98cb6975eadf251b6e5fa088820141061bf041cd5c72deba1dc526 \ + --hash=sha256:cc20316e3f5a6b582fc3b029d8dc03aabeb645acfcb7fc1d9848841a33265748 \ + --hash=sha256:d1bf5a1a0d60c7f9a78e448adcb99aa101f3f9588b16708044638881be15d6bc \ + --hash=sha256:ed1d0760c7e46436ec90834d6f10477ff09475c692ed1695329d324b2c5cd547 \ + --hash=sha256:ef9a55013676907df6c9d7dd943eb1770d014f68beaa7e73250fb43c759f4585 +deprecation==2.0.7 \ + --hash=sha256:c0392f676a6146f0238db5744d73e786a43510d54033f80994ef2f4c9df192ed \ + --hash=sha256:dc9b4f252b7aca8165ce2764a71da92a653b5ffbf7a389461d7a640f6536ecb2 +docutils==0.16 \ + --hash=sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af \ + --hash=sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc \ + # via sphinx entrypoints==0.3 \ --hash=sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19 \ --hash=sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451 \ # via flake8 -flake8==3.7.7 \ - --hash=sha256:859996073f341f2670741b51ec1e67a01da142831aa1fdc6242dbf88dffbe661 \ - --hash=sha256:a796a115208f5c03b18f332f7c11729812c8c3ded6c46319c59b53efd3819da8 -graphviz==0.11 \ - --hash=sha256:6f261efbe92b938808ebb64048253b99f379f6300c6c776d440984e71678f642 \ - --hash=sha256:fc6f825a2a1be9841c1c7493777c0c742514c7daf979691f0e143d7dc0cc1fa9 \ +flake8==3.7.9 \ + --hash=sha256:45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb \ + --hash=sha256:49356e766643ad15072a789a20915d3c91dc89fd313ccd71802303fd67e4deca +graphviz==0.13.2 \ + --hash=sha256:241fb099e32b8e8c2acca747211c8237e40c0b89f24b1622860075d59f4c4b25 \ + --hash=sha256:60acbeee346e8c14555821eab57dbf68a169e6c10bce40e83c1bf44f63a62a01 \ # via objgraph +idna==2.9 \ + --hash=sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb \ + --hash=sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa \ + # via requests +imagesize==1.2.0 \ + --hash=sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1 \ + --hash=sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1 \ + # via sphinx +jinja2==2.11.1 \ + --hash=sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250 \ + --hash=sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49 \ + # via sphinx lark-parser==0.6.7 \ --hash=sha256:062800f3823a6c733ec1d181a2089a22d1f62dbe65f90a3f6b1e6de1934b05ef \ # via syslog-rfc5424-parser +markupsafe==1.1.1 \ + --hash=sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473 \ + --hash=sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161 \ + --hash=sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235 \ + --hash=sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5 \ + --hash=sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42 \ + --hash=sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff \ + --hash=sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b \ + --hash=sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1 \ + --hash=sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e \ + --hash=sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183 \ + --hash=sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66 \ + --hash=sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b \ + --hash=sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1 \ + --hash=sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15 \ + --hash=sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1 \ + --hash=sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e \ + --hash=sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b \ + --hash=sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905 \ + --hash=sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735 \ + --hash=sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d \ + --hash=sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e \ + --hash=sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d \ + --hash=sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c \ + --hash=sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21 \ + --hash=sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2 \ + --hash=sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5 \ + --hash=sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b \ + --hash=sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6 \ + --hash=sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f \ + --hash=sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f \ + --hash=sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2 \ + --hash=sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7 \ + --hash=sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be \ + # via jinja2 mccabe==0.6.1 \ --hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \ --hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f \ @@ -82,29 +148,31 @@ mccabe==0.6.1 \ objgraph==3.4.1 \ --hash=sha256:10d50116d1a66934d143a07308a5b3b3edcc021e1457f66ff792584166cae7cd \ --hash=sha256:bf29512d7f8b457b53fa0722ea59f516abb8abc59b78f97f0ef81394a0c615a7 -packaging==19.0 \ - --hash=sha256:0c98a5d0be38ed775798ece1b9727178c4469d9c3b4ada66e8e6b7849f8732af \ - --hash=sha256:9e1cbf8c12b1f1ce0bb5344b8d7ecf66a6f8a6e91bcb0c84593ed6d3ab5c4ab3 \ - # via deprecation -parameterized==0.7.0 \ - --hash=sha256:020343a281efcfe9b71b9028a91817f981202c14d72104b5a2fbe401dee25a18 \ - --hash=sha256:d8c8837fb677ed2d5a93b9e2308ce0da3aeb58cf513120d501e0b7af14da78d5 -pexpect==4.7.0 \ - --hash=sha256:2094eefdfcf37a1fdbfb9aa090862c1a4878e5c7e0e7e7088bdb511c558e5cd1 \ - --hash=sha256:9e2c1fd0e6ee3a49b28f95d4b33bc389c89b20af6a1255906e90ff1262ce62eb +packaging==20.3 \ + --hash=sha256:3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3 \ + --hash=sha256:82f77b9bee21c1bafbf35a84905d604d5d1223801d639cf3ed140bd651c08752 \ + # via deprecation, sphinx +parameterized==0.7.1 \ + --hash=sha256:6a94dbea30c6abde99fd4c2f2042c1bf7f980e48908bf92ead62394f93cf57ed \ + --hash=sha256:ea0326ba5bbbe7c427329a27b75003410df07d1173ca254976f8f5a64922c322 +pexpect==4.8.0 \ + --hash=sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937 \ + --hash=sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c pip-tools==3.8.0 \ --hash=sha256:1240b075af2aaf8231898a6cb0220a103a06182a239ebf4537920e5d02ad89c3 \ --hash=sha256:e4f33c3c77954182ec6998d661b0c2749428d3b461c0247d28ee67493a1c90ef -psutil==5.6.3 \ - --hash=sha256:028a1ec3c6197eadd11e7b46e8cc2f0720dc18ac6d7aabdb8e8c0d6c9704f000 \ - --hash=sha256:503e4b20fa9d3342bcf58191bbc20a4a5ef79ca7df8972e6197cc14c5513e73d \ - --hash=sha256:863a85c1c0a5103a12c05a35e59d336e1d665747e531256e061213e2e90f63f3 \ - --hash=sha256:954f782608bfef9ae9f78e660e065bd8ffcfaea780f9f2c8a133bb7cb9e826d7 \ - --hash=sha256:b6e08f965a305cd84c2d07409bc16fbef4417d67b70c53b299116c5b895e3f45 \ - --hash=sha256:bc96d437dfbb8865fc8828cf363450001cb04056bbdcdd6fc152c436c8a74c61 \ - --hash=sha256:cf49178021075d47c61c03c0229ac0c60d5e2830f8cab19e2d88e579b18cdb76 \ - --hash=sha256:d5350cb66690915d60f8b233180f1e49938756fb2d501c93c44f8fb5b970cc63 \ - --hash=sha256:eba238cf1989dfff7d483c029acb0ac4fcbfc15de295d682901f0e2497e6781a +psutil==5.7.0 \ + --hash=sha256:1413f4158eb50e110777c4f15d7c759521703bd6beb58926f1d562da40180058 \ + --hash=sha256:298af2f14b635c3c7118fd9183843f4e73e681bb6f01e12284d4d70d48a60953 \ + --hash=sha256:60b86f327c198561f101a92be1995f9ae0399736b6eced8f24af41ec64fb88d4 \ + --hash=sha256:685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e \ + --hash=sha256:73f35ab66c6c7a9ce82ba44b1e9b1050be2a80cd4dcc3352cc108656b115c74f \ + --hash=sha256:75e22717d4dbc7ca529ec5063000b2b294fc9a367f9c9ede1f65846c7955fd38 \ + --hash=sha256:a02f4ac50d4a23253b68233b07e7cdb567bd025b982d5cf0ee78296990c22d9e \ + --hash=sha256:d008ddc00c6906ec80040d26dc2d3e3962109e40ad07fd8a12d0284ce5e0e4f8 \ + --hash=sha256:d84029b190c8a66a946e28b4d3934d2ca1528ec94764b180f7d6ea57b0e75e26 \ + --hash=sha256:e2d0c5b07c6fe5a87fa27b7855017edb0d52ee73b71e6ee368fae268605cc3f5 \ + --hash=sha256:f344ca230dd8e8d5eee16827596f1c22ec0876127c28e800d7ae20ed44c4b310 ptyprocess==0.6.0 \ --hash=sha256:923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0 \ --hash=sha256:d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f \ @@ -112,27 +180,82 @@ ptyprocess==0.6.0 \ pycodestyle==2.5.0 \ --hash=sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56 \ --hash=sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c -pycparser==2.19 \ - --hash=sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3 \ +pycparser==2.20 \ + --hash=sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0 \ + --hash=sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705 \ # via cffi pyflakes==2.1.1 \ --hash=sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0 \ --hash=sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2 \ # via flake8 -pympler==0.7 \ - --hash=sha256:7a11e739125a9ce8bf868ded67238a40e8a7bf979bc03005eb8126182e5e274e -pyparsing==2.4.0 \ - --hash=sha256:1873c03321fc118f4e9746baf201ff990ceb915f433f23b395f5580d1840cb2a \ - --hash=sha256:9b6323ef4ab914af344ba97510e966d64ba91055d6b9afa6b30799340e89cc03 \ +pygments==2.6.1 \ + --hash=sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44 \ + --hash=sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324 \ + # via sphinx +pympler==0.8 \ + --hash=sha256:f74cd2982c5cd92ded55561191945616f2bb904a0ae5cdacdb566c6696bdb922 +pyparsing==2.4.7 \ + --hash=sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \ + --hash=sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b \ # via packaging +pytz==2019.3 \ + --hash=sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d \ + --hash=sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be \ + # via babel +requests==2.23.0 \ + --hash=sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee \ + --hash=sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6 \ + # via sphinx scapy==2.4.3 ; python_version >= "2.7" or python_version >= "3.4" \ --hash=sha256:e2f8d11f6a941c14a789ae8b236b27bd634681f1b29b5e893861e284d234f6b0 -six==1.12.0 \ - --hash=sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c \ - --hash=sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73 +six==1.14.0 \ + --hash=sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a \ + --hash=sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c +snowballstemmer==2.0.0 \ + --hash=sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0 \ + --hash=sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52 \ + # via sphinx +sphinx-rtd-theme==0.4.3 \ + --hash=sha256:00cf895504a7895ee433807c62094cf1e95f065843bf3acd17037c3e9a2becd4 \ + --hash=sha256:728607e34d60456d736cc7991fd236afb828b21b82f956c5ea75f94c8414040a +sphinx==2.4.4 \ + --hash=sha256:b4c750d546ab6d7e05bdff6ac24db8ae3e8b8253a3569b754e445110a0a12b66 \ + --hash=sha256:fc312670b56cb54920d6cc2ced455a22a547910de10b3142276495ced49231cb +sphinxcontrib-applehelp==1.0.2 \ + --hash=sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a \ + --hash=sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58 \ + # via sphinx +sphinxcontrib-devhelp==1.0.2 \ + --hash=sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e \ + --hash=sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4 \ + # via sphinx +sphinxcontrib-htmlhelp==1.0.3 \ + --hash=sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f \ + --hash=sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b \ + # via sphinx +sphinxcontrib-jsmath==1.0.1 \ + --hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \ + --hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 \ + # via sphinx +sphinxcontrib-qthelp==1.0.3 \ + --hash=sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72 \ + --hash=sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6 \ + # via sphinx +sphinxcontrib-serializinghtml==1.1.4 \ + --hash=sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc \ + --hash=sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a \ + # via sphinx subprocess32==3.5.4 \ --hash=sha256:88e37c1aac5388df41cc8a8456bb49ebffd321a3ad4d70358e3518176de3a56b \ --hash=sha256:eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d -syslog-rfc5424-parser==0.3.1 \ - --hash=sha256:994dbb7b138ff175dd2e2a09ae487af4875cd608de9dcec25622c9b96fc0aa78 \ - --hash=sha256:ff11d711d88d98538e1a0f1bd1a89449d3e88bc5abed66e3924b1a500869cb53 +syslog-rfc5424-parser==0.3.2 \ + --hash=sha256:6134ee1958da89ab7f8d32ed5370a49ddabcc99d75a950b6ec59708417f20a7a \ + --hash=sha256:80a9239d4da404a271266000f4c5f00a183af3d03d53d19d7052c8272430bee9 +urllib3==1.25.8 \ + --hash=sha256:2f3db8b19923a873b3e5256dc9c2dedfa883e33d87c690d9c7913e1f40673cdc \ + --hash=sha256:87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc \ + # via requests + +# WARNING: The following packages were not pinned, but pip requires them to be +# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag. +# setuptools==46.1.3 # via sphinx diff --git a/test/requirements.txt b/test/requirements.txt index 103bc1900050..daeec3e1e13c 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -17,3 +17,5 @@ subprocess32 # PSF syslog_rfc5424_parser>=0.3.1 # ISC objgraph # MIT pympler # Apache-2.0 +sphinx<3.0.0 # BSD, sphinx 3.0.0 crashes with a traceback +sphinx-rtd-theme # MIT diff --git a/test/template_bd.py b/test/template_bd.py index bd55b9b68909..198cc2258b8d 100644 --- a/test/template_bd.py +++ b/test/template_bd.py @@ -74,7 +74,7 @@ def test_decap(self): """ encapsulated_pkt = self.encapsulate(self.frame_request, - self.single_tunnel_bd) + self.single_tunnel_vni) self.pg0.add_stream([encapsulated_pkt, ]) @@ -102,7 +102,7 @@ def test_encap(self): # Pick first received frame and check if it's correctly encapsulated. out = self.pg0.get_capture(1) pkt = out[0] - self.check_encapsulation(pkt, self.single_tunnel_bd) + self.check_encapsulation(pkt, self.single_tunnel_vni) payload = self.decapsulate(pkt) self.assert_eq_pkts(payload, self.frame_reply) diff --git a/test/test_geneve.py b/test/test_geneve.py index 24019e7316bf..7eb23f27f9b8 100644 --- a/test/test_geneve.py +++ b/test/test_geneve.py @@ -182,10 +182,11 @@ def setUpClass(cls): # Create GENEVE VTEP on VPP pg0, and put geneve_tunnel0 and pg1 # into BD. + cls.single_tunnel_vni = 0xabcde cls.single_tunnel_bd = 1 r = cls.vapi.geneve_add_del_tunnel( local_address=cls.pg0.local_ip4, - remote_address=cls.pg0.remote_ip4, vni=cls.single_tunnel_bd) + remote_address=cls.pg0.remote_ip4, vni=cls.single_tunnel_vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge( diff --git a/test/test_vxlan.py b/test/test_vxlan.py index 7613054882a9..fffebcf92374 100644 --- a/test/test_vxlan.py +++ b/test/test_vxlan.py @@ -185,9 +185,10 @@ def setUpClass(cls): # Create VXLAN VTEP on VPP pg0, and put vxlan_tunnel0 and pg1 # into BD. cls.single_tunnel_bd = 1 + cls.single_tunnel_vni = 0xabcde r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=cls.pg0.remote_ip4n, - vni=cls.single_tunnel_bd) + vni=cls.single_tunnel_vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge( @@ -250,7 +251,7 @@ def test_encap_big_packet(self): ether = out[0] pkt = reassemble4(out) pkt = ether / pkt - self.check_encapsulation(pkt, self.single_tunnel_bd) + self.check_encapsulation(pkt, self.single_tunnel_vni) payload = self.decapsulate(pkt) # TODO: Scapy bug? diff --git a/test/test_vxlan6.py b/test/test_vxlan6.py index b1fda508394d..c0745b199d16 100644 --- a/test/test_vxlan6.py +++ b/test/test_vxlan6.py @@ -138,10 +138,11 @@ def setUpClass(cls): # Create VXLAN VTEP on VPP pg0, and put vxlan_tunnel0 and pg1 # into BD. cls.single_tunnel_bd = 1 + cls.single_tunnel_vni = 0xabcde r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip6n, dst_address=cls.pg0.remote_ip6n, is_ipv6=1, - vni=cls.single_tunnel_bd) + vni=cls.single_tunnel_vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge( diff --git a/test/test_vxlan_gbp.py b/test/test_vxlan_gbp.py index 19790df1f765..d3cd7aa6fdcf 100644 --- a/test/test_vxlan_gbp.py +++ b/test/test_vxlan_gbp.py @@ -145,11 +145,12 @@ def setUpClass(cls): # Create VXLAN GBP VTEP on VPP pg0, and put vxlan_gbp_tunnel0 and # pg1 into BD. cls.single_tunnel_bd = 1 + cls.single_tunnel_vni = 0xabcde r = cls.vapi.vxlan_gbp_tunnel_add_del( tunnel={ 'src': cls.pg0.local_ip4, 'dst': cls.pg0.remote_ip4, - 'vni': cls.single_tunnel_bd, + 'vni': cls.single_tunnel_vni, 'instance': INVALID_INDEX, 'mcast_sw_if_index': INVALID_INDEX, 'mode': 1, @@ -197,7 +198,7 @@ def test_decap(self): Verify receipt of decapsulated frames on pg1 """ encapsulated_pkt = self.encapsulate(self.frame_request, - self.single_tunnel_bd) + self.single_tunnel_vni) self.pg0.add_stream([encapsulated_pkt, ]) @@ -225,7 +226,7 @@ def test_encap(self): # Pick first received frame and check if it's correctly encapsulated. out = self.pg0.get_capture(1) pkt = out[0] - self.check_encapsulation(pkt, self.single_tunnel_bd) + self.check_encapsulation(pkt, self.single_tunnel_vni) payload = self.decapsulate(pkt) self.assert_eq_pkts(payload, self.frame_reply) @@ -269,7 +270,7 @@ def test_encap_big_packet(self): # Pick first received frame and check if it's correctly encapsulated. out = self.pg0.get_capture(2) pkt = reassemble4_ether(out) - self.check_encapsulation(pkt, self.single_tunnel_bd) + self.check_encapsulation(pkt, self.single_tunnel_vni) payload = self.decapsulate(pkt) self.assert_eq_pkts(payload, frame) diff --git a/test/test_vxlan_gpe.py b/test/test_vxlan_gpe.py index ca1ad9c60bf3..3d6e26024c9d 100644 --- a/test/test_vxlan_gpe.py +++ b/test/test_vxlan_gpe.py @@ -190,11 +190,12 @@ def setUpClass(cls): # Create VXLAN-GPE VTEP on VPP pg0, and put vxlan_gpe_tunnel0 # and pg1 into BD. + cls.single_tunnel_vni = 0xabcde cls.single_tunnel_bd = 11 r = cls.vapi.vxlan_gpe_add_del_tunnel( src_addr=cls.pg0.local_ip4n, dst_addr=cls.pg0.remote_ip4n, - vni=cls.single_tunnel_bd) + vni=cls.single_tunnel_vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge(