# -*- coding: utf-8 -*-
"""CSIT report documentation build configuration file
This file is execfile()d with the current directory set to its
containing dir.
Note that not all possible configuration values are present in this
autogenerated file.
All configuration values have a default; values that are commented out
serve to show the default.
If extensions (or modules to document with autodoc) are in another directory,
add these directories to sys.path here. If the directory is relative to the
documentation root, use os.path.abspath to make it absolute, like shown here.
"""
import os
import sys
sys.path.insert(0, os.path.abspath(u'.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [u'sphinxcontrib.programoutput',
u'sphinx.ext.ifconfig']
# Add any paths that contain templates here, relative to this directory.
templates_path = [u'_templates']
# The suffix(es) of source file names.
# You can specify multiple suffix as a list of string:
#
source_suffix = [u'.rst', u'.md']
# The master toctree document.
master_doc = u'index'
# General information about the project.
report_week = u'11'
project = u'FD.io CSIT-2001.{week}'.format(week=report_week)
copyright = u'2020, FD.io'
author = u'FD.io CSIT'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# version = u''
# The full version, including alpha/beta/rc tags.
# release = u''
rst_epilog = u"""
.. |release-1| replace:: {prev_release}
.. |srelease| replace:: {srelease}
.. |csit-release| replace:: CSIT-{csitrelease}
.. |csit-release-1| replace:: CSIT-{csit_prev_release}
.. |vpp-release| replace:: VPP-{vpprelease} release
.. |vpp-release-1| replace:: VPP-{vpp_prev_release} release
.. |dpdk-release| replace:: DPDK-{dpdkrelease}
.. |dpdk-release-1| replace:: DPDK-{dpdk_prev_release}
.. |trex-release| replace:: TRex {trex_version}
.. _pdf version of this report: https://docs.fd.io/csit/{release}/report/_static/archive/csit_{release}.{report_week}.pdf
.. _tag documentation rst file: https://git.fd.io/csit/tree/docs/tag_documentation.rst?h={release}
.. _TRex installation: https://git.fd.io/csit/tree/resources/tools/trex/trex_installer.sh?h={release}
.. _TRex driver: https://git.fd.io/csit/tree/resources/tools/trex/trex_stateless_profile.py?h={release}
.. _CSIT DPDK Performance Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.dpdk.perf.html
.. _CSIT VPP Performance Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.perf.html
.. _CSIT VPP Device Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.device.html
.. _VPP test framework documentation: https://docs.fd.io/vpp/{vpprelease}/vpp_make_test/html/
.. _FD.io CSIT Testbeds - Xeon Haswell: https://git.fd.io/csit/tree/docs/lab/testbeds_ucs_hsw_hw_bios_cfg.md?h={release}
.. _FD.io CSIT testbeds - Xeon Skylake, Arm, Atom: https://git.fd.io/csit/tree/docs/lab/testbeds_sm_skx_hw_bios_cfg.md?h={release}
.. _FD.io CSIT testbeds - Xeon Cascade Lake: https://git.fd.io/csit/tree/docs/lab/testbeds_sm_clx_hw_bios_cfg.md?h={release}
.. _Ansible inventory - hosts: https://git.fd.io/csit/tree/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars?h={release}
.. _FD.io test executor dpdk performance job 3n-hsw: https://jenkins.fd.io/view/csit/job/csit-dpdk-perf-verify-{srelease}-3n-hsw
.. _FD.io test executor dpdk performance job 3n-skx: https://jenkins.fd.io/view/csit/job/csit-dpdk-perf-verify-{srelease}-3n-skx
.. _FD.io test executor dpdk performance job 2n-skx: https://jenkins.fd.io/view/csit/job/csit-dpdk-perf-verify-{srelease}-2n-skx
.. _FD.io test executor dpdk performance job 2n-clx: https://jenkins.fd.io/view/csit/job/csit-dpdk-perf-verify-{srelease}-2n-clx
.. _FD.io test executor vpp performance job 3n-hsw: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-3n-hsw
.. _FD.io test executor vpp performance job 3n-skx: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-3n-skx
.. _FD.io test executor vpp performance job 2n-skx: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-2n-skx
.. _FD.io test executor vpp performance job 3n-tsh: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-3n-tsh
.. _FD.io test executor vpp performance job 3n-dnv: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-3n-dnv
.. _FD.io test executor vpp performance job 2n-dnv: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-2n-dnv
.. _FD.io test executor vpp performance job 2n-clx: https://jenkins.fd.io/view/csit/job/csit-vpp-perf-verify-{srelease}-2n-clx
.. _FD.io test executor vpp device jobs using Ubuntu: https://jenkins.fd.io/view/csit/job/csit-vpp-device-{srelease}-ubuntu1804-1n-skx
.. _FD.io VPP compile job: https://jenkins.fd.io/view/vpp/job/vpp-merge-{srelease}-ubuntu1804/
.. _CSIT Testbed Setup: https://git.fd.io/csit/tree/resources/tools/testbed-setup/README.md?h={release}
.. _VPP startup.conf: https://git.fd.io/vpp/tree/src/vpp/conf/startup.conf?h=stable/{srelease}&id={vpp_release_commit_id}
""".format(release=u'rls2001',
report_week=report_week,
prev_release=u'rls1908',
srelease=/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
Copyright (c) 2010 Eliot Dresselhaus
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <vppinfra/vhash.h>
#ifdef CLIB_HAVE_VEC128
/* Overflow search buckets have an extra u32x4 for saving key_hash data.
This makes it easier to refill main search bucket from overflow vector. */
typedef struct
{
/* 4 results for this bucket. */
u32x4_union_t result;
/* 4 hash codes for this bucket. These are used to refill main
search buckets from overflow buckets when space becomes available. */
u32x4_union_t key_hash;
/* n_key_u32s u32x4s of key data follow. */
u32x4_union_t key[0];
} vhash_overflow_search_bucket_t;
always_inline void
set_overflow_result (vhash_overflow_search_bucket_t * b,
u32 i, u32 result, u32 key_hash)
{
b->result.as_u32[i] = result;
b->key_hash.as_u32[i] = key_hash;
}
always_inline void
free_overflow_bucket (vhash_overflow_buckets_t * ob,
vhash_overflow_search_bucket_t * b, u32 i)
{
u32 o = (u32x4_union_t *) b - ob->search_buckets;
ASSERT (o < vec_len (ob->search_buckets));
vec_add1 (ob->free_indices, 4 * o + i);
}
always_inline vhash_overflow_search_bucket_t *
get_overflow_search_bucket (vhash_overflow_buckets_t * obs, u32 i,
u32 n_key_u32s)
{
return ((vhash_overflow_search_bucket_t *)
vec_elt_at_index (obs->search_buckets, i));
}
always_inline vhash_overflow_search_bucket_t *
next_overflow_bucket (vhash_overflow_search_bucket_t * b, u32 n_key_u32s)
{
return (vhash_overflow_search_bucket_t *) & b->key[n_key_u32s];
}
#define foreach_vhash_overflow_bucket(b,ob,n_key_u32s) \
for ((b) = (vhash_overflow_search_bucket_t *) ob->search_buckets; \
(u32x4_union_t *) (b) < vec_end (ob->search_buckets); \
b = next_overflow_bucket (b, n_key_u32s))
u32
vhash_get_overflow (vhash_t * h, u32 key_hash, u32 vi, u32 n_key_u32s)
{
vhash_overflow_buckets_t *ob = vhash_get_overflow_buckets (h, key_hash);
vhash_overflow_search_bucket_t *b;
u32 i, result = 0;
foreach_vhash_overflow_bucket (b, ob, n_key_u32s)
{
u32x4 r = b->result.as_u32x4;
for (i = 0; i < n_key_u32s; i++)
r &= vhash_bucket_compare (h, &b->key[0], i, vi);
result = vhash_merge_results (r);
if (result)
break;
}
return result;
}
u32
vhash_set_overflow (vhash_t * h,
u32 key_hash, u32 vi, u32 new_result, u32 n_key_u32s)
{
vhash_overflow_buckets_t *ob = vhash_get_overflow_buckets (h, key_hash);
vhash_overflow_search_bucket_t *b;
u32 i_set, i, old_result;
foreach_vhash_overflow_bucket (b, ob, n_key_u32s)
{
u32x4 r