aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/node.c
AgeCommit message (Expand)AuthorFilesLines
2022-01-12crypto: omit loop iterationDastin Wilski1-4/+6
2022-01-05crypto: encrypt/decrypt queues sw_schedulerJakub Wysocki1-5/+3
2021-09-09vlib: fix vlib_buffer_enqueue_to_next() overflowBenoƮt Ganne1-4/+4
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion1-2/+3
2021-02-24crypto: A more memory efficient layout of the frame element structNeale Ranns1-4/+4
2020-12-14misc: refactor clib_bitmap_foreach macroDamjan Marion1-2/+2
2020-09-03crypto: SW scheduler async crypto enginePiotrX Kleski1-42/+60
2020-04-30crypto: introduce async crypto infraFan Zhang1-0/+184
nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/usr/bin/env bash
set -o pipefail -o errtrace -o nounset -o errexit

# Experimental script, please consult with dmarion@me.com before
# submitting any changes

# defaults
build_dir=.
install_dir=/usr/local
build_type=release
src_dir="$(dirname "$(readlink -f "$0")")"
host_arch=$(uname -m)
arch=${host_arch}
native_only=no
wipe=no
args=()

help()
{
  cat << __EOF__
VPP Build Configuration Script

USAGE: ${0} [options]

OPTIONS:
  --help, -h              This help
  --arch, -a              Cross-compile for specified target architecture (aarch64, riscv64, i386, ...)
  --build-dir, -b         Build directory
  --install-dir, -i       Install directory
  --build-type, -t        Build type (release, debug, ...)
  --native-only, -n       Only compile for Native CPU (no multiarch)
  --wipe, -w              Wipe whole repo (except startup.* files)
__EOF__
}

while (( "$#" )); do
  case "$1" in
    -h|--help)
      help
      exit 1
      ;;
    -b|--build-dir)
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
        build_dir=$2
        shift 2
      else
        echo "Error: Argument for $1 is missing" >&2
        exit 1
      fi
      ;;
    -a|--arch)
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
	arch=$2
        shift 2
      else
        echo "Error: Argument for $1 is missing" >&2
        exit 1
      fi
      ;;
    -i|--install-dir)
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
        install_dir=$2
        shift 2
      else
        echo "Error: Argument for $1 is missing" >&2
        exit 1
      fi
      ;;
    -t|--build-type)
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
        build_type=$2
        shift 2
      else
        echo "Error: Argument for $1 is missing" >&2
        exit 1
      fi
      ;;
    -n|--native-only)
      native_only=yes
      shift 1
      ;;
    -w|--wipe)
      wipe=yes
      shift 1
      ;;
    -*|--*=) # unsupported flags
      echo "Error: Unsupported flag $1" >&2
      exit 1
      ;;
    *) # preserve positional arguments
      PARAMS="$PARAMS $1"
      shift
      ;;
  esac
done

if [ "${arch}" != "${host_arch}" ] ; then
  args+=("-DCMAKE_SYSTEM_NAME=Linux")
  args+=("-DCMAKE_SYSTEM_PROCESSOR=${arch}")
  args+=("-DCMAKE_C_COMPILER=clang")
  args+=("-DCMAKE_C_COMPILER_TARGET=${arch}-linux-gnu")
  args+=("-DCMAKE_ASM_COMPILER_TARGET=${arch}-linux-gnu")
  args+=("-DCMAKE_FIND_ROOT_PATH=/usr/${arch}-linux-gnu")
  args+=("-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER")
  args+=("-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH")
  args+=("-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH")
  args+=("-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY")
fi

args+=("-DCMAKE_PREFIX_PATH=/opt/vpp/external/${arch}")
args+=("-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON")
args+=("-DCMAKE_INSTALL_PREFIX=${install_dir}")
args+=("-DCMAKE_BUILD_TYPE:STRING=${build_type}")
[ "${native_only}" == "yes" ] && args+=("-DVPP_BUILD_NATIVE_ONLY:BOOL=ON")

[ "${wipe}" == "yes" ] && git clean -fdx --exclude=startup.\*

cmake ${args[@]} -G Ninja -S ${src_dir}/src -B ${build_dir}

cat << __EOF__

  Useful build commands:

  ninja                   Build VPP
  ninja set-build-type-*  Change build type to <debug|release|gcov|...>
  ninja config            Start build configuration TUI
  ninja run               Runs VPP using startup.conf in the build directory
  ninja debug             Runs VPP inside GDB using startup.conf in the build directory
  ninja pkg-deb           Create .deb packages
  ninja install           Install VPP to $install_dir

__EOF__