From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/spdk/dpdk/doc/api/doxy-api-index.md | 191 +++++++++++++++++++++++++++++ src/spdk/dpdk/doc/api/doxy-api.conf.in | 108 ++++++++++++++++ src/spdk/dpdk/doc/api/doxy-html-custom.sh | 8 ++ src/spdk/dpdk/doc/api/generate_doxygen.sh | 13 ++ src/spdk/dpdk/doc/api/generate_examples.sh | 16 +++ src/spdk/dpdk/doc/api/meson.build | 56 +++++++++ 6 files changed, 392 insertions(+) create mode 100644 src/spdk/dpdk/doc/api/doxy-api-index.md create mode 100644 src/spdk/dpdk/doc/api/doxy-api.conf.in create mode 100755 src/spdk/dpdk/doc/api/doxy-html-custom.sh create mode 100755 src/spdk/dpdk/doc/api/generate_doxygen.sh create mode 100755 src/spdk/dpdk/doc/api/generate_examples.sh create mode 100644 src/spdk/dpdk/doc/api/meson.build (limited to 'src/spdk/dpdk/doc/api') diff --git a/src/spdk/dpdk/doc/api/doxy-api-index.md b/src/spdk/dpdk/doc/api/doxy-api-index.md new file mode 100644 index 000000000..f59766323 --- /dev/null +++ b/src/spdk/dpdk/doc/api/doxy-api-index.md @@ -0,0 +1,191 @@ +API +=== + + + +The public API headers are grouped by topics: + +- **device**: + [dev] (@ref rte_dev.h), + [ethdev] (@ref rte_ethdev.h), + [ethctrl] (@ref rte_eth_ctrl.h), + [rte_flow] (@ref rte_flow.h), + [rte_tm] (@ref rte_tm.h), + [rte_mtr] (@ref rte_mtr.h), + [bbdev] (@ref rte_bbdev.h), + [cryptodev] (@ref rte_cryptodev.h), + [security] (@ref rte_security.h), + [compressdev] (@ref rte_compressdev.h), + [compress] (@ref rte_comp.h), + [eventdev] (@ref rte_eventdev.h), + [event_eth_rx_adapter] (@ref rte_event_eth_rx_adapter.h), + [event_eth_tx_adapter] (@ref rte_event_eth_tx_adapter.h), + [event_timer_adapter] (@ref rte_event_timer_adapter.h), + [event_crypto_adapter] (@ref rte_event_crypto_adapter.h), + [rawdev] (@ref rte_rawdev.h), + [metrics] (@ref rte_metrics.h), + [bitrate] (@ref rte_bitrate.h), + [latency] (@ref rte_latencystats.h), + [devargs] (@ref rte_devargs.h), + [PCI] (@ref rte_pci.h), + [vdev] (@ref rte_bus_vdev.h), + [vfio] (@ref rte_vfio.h) + +- **device specific**: + [softnic] (@ref rte_eth_softnic.h), + [bond] (@ref rte_eth_bond.h), + [vhost] (@ref rte_vhost.h), + [vdpa] (@ref rte_vdpa.h), + [KNI] (@ref rte_kni.h), + [ixgbe] (@ref rte_pmd_ixgbe.h), + [i40e] (@ref rte_pmd_i40e.h), + [ice] (@ref rte_pmd_ice.h), + [bnxt] (@ref rte_pmd_bnxt.h), + [dpaa] (@ref rte_pmd_dpaa.h), + [dpaa2] (@ref rte_pmd_dpaa2.h), + [dpaa2_mempool] (@ref rte_dpaa2_mempool.h), + [dpaa2_cmdif] (@ref rte_pmd_dpaa2_cmdif.h), + [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h), + [crypto_scheduler] (@ref rte_cryptodev_scheduler.h) + +- **memory**: + [memseg] (@ref rte_memory.h), + [memzone] (@ref rte_memzone.h), + [mempool] (@ref rte_mempool.h), + [malloc] (@ref rte_malloc.h), + [memcpy] (@ref rte_memcpy.h) + +- **timers**: + [cycles] (@ref rte_cycles.h), + [timer] (@ref rte_timer.h), + [alarm] (@ref rte_alarm.h) + +- **locks**: + [atomic] (@ref rte_atomic.h), + [mcslock] (@ref rte_mcslock.h), + [rwlock] (@ref rte_rwlock.h), + [spinlock] (@ref rte_spinlock.h), + [ticketlock] (@ref rte_ticketlock.h), + [RCU] (@ref rte_rcu_qsbr.h) + +- **CPU arch**: + [branch prediction] (@ref rte_branch_prediction.h), + [cache prefetch] (@ref rte_prefetch.h), + [SIMD] (@ref rte_vect.h), + [byte order] (@ref rte_byteorder.h), + [CPU flags] (@ref rte_cpuflags.h), + [CPU pause] (@ref rte_pause.h), + [I/O access] (@ref rte_io.h) + +- **CPU multicore**: + [interrupts] (@ref rte_interrupts.h), + [launch] (@ref rte_launch.h), + [lcore] (@ref rte_lcore.h), + [per-lcore] (@ref rte_per_lcore.h), + [service cores] (@ref rte_service.h), + [keepalive] (@ref rte_keepalive.h), + [power/freq] (@ref rte_power.h) + +- **layers**: + [ethernet] (@ref rte_ether.h), + [ARP] (@ref rte_arp.h), + [HIGIG] (@ref rte_higig.h), + [ICMP] (@ref rte_icmp.h), + [ESP] (@ref rte_esp.h), + [IPsec] (@ref rte_ipsec.h), + [IPsec group] (@ref rte_ipsec_group.h), + [IPsec SA] (@ref rte_ipsec_sa.h), + [IPsec SAD] (@ref rte_ipsec_sad.h), + [IP] (@ref rte_ip.h), + [SCTP] (@ref rte_sctp.h), + [TCP] (@ref rte_tcp.h), + [UDP] (@ref rte_udp.h), + [GTP] (@ref rte_gtp.h), + [GRO] (@ref rte_gro.h), + [GSO] (@ref rte_gso.h), + [frag/reass] (@ref rte_ip_frag.h), + [LPM IPv4 route] (@ref rte_lpm.h), + [LPM IPv6 route] (@ref rte_lpm6.h), + [VXLAN] (@ref rte_vxlan.h) + +- **QoS**: + [metering] (@ref rte_meter.h), + [scheduler] (@ref rte_sched.h), + [RED congestion] (@ref rte_red.h) + +- **hashes**: + [hash] (@ref rte_hash.h), + [jhash] (@ref rte_jhash.h), + [thash] (@ref rte_thash.h), + [FBK hash] (@ref rte_fbk_hash.h), + [CRC hash] (@ref rte_hash_crc.h) + +- **classification** + [reorder] (@ref rte_reorder.h), + [distributor] (@ref rte_distributor.h), + [EFD] (@ref rte_efd.h), + [ACL] (@ref rte_acl.h), + [member] (@ref rte_member.h), + [flow classify] (@ref rte_flow_classify.h), + [BPF] (@ref rte_bpf.h) + +- **containers**: + [mbuf] (@ref rte_mbuf.h), + [mbuf pool ops] (@ref rte_mbuf_pool_ops.h), + [ring] (@ref rte_ring.h), + [stack] (@ref rte_stack.h), + [tailq] (@ref rte_tailq.h), + [bitmap] (@ref rte_bitmap.h) + +- **packet framework**: + * [port] (@ref rte_port.h): + [ethdev] (@ref rte_port_ethdev.h), + [ring] (@ref rte_port_ring.h), + [frag] (@ref rte_port_frag.h), + [reass] (@ref rte_port_ras.h), + [sched] (@ref rte_port_sched.h), + [kni] (@ref rte_port_kni.h), + [src/sink] (@ref rte_port_source_sink.h) + * [table] (@ref rte_table.h): + [lpm IPv4] (@ref rte_table_lpm.h), + [lpm IPv6] (@ref rte_table_lpm_ipv6.h), + [ACL] (@ref rte_table_acl.h), + [hash] (@ref rte_table_hash.h), + [array] (@ref rte_table_array.h), + [stub] (@ref rte_table_stub.h) + * [pipeline] (@ref rte_pipeline.h) + [port_in_action] (@ref rte_port_in_action.h) + [table_action] (@ref rte_table_action.h) + * [graph] (@ref rte_graph.h): + [graph_worker] (@ref rte_graph_worker.h) + * graph_nodes: + [eth_node] (@ref rte_node_eth_api.h), + [ip4_node] (@ref rte_node_ip4_api.h) + +- **basic**: + [approx fraction] (@ref rte_approx.h), + [random] (@ref rte_random.h), + [config file] (@ref rte_cfgfile.h), + [key/value args] (@ref rte_kvargs.h), + [string] (@ref rte_string_fns.h) + +- **debug**: + [jobstats] (@ref rte_jobstats.h), + [telemetry] (@ref rte_telemetry.h), + [pdump] (@ref rte_pdump.h), + [hexdump] (@ref rte_hexdump.h), + [debug] (@ref rte_debug.h), + [log] (@ref rte_log.h), + [errno] (@ref rte_errno.h), + [trace] (@ref rte_trace.h), + [trace_point] (@ref rte_trace_point.h) + +- **misc**: + [EAL config] (@ref rte_eal.h), + [common] (@ref rte_common.h), + [experimental APIs] (@ref rte_compat.h), + [ABI versioning] (@ref rte_function_versioning.h), + [version] (@ref rte_version.h) diff --git a/src/spdk/dpdk/doc/api/doxy-api.conf.in b/src/spdk/dpdk/doc/api/doxy-api.conf.in new file mode 100644 index 000000000..92122125a --- /dev/null +++ b/src/spdk/dpdk/doc/api/doxy-api.conf.in @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2013-2017 6WIND S.A. + +PROJECT_NAME = DPDK +PROJECT_NUMBER = @VERSION@ +INPUT = @TOPDIR@/doc/api/doxy-api-index.md \ + @TOPDIR@/drivers/bus/vdev \ + @TOPDIR@/drivers/crypto/scheduler \ + @TOPDIR@/drivers/mempool/dpaa2 \ + @TOPDIR@/drivers/net/bnxt \ + @TOPDIR@/drivers/net/bonding \ + @TOPDIR@/drivers/net/dpaa \ + @TOPDIR@/drivers/net/dpaa2 \ + @TOPDIR@/drivers/net/i40e \ + @TOPDIR@/drivers/net/ice \ + @TOPDIR@/drivers/net/ixgbe \ + @TOPDIR@/drivers/net/softnic \ + @TOPDIR@/drivers/raw/dpaa2_cmdif \ + @TOPDIR@/drivers/raw/dpaa2_qdma \ + @TOPDIR@/lib/librte_eal/include \ + @TOPDIR@/lib/librte_eal/include/generic \ + @TOPDIR@/lib/librte_acl \ + @TOPDIR@/lib/librte_bbdev \ + @TOPDIR@/lib/librte_bitratestats \ + @TOPDIR@/lib/librte_bpf \ + @TOPDIR@/lib/librte_cfgfile \ + @TOPDIR@/lib/librte_cmdline \ + @TOPDIR@/lib/librte_compressdev \ + @TOPDIR@/lib/librte_cryptodev \ + @TOPDIR@/lib/librte_distributor \ + @TOPDIR@/lib/librte_efd \ + @TOPDIR@/lib/librte_ethdev \ + @TOPDIR@/lib/librte_eventdev \ + @TOPDIR@/lib/librte_fib \ + @TOPDIR@/lib/librte_flow_classify \ + @TOPDIR@/lib/librte_graph \ + @TOPDIR@/lib/librte_gro \ + @TOPDIR@/lib/librte_gso \ + @TOPDIR@/lib/librte_hash \ + @TOPDIR@/lib/librte_ip_frag \ + @TOPDIR@/lib/librte_ipsec \ + @TOPDIR@/lib/librte_jobstats \ + @TOPDIR@/lib/librte_kni \ + @TOPDIR@/lib/librte_kvargs \ + @TOPDIR@/lib/librte_latencystats \ + @TOPDIR@/lib/librte_lpm \ + @TOPDIR@/lib/librte_mbuf \ + @TOPDIR@/lib/librte_member \ + @TOPDIR@/lib/librte_mempool \ + @TOPDIR@/lib/librte_meter \ + @TOPDIR@/lib/librte_metrics \ + @TOPDIR@/lib/librte_node \ + @TOPDIR@/lib/librte_net \ + @TOPDIR@/lib/librte_pci \ + @TOPDIR@/lib/librte_pdump \ + @TOPDIR@/lib/librte_pipeline \ + @TOPDIR@/lib/librte_port \ + @TOPDIR@/lib/librte_power \ + @TOPDIR@/lib/librte_rawdev \ + @TOPDIR@/lib/librte_rcu \ + @TOPDIR@/lib/librte_reorder \ + @TOPDIR@/lib/librte_rib \ + @TOPDIR@/lib/librte_ring \ + @TOPDIR@/lib/librte_sched \ + @TOPDIR@/lib/librte_security \ + @TOPDIR@/lib/librte_stack \ + @TOPDIR@/lib/librte_table \ + @TOPDIR@/lib/librte_telemetry \ + @TOPDIR@/lib/librte_timer \ + @TOPDIR@/lib/librte_vhost +INPUT += @API_EXAMPLES@ +FILE_PATTERNS = rte_*.h \ + cmdline.h +PREDEFINED = __DOXYGEN__ \ + VFIO_PRESENT \ + __attribute__(x)= + +OPTIMIZE_OUTPUT_FOR_C = YES +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +EXTRACT_STATIC = YES +DISTRIBUTE_GROUP_DOC = YES +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_SCOPE_NAMES = YES +GENERATE_DEPRECATEDLIST = YES +VERBATIM_HEADERS = NO +ALPHABETICAL_INDEX = NO + +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = YES +SEARCHENGINE = YES +SORT_MEMBER_DOCS = NO +SOURCE_BROWSER = YES + +EXAMPLE_PATH = @TOPDIR@/examples +EXAMPLE_PATTERNS = *.c +EXAMPLE_RECURSIVE = YES + +OUTPUT_DIRECTORY = @OUTPUT@ +STRIP_FROM_PATH = @STRIP_FROM_PATH@ +GENERATE_HTML = YES +HTML_OUTPUT = @HTML_OUTPUT@ +GENERATE_LATEX = NO +GENERATE_MAN = NO + +HAVE_DOT = NO diff --git a/src/spdk/dpdk/doc/api/doxy-html-custom.sh b/src/spdk/dpdk/doc/api/doxy-html-custom.sh new file mode 100755 index 000000000..3802007c8 --- /dev/null +++ b/src/spdk/dpdk/doc/api/doxy-html-custom.sh @@ -0,0 +1,8 @@ +#! /bin/sh -e +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2013 6WIND S.A. + +CSS=$1 + +# space between item and its comment +echo 'dd td:first-child {padding-right: 2em;}' >> $CSS diff --git a/src/spdk/dpdk/doc/api/generate_doxygen.sh b/src/spdk/dpdk/doc/api/generate_doxygen.sh new file mode 100755 index 000000000..ee509e896 --- /dev/null +++ b/src/spdk/dpdk/doc/api/generate_doxygen.sh @@ -0,0 +1,13 @@ +#! /bin/sh -e +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2018 Luca Boccassi + +DOXYCONF=$1 +OUTDIR=$2 +SCRIPTCSS=$3 + +# run doxygen, capturing all the header files it processed +doxygen "${DOXYCONF}" | tee doxygen.out +echo "$OUTDIR: $(awk '/Preprocessing/ {printf("%s ", substr($2, 1, length($2) - 3))}' doxygen.out)" > $OUTDIR.d + +"${SCRIPTCSS}" "${OUTDIR}"/doxygen.css diff --git a/src/spdk/dpdk/doc/api/generate_examples.sh b/src/spdk/dpdk/doc/api/generate_examples.sh new file mode 100755 index 000000000..dae7ee0be --- /dev/null +++ b/src/spdk/dpdk/doc/api/generate_examples.sh @@ -0,0 +1,16 @@ +#! /bin/sh -e +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2018 Luca Boccassi + +EXAMPLES_DIR=$1 +API_EXAMPLES=$2 + +# generate a .d file including both C files and also build files, so we can +# detect both file changes and file additions/deletions +echo "$API_EXAMPLES: $(find ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d + +exec > "${API_EXAMPLES}" +printf '/**\n' +printf '@page examples DPDK Example Programs\n\n' +find "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort +printf '*/\n' diff --git a/src/spdk/dpdk/doc/api/meson.build b/src/spdk/dpdk/doc/api/meson.build new file mode 100644 index 000000000..49d5b9a15 --- /dev/null +++ b/src/spdk/dpdk/doc/api/meson.build @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi + +doxygen = find_program('doxygen', required: get_option('enable_docs')) + +if not doxygen.found() + subdir_done() +endif + +# due to the CSS customisation script, which needs to run on a file that +# is in a subdirectory that is created at build time and thus it cannot +# be an individual custom_target, we need to wrap the doxygen call in a +# script to run the CSS modification afterwards +generate_doxygen = find_program('generate_doxygen.sh') +generate_examples = find_program('generate_examples.sh') +generate_css = find_program('doxy-html-custom.sh') + +htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk') + +# due to the following bug: https://github.com/mesonbuild/meson/issues/4107 +# if install is set to true it will override build_by_default and it will +# cause the target to always be built. If install were to be always set to +# false it would be impossible to install the docs. +# So use a configure option for now. +example = custom_target('examples.dox', + output: 'examples.dox', + command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'], + depfile: 'examples.dox.d', + install: get_option('enable_docs'), + install_dir: htmldir, + build_by_default: get_option('enable_docs')) + +cdata = configuration_data() +cdata.set('VERSION', meson.project_version()) +cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox')) +cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api')) +cdata.set('HTML_OUTPUT', 'api') +cdata.set('TOPDIR', meson.source_root()) +cdata.set('STRIP_FROM_PATH', meson.source_root()) + +doxy_conf = configure_file(input: 'doxy-api.conf.in', + output: 'doxy-api.conf', + configuration: cdata) + +doxy_build = custom_target('doxygen', + depends: example, + input: doxy_conf, + output: 'api', + depfile: 'api.d', + command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css], + install: get_option('enable_docs'), + install_dir: htmldir, + build_by_default: get_option('enable_docs')) + +doc_targets += doxy_build +doc_target_names += 'Doxygen_API' -- cgit v1.2.3