From patchwork Thu Mar 31 21:28:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 109047 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42B03A04FF; Thu, 31 Mar 2022 23:29:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40BF84290A; Thu, 31 Mar 2022 23:28:56 +0200 (CEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 4D0F94014F for ; Thu, 31 Mar 2022 23:28:54 +0200 (CEST) Received: by mail-lf1-f41.google.com with SMTP id d5so1417318lfj.9 for ; Thu, 31 Mar 2022 14:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o36aRFEl77hR+F6pvDZpVJ5cRqKfmPSpnhDyp1iyr44=; b=W+5LjinVcLDidc+t4xHhcdf2aW0mYsLC6Mw2KkN7yzmFmDuY17LnVSU0CYOpziyZhR wio2sIox8S3Pdw7HDLFYGc2gVqW7IgqvSzeximzGYoMWi6WbstWc+tperTLORh3HqDj5 yDciiXJoPsSd0wsu2MoOYubM+oZnKHjlr1PteXJpkBn7SRITNJHxKS7tCklZHlZwS+TD BatMo1seQwI3QSd1aUSWEDVjGbmJlkakfAdPvACR6oMbh2WnNfjlu47PkgvnCd6aHZXz jptXe2uYft7rra2uBZJ73glet07k2N6mH1UzMmXvNE0j4c+A/OzZG3tcKhhqzjI45bV2 5TmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o36aRFEl77hR+F6pvDZpVJ5cRqKfmPSpnhDyp1iyr44=; b=ay9vNYld3eaX0jzvxfV9s1c7EAiDPPoT5whPbiRDYsk6u+xcAgvm6FeuWlmOWHTy3E VsO+fIIlmyJeXl8YF+q20UcFsnIuLGEx4HNIUGyoOR3yYo2yb9pb5F5N/tKy7OudkkJy C2IOxTg+TIBfeXZQ/h279kGSyosnhfE+ngnKOB+3PGdGfcueq9J+ii2JIw2qw326/jhY mnJY6G9qj+scDuSrQrk7+IAC0+XNsJea6XxKnN6oRZXa0Y6TH7qkmSCleLevH3dWwqKL 268G12N0Cq5yY5iTI2HYtBJP5opmsqVwUcWoNSWaHCT89uT+Gs0QbN/IHO3Tv44qcr7f Dk9Q== X-Gm-Message-State: AOAM5321OF6eiddtzxQ7uMJn5U7axicQh3GHtnKxIKkwZffsJqeagZaJ /v/JEc2zaQIrUOpAxG5zeslF+y2ZgSE= X-Google-Smtp-Source: ABdhPJwKna0EPIjfh6S2nOXqIUE/+NFVxZ44GBAWxAHGWzZUHMk3ToGqhyInTkn0+PNmKQxDzVgqvQ== X-Received: by 2002:a05:6512:1301:b0:439:73a2:7ca3 with SMTP id x1-20020a056512130100b0043973a27ca3mr11566379lfu.685.1648762133601; Thu, 31 Mar 2022 14:28:53 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id o7-20020ac24c47000000b0044a15c4e0aesm47567lfk.272.2022.03.31.14.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 14:28:53 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Vipin Varghese , Dmitry Kozlyuk Subject: [PATCH 1/3] doc: simplify CSS customization for Doxygen Date: Fri, 1 Apr 2022 00:28:28 +0300 Message-Id: <20220331212830.708912-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> References: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org CSS for API documentation was customized by a shell script modifying the file that Doxygen produces. This way CSS code is kept in a script and an extra build step is added. Move custom style to a plain CSS file. Use Doxygen capability to attach this extra stylesheet. Signed-off-by: Dmitry Kozlyuk --- doc/api/custom.css | 6 ++++++ doc/api/doxy-api.conf.in | 1 + doc/api/doxy-html-custom.sh | 8 -------- doc/api/generate_doxygen.sh | 3 --- doc/api/meson.build | 3 +-- 5 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 doc/api/custom.css delete mode 100755 doc/api/doxy-html-custom.sh diff --git a/doc/api/custom.css b/doc/api/custom.css new file mode 100644 index 0000000000..66360f9b48 --- /dev/null +++ b/doc/api/custom.css @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2013 6WIND S.A. + */ + +/* space between item and its comment */ +dd td:first-child { padding-right: 2em; } diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in index db2ca9b6ed..8e961cbc8c 100644 --- a/doc/api/doxy-api.conf.in +++ b/doc/api/doxy-api.conf.in @@ -102,6 +102,7 @@ ALPHABETICAL_INDEX = NO HTML_TIMESTAMP = NO HTML_DYNAMIC_SECTIONS = YES +HTML_EXTRA_STYLESHEET = @TOPDIR@/doc/api/custom.css SEARCHENGINE = YES SORT_MEMBER_DOCS = NO SOURCE_BROWSER = YES diff --git a/doc/api/doxy-html-custom.sh b/doc/api/doxy-html-custom.sh deleted file mode 100755 index 3802007c8c..0000000000 --- a/doc/api/doxy-html-custom.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /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/doc/api/generate_doxygen.sh b/doc/api/generate_doxygen.sh index 1350e50491..1940ea46e2 100755 --- a/doc/api/generate_doxygen.sh +++ b/doc/api/generate_doxygen.sh @@ -4,12 +4,9 @@ DOXYCONF=$1 OUTDIR=$2 -SCRIPTCSS=$3 OUT_FILE=$(dirname $OUTDIR)/doxygen.out # run doxygen, capturing all the header files it processed doxygen "${DOXYCONF}" > $OUT_FILE echo "$OUTDIR: $(awk '/Preprocessing/ {printf("%s ", substr($2, 1, length($2) - 3))}' $OUT_FILE)" > $OUTDIR.d - -"${SCRIPTCSS}" "${OUTDIR}"/doxygen.css diff --git a/doc/api/meson.build b/doc/api/meson.build index 5c25b92092..53338a02d6 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -13,7 +13,6 @@ endif # 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') @@ -52,7 +51,7 @@ doxy_build = custom_target('doxygen', input: doxy_conf, output: 'html', depfile: 'html.d', - command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css], + command: [generate_doxygen, '@INPUT@', '@OUTPUT@'], install: get_option('enable_docs'), install_dir: htmldir, build_by_default: get_option('enable_docs')) From patchwork Thu Mar 31 21:28:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 109048 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21D52A04FF; Thu, 31 Mar 2022 23:29:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A16642911; Thu, 31 Mar 2022 23:28:57 +0200 (CEST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mails.dpdk.org (Postfix) with ESMTP id 64C3342906 for ; Thu, 31 Mar 2022 23:28:55 +0200 (CEST) Received: by mail-lf1-f46.google.com with SMTP id h7so1491719lfl.2 for ; Thu, 31 Mar 2022 14:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/jEtYhtBSyZJU/cgcsW8PkBejNxUNKDaaehcNS1r7RA=; b=pAr/advWoaUvrFHlQop6UMc1+toN4BlML/fRrln/3EEdqxd2k2v8wQc2qgxPnuhxgy BwnVy+ZQbinq4dWtN1I6zqqVGxXd4t6i0NC69jjNW9OBTDK9EiCvWbNycSY3cEAWmu5G EhSCKFwD2/pGmQpFk09oZGkxHEOCjYZ6eMNhWgVpCJoHfzgCMPHXWf0o5Lo6XeXT0SY2 Crs3MVmUKIktkf++gVQDiue1Ayuet+0cm0z3vTliXyP9zwxzfNZj3CaJPyr6KOpvYWdb bwaGlr9l5hlXPQ/EHhTRs5uFAT4uwIpHAvQr77xhF8IHaoMnfsNe4nsjybfwJ14GnXj/ iX6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/jEtYhtBSyZJU/cgcsW8PkBejNxUNKDaaehcNS1r7RA=; b=oR7GmSkVgBEP4gQhcDE9NDGAsQGGidwZDihAB2fgpFzquK1kC4zurM8ElWA9kdU4DZ CTO7WGJ892uzGhfvfcg3jfpatFqVCFCNVrZ3XYtuwo9U8Mdp2H4iJ6At1RAhs6G7YNhp BzlXCkrgopx5XfAKmbCN+vyzwnufj+Y3GOUlxTZl4735S7pdabjyyBv1+hgoARWLj6yp wZTM7+xSyYPcFNxHP9KZUVAhUtgy6yeItkloOQwnvoNctaqCxxIP2yQRqUDMaLVoFN2k adOYeM05SnYGiZ5N1Cr1iL6H5Tdy8OP9FiwYSx4yWZAGUk+hcBGXmdqhNE0vgwPUGdK4 n0aw== X-Gm-Message-State: AOAM5337XVTqvbfLdBNSxdwdpMQwX0g67hjq+HpCsA8KlzYhVFlQy2sU rNgfVfcfn4sOD27q8wcJiyhXkubiKuQ= X-Google-Smtp-Source: ABdhPJzmf3cD5mcWcEMJwJwmrnDVNvfpSDs12cY4oTuZov+N2GY7W3zHYcGAzBMl+nc1XtefMEq2Zw== X-Received: by 2002:a05:6512:693:b0:44a:d435:6237 with SMTP id t19-20020a056512069300b0044ad4356237mr1756146lfe.656.1648762134535; Thu, 31 Mar 2022 14:28:54 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id o7-20020ac24c47000000b0044a15c4e0aesm47567lfk.272.2022.03.31.14.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 14:28:54 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Vipin Varghese , Dmitry Kozlyuk , Olivier Matz , Thomas Monjalon , David Marchand Subject: [PATCH 2/3] doc: fix API index Markdown syntax Date: Fri, 1 Apr 2022 00:28:29 +0300 Message-Id: <20220331212830.708912-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> References: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org API documentation index had spaces between link caption and URL, which may be unsupported by some Markdown implementations. That is, "[caption](URL)" is valid but "[caption] (URL)" is not. The problematic behavior is observed with Doxygen on Windows. Remove the spaces. Unfortunately, Markdown syntax is not formally specified. Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen") Signed-off-by: Dmitry Kozlyuk --- I believe there's no need for this patch in stable releases, because it was never an issue until an attempt to build on Windows. doc/api/doxy-api-index.md | 366 +++++++++++++++++++------------------- 1 file changed, 183 insertions(+), 183 deletions(-) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 4245b9635c..baecb2e52e 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -9,222 +9,222 @@ 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), - [regexdev] (@ref rte_regexdev.h), - [dmadev] (@ref rte_dmadev.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) + [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), + [regexdev](@ref rte_regexdev.h), + [dmadev](@ref rte_dmadev.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), - [iavf] (@ref rte_pmd_iavf.h), - [ioat] (@ref rte_ioat_rawdev.h), - [bnxt] (@ref rte_pmd_bnxt.h), - [dpaa] (@ref rte_pmd_dpaa.h), - [dpaa2] (@ref rte_pmd_dpaa2.h), - [mlx5] (@ref rte_pmd_mlx5.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), - [dlb2] (@ref rte_pmd_dlb2.h), - [ifpga] (@ref rte_pmd_ifpga.h) + [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), + [iavf](@ref rte_pmd_iavf.h), + [ioat](@ref rte_ioat_rawdev.h), + [bnxt](@ref rte_pmd_bnxt.h), + [dpaa](@ref rte_pmd_dpaa.h), + [dpaa2](@ref rte_pmd_dpaa2.h), + [mlx5](@ref rte_pmd_mlx5.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), + [dlb2](@ref rte_pmd_dlb2.h), + [ifpga](@ref rte_pmd_ifpga.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) + [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) + [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), - [pflock] (@ref rte_pflock.h), - [rwlock] (@ref rte_rwlock.h), - [spinlock] (@ref rte_spinlock.h), - [ticketlock] (@ref rte_ticketlock.h), - [RCU] (@ref rte_rcu_qsbr.h) + [atomic](@ref rte_atomic.h), + [mcslock](@ref rte_mcslock.h), + [pflock](@ref rte_pflock.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), - [power management] (@ref rte_power_intrinsics.h) + [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), + [power management](@ref rte_power_intrinsics.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), - [PMD power] (@ref rte_power_pmd_mgmt.h) + [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), + [PMD power](@ref rte_power_pmd_mgmt.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), - [frag/reass] (@ref rte_ip_frag.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), - [GRE] (@ref rte_gre.h), - [MPLS] (@ref rte_mpls.h), - [VXLAN] (@ref rte_vxlan.h), - [Geneve] (@ref rte_geneve.h), - [eCPRI] (@ref rte_ecpri.h), - [L2TPv2] (@ref rte_l2tpv2.h), - [PPP] (@ref rte_ppp.h) + [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), + [frag/reass](@ref rte_ip_frag.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), + [GRE](@ref rte_gre.h), + [MPLS](@ref rte_mpls.h), + [VXLAN](@ref rte_vxlan.h), + [Geneve](@ref rte_geneve.h), + [eCPRI](@ref rte_ecpri.h), + [L2TPv2](@ref rte_l2tpv2.h), + [PPP](@ref rte_ppp.h) - **QoS**: - [metering] (@ref rte_meter.h), - [scheduler] (@ref rte_sched.h), - [RED congestion] (@ref rte_red.h) + [metering](@ref rte_meter.h), + [scheduler](@ref rte_sched.h), + [RED congestion](@ref rte_red.h) - **routing**: - [LPM IPv4 route] (@ref rte_lpm.h), - [LPM IPv6 route] (@ref rte_lpm6.h), - [RIB IPv4] (@ref rte_rib.h), - [RIB IPv6] (@ref rte_rib6.h), - [FIB IPv4] (@ref rte_fib.h), - [FIB IPv6] (@ref rte_fib6.h) + [LPM IPv4 route](@ref rte_lpm.h), + [LPM IPv6 route](@ref rte_lpm6.h), + [RIB IPv4](@ref rte_rib.h), + [RIB IPv6](@ref rte_rib6.h), + [FIB IPv4](@ref rte_fib.h), + [FIB IPv6](@ref rte_fib6.h) - **hashes**: - [hash] (@ref rte_hash.h), - [jhash] (@ref rte_jhash.h), - [thash] (@ref rte_thash.h), - [thash_gfni] (@ref rte_thash_gfni.h), - [FBK hash] (@ref rte_fbk_hash.h), - [CRC hash] (@ref rte_hash_crc.h) + [hash](@ref rte_hash.h), + [jhash](@ref rte_jhash.h), + [thash](@ref rte_thash.h), + [thash_gfni](@ref rte_thash_gfni.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) + [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) + [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) + * [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) * SWX pipeline: - [control] (@ref rte_swx_ctl.h), - [extern] (@ref rte_swx_extern.h), - [pipeline] (@ref rte_swx_pipeline.h) + [control](@ref rte_swx_ctl.h), + [extern](@ref rte_swx_extern.h), + [pipeline](@ref rte_swx_pipeline.h) * SWX port: - [port] (@ref rte_swx_port.h), - [ethdev] (@ref rte_swx_port_ethdev.h), - [fd] (@ref rte_swx_port_fd.h), - [ring] (@ref rte_swx_port_ring.h), - [src/sink] (@ref rte_swx_port_source_sink.h) + [port](@ref rte_swx_port.h), + [ethdev](@ref rte_swx_port_ethdev.h), + [fd](@ref rte_swx_port_fd.h), + [ring](@ref rte_swx_port_ring.h), + [src/sink](@ref rte_swx_port_source_sink.h) * SWX table: - [table] (@ref rte_swx_table.h), - [table_em] (@ref rte_swx_table_em.h) - [table_wm] (@ref rte_swx_table_wm.h) - * [graph] (@ref rte_graph.h): - [graph_worker] (@ref rte_graph_worker.h) + [table](@ref rte_swx_table.h), + [table_em](@ref rte_swx_table_em.h) + [table_wm](@ref rte_swx_table_wm.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) + [eth_node](@ref rte_node_eth_api.h), + [ip4_node](@ref rte_node_ip4_api.h) - **basic**: - [bitops] (@ref rte_bitops.h), - [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) + [bitops](@ref rte_bitops.h), + [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), - [pcapng] (@ref rte_pcapng.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) + [jobstats](@ref rte_jobstats.h), + [telemetry](@ref rte_telemetry.h), + [pcapng](@ref rte_pcapng.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) + [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) From patchwork Thu Mar 31 21:28:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 109049 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF373A04FF; Thu, 31 Mar 2022 23:29:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C15C4291B; Thu, 31 Mar 2022 23:28:59 +0200 (CEST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mails.dpdk.org (Postfix) with ESMTP id 05A0442906 for ; Thu, 31 Mar 2022 23:28:56 +0200 (CEST) Received: by mail-lf1-f53.google.com with SMTP id m3so1398586lfj.11 for ; Thu, 31 Mar 2022 14:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FVAukTJH18Iz4PBvgHAgcL0tigKWWbbX4DDbFW4cEn4=; b=efqI/zeSNSxu+14yiy8Amxt3zKij6F/GJ/kD/eKeeCm/t9Vrw6pExQ+WwmOO1eee2X gOdDDEe6x+1dq0N24ZNKAEyqzrcPyNJ0VeVRf55u6QKRRP76HxehdPTsYKGhhkTRYkv4 7RfOYvNrCKnEV2wHfIVEekxhaedvCFLRvHT0/cbuYZBvTI42F2JHhcF0o9q42zrrXnpp t7M0gEmG1f9JIYRK0UAHoD7QR3BWYq72OkQV+YIwLnmfPaP8ZYvCkeZnEc8rcNh5G5uq vktzhoRiXkNR9ZdC/e4eFyTwr5eMeUuuoAXPbEAXpdzAIzzXl0WIvAfXb+4eQoB+klsa ANjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FVAukTJH18Iz4PBvgHAgcL0tigKWWbbX4DDbFW4cEn4=; b=RgJI3xofs5b3fWAtsMPxKVfWS0pawe7S6OCzuWCHgF+3FbmbFNVIeJjRnHyYY0tr5G ymTr/MTaCMGD7b+D6mUCxz03gEpa2IO9aGImjBZs06TKp9iyS6tSzn00p3uAdXr5sS/Z y05E0UV5UQUcK677p0Dwh50f1Cm/ui/NLTM+fv8M2Gb97GCwDun7xCMzYigkh3zTUBqw /Fb05nUURzyFP1fpwiZtEdrQbeZX1NkkMpnbT/MAdtk1jnvrFR3G9Tm2B8xp5wD0BBrC VrnKlCQERCB0CQSbFkSfzRBX78HcfRwfV/4+KfK/LrZgLLarPA3/C3sBJjRY3IZ4LYCf vD9w== X-Gm-Message-State: AOAM531ba/LCAIE1BbcnDGjmCXHJzZ1Z0sDx9XxYjUSd8I9Fh5zWFHcC 2Abt1In2SGaNsnQNehkvOVa1t7oGiuQ= X-Google-Smtp-Source: ABdhPJwNRiejVpAh+DcNKXWMOnj96gEDAvybASUAYptjInXu0sYwY6VT3YeTETk808FeI1j8kFEshg== X-Received: by 2002:a05:6512:3b2c:b0:44a:35fd:994c with SMTP id f44-20020a0565123b2c00b0044a35fd994cmr11822709lfv.473.1648762135344; Thu, 31 Mar 2022 14:28:55 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id o7-20020ac24c47000000b0044a15c4e0aesm47567lfk.272.2022.03.31.14.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 14:28:54 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Vipin Varghese , Dmitry Kozlyuk Subject: [PATCH 3/3] doc: rewrite shell scripts in Python Date: Fri, 1 Apr 2022 00:28:30 +0300 Message-Id: <20220331212830.708912-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> References: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Shell used in documentation generation could not run on Windows. Rewrite scripts in Python. New scripts use proper path separators and handle paths with spaces. Signed-off-by: Dmitry Kozlyuk Reviewed-by: Bruce Richardson --- doc/api/generate_doxygen.py | 19 +++++++++++++++++++ doc/api/generate_doxygen.sh | 12 ------------ doc/api/generate_examples.py | 31 +++++++++++++++++++++++++++++++ doc/api/generate_examples.sh | 20 -------------------- doc/api/meson.build | 6 +++--- 5 files changed, 53 insertions(+), 35 deletions(-) create mode 100644 doc/api/generate_doxygen.py delete mode 100755 doc/api/generate_doxygen.sh create mode 100644 doc/api/generate_examples.py delete mode 100755 doc/api/generate_examples.sh diff --git a/doc/api/generate_doxygen.py b/doc/api/generate_doxygen.py new file mode 100644 index 0000000000..2ccedf844e --- /dev/null +++ b/doc/api/generate_doxygen.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# (c) 2018 Luca Boccassi +# (c) 2022 Dmitry Kozlyuk + +import os, re, subprocess, sys + +pattern = re.compile('^Preprocessing (.*)...$') +out_dir, *doxygen_command = sys.argv[1:] +out_file = os.path.join(os.path.dirname(out_dir), 'doxygen.out') +dep_file = f'{out_dir}.d' +with open(out_file, 'w') as out: + subprocess.run(doxygen_command, check=True, stdout=out) +with open(out_file) as out, open(dep_file, 'w') as dep: + print(f'{out_dir}:', end=' ', file=dep) + for line in out: + match = re.match(pattern, line) + if match: + print(match.group(1), end=' ', file=dep) diff --git a/doc/api/generate_doxygen.sh b/doc/api/generate_doxygen.sh deleted file mode 100755 index 1940ea46e2..0000000000 --- a/doc/api/generate_doxygen.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018 Luca Boccassi - -DOXYCONF=$1 -OUTDIR=$2 - -OUT_FILE=$(dirname $OUTDIR)/doxygen.out - -# run doxygen, capturing all the header files it processed -doxygen "${DOXYCONF}" > $OUT_FILE -echo "$OUTDIR: $(awk '/Preprocessing/ {printf("%s ", substr($2, 1, length($2) - 3))}' $OUT_FILE)" > $OUTDIR.d diff --git a/doc/api/generate_examples.py b/doc/api/generate_examples.py new file mode 100644 index 0000000000..66933f9472 --- /dev/null +++ b/doc/api/generate_examples.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# (c) 2018 Luca Boccassi +# (c) 2022 Dmitry Kozlyuk + +import os, sys + +examples_dir, api_examples = sys.argv[1:] + +sources = [] +with open(f'{api_examples}.d', 'w') as dep: + print(f'{api_examples}:', end=' ', file=dep) + for root, _, files in os.walk(examples_dir): + for name in files: + is_source = name.endswith('.c') + if is_source or name == 'meson.meson.build': + path = os.path.join(root, name) + if is_source: + sources.append(path) + print(path , end=' ', file=dep) + +sys.stdout = open(api_examples, 'w') +print('/**') +print('@page examples DPDK Example Programs') +print() +for path in sources: + # Produce consistent output with forward slashes on all systems. + # Every \ in paths within examples directory is a separator, not escape. + relpath = os.path.relpath(path, examples_dir).replace('\\', '/') + print(f'@example examples/{relpath}') +print('*/') diff --git a/doc/api/generate_examples.sh b/doc/api/generate_examples.sh deleted file mode 100755 index 48574563ca..0000000000 --- a/doc/api/generate_examples.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018 Luca Boccassi - -EXAMPLES_DIR=$1 -API_EXAMPLES=$2 - -FIND=find - -# 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' \) | tr '\n' ' ' )" > ${API_EXAMPLES}.d - -exec > "${API_EXAMPLES}" -printf '/**\n' -printf '@page examples DPDK Example Programs\n\n' -$FIND "${EXAMPLES_DIR}" -type f -name '*.c' | - sed "s|${EXAMPLES_DIR}|@example examples|" | - LC_ALL=C sort -printf '*/\n' diff --git a/doc/api/meson.build b/doc/api/meson.build index 53338a02d6..2876a78a7e 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -11,8 +11,8 @@ endif # 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_doxygen = py3 + files('generate_doxygen.py') +generate_examples = py3 + files('generate_examples.py') htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk') @@ -51,7 +51,7 @@ doxy_build = custom_target('doxygen', input: doxy_conf, output: 'html', depfile: 'html.d', - command: [generate_doxygen, '@INPUT@', '@OUTPUT@'], + command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'], install: get_option('enable_docs'), install_dir: htmldir, build_by_default: get_option('enable_docs'))