DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Cc: andrew.rybchenko@oktetlabs.ru
Subject: Re: [dpdk-dev] [PATCH v5 3/3] devtools: check flow API doc tables
Date: Thu, 13 May 2021 19:40:31 +0100
Message-ID: <4f9eadeb-a0eb-4eb1-a443-141a3fb6ae0d@intel.com> (raw)
In-Reply-To: <20210407223320.2952469-4-thomas@monjalon.net>

On 4/7/2021 11:33 PM, Thomas Monjalon wrote:
> The script check-doc-vs-code.sh may be used to add
> some automatic checks of the doc.
> 
> If run without any argument, a complete check is done.
> The optional argument is a git history reference point
> to check faster only what has changed since this commit.
> 
> In this commit, the only check is for rte_flow tables,
> achieved through the script parse-flow-support.sh.
> If run without a .ini reference, it prints rte_flow tables.
> Note: detected features are marked with the value Y,
> while the real .ini file could have special values like I.
> The script allow parsing exceptions (exclude or include),
> like for bnxt code which lists unsupported items and actions.
> 

Thanks for the scripts.

> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/check-doc-vs-code.sh  | 79 ++++++++++++++++++++++++++++++++++
>  devtools/parse-flow-support.sh | 76 ++++++++++++++++++++++++++++++++
>  2 files changed, 155 insertions(+)
>  create mode 100755 devtools/check-doc-vs-code.sh
>  create mode 100755 devtools/parse-flow-support.sh
> 
> diff --git a/devtools/check-doc-vs-code.sh b/devtools/check-doc-vs-code.sh
> new file mode 100755
> index 0000000000..6e53d66899
> --- /dev/null
> +++ b/devtools/check-doc-vs-code.sh
> @@ -0,0 +1,79 @@
> +#! /bin/sh -e
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright 2021 Mellanox Technologies, Ltd
> +
> +# Check whether doc & code are in sync.
> +# Optional argument: check only what changed since a commit.
> +trusted_commit=$1 # example: origin/main
> +
> +selfdir=$(dirname $(readlink -f $0))
> +rootdir=$(readlink -f $selfdir/..)
> +
> +result=0
> +
> +# speed up by ignoring Unicode details
> +export LC_COLLATE=C
> +
> +changed_files()
> +{
> +	[ -n "$files" ] ||
> +		files=$(git diff-tree --name-only -r $trusted_commit..)
> +	echo "$files"
> +}
> +
> +has_code_change() # <pattern>
> +{
> +	test -n "$(git log --format='%h' -S"$1" $trusted_commit..)"
> +}
> +
> +has_file_change() # <pattern>
> +{
> +	changed_files | grep -q "$1"
> +}
> +
> +changed_net_drivers()
> +{
> +	net_paths='drivers/net/|doc/guides/nics/features/'
> +	[ -n "$drivers" ] ||
> +		drivers=$(changed_files |
> +			sed -rn "s,^($net_paths)([^./]*).*,\2,p")
> +	echo "$drivers"
> +}

I will not reviewed in details yet, but first observation,
when 'trusted_commit' argument is used, the drivers list has many duplicated
entries which makes the output redundant and makes script take too much time.
Getting only unique list may help on it.

  reply	other threads:[~2021-05-13 18:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 17:05 [dpdk-dev] [PATCH] doc: add new tables for rte flow items and actions support Asaf Penso
2021-02-04 22:09 ` Thomas Monjalon
2021-02-07  8:46   ` Asaf Penso
2021-02-07  9:44     ` Thomas Monjalon
2021-02-07  9:27 ` [dpdk-dev] [PATCH v2] " Asaf Penso
2021-02-07 10:46   ` [dpdk-dev] [PATCH v3] " Asaf Penso
2021-02-07 10:52     ` [dpdk-dev] [PATCH v4] " Asaf Penso
2021-02-08 12:58       ` Thomas Monjalon
2021-02-16 13:13       ` Ferruh Yigit
2021-02-17  5:57         ` Asaf Penso
2021-02-17 10:37           ` Ferruh Yigit
2021-02-17 10:49             ` Thomas Monjalon
2021-02-18 16:12               ` Asaf Penso
2021-02-18 17:58               ` Ajit Khaparde
2021-02-18 18:45                 ` Ferruh Yigit
2021-04-06 15:07                   ` Thomas Monjalon
2021-04-07 22:33 ` [dpdk-dev] [PATCH v5 0/3] rte_flow doc matrix Thomas Monjalon
2021-04-07 22:33   ` [dpdk-dev] [PATCH v5 1/3] doc: rename sfc features file Thomas Monjalon
2021-04-07 22:33   ` [dpdk-dev] [PATCH v5 2/3] doc: add flow API features tables Thomas Monjalon
2021-04-08  8:45     ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2021-05-14 10:42     ` [dpdk-dev] " Ferruh Yigit
2021-05-14 11:52       ` Thomas Monjalon
2021-04-07 22:33   ` [dpdk-dev] [PATCH v5 3/3] devtools: check flow API doc tables Thomas Monjalon
2021-05-13 18:40     ` Ferruh Yigit [this message]
2021-05-18 12:46       ` Thomas Monjalon
2021-05-14 10:51     ` Ferruh Yigit
2021-05-18 10:33       ` Thomas Monjalon
2021-05-18 13:28 ` [dpdk-dev] [PATCH v6 0/3] rte_flow doc matrix Thomas Monjalon
2021-05-18 13:28   ` [dpdk-dev] [PATCH v6 1/3] doc: rename sfc features file Thomas Monjalon
2021-05-18 13:28   ` [dpdk-dev] [PATCH v6 2/3] doc: add flow API features tables Thomas Monjalon
2021-05-18 13:28   ` [dpdk-dev] [PATCH v6 3/3] devtools: check flow API doc tables Thomas Monjalon
2021-05-18 16:54   ` [dpdk-dev] [PATCH v6 0/3] rte_flow doc matrix Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f9eadeb-a0eb-4eb1-a443-141a3fb6ae0d@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git