DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Yuval Avnery <yuvalav@mellanox.com>, Ori Kam <orika@mellanox.com>
Cc: jerinj@marvell.com, xiang.w.wang@intel.com, matan@mellanox.com,
	viacheslavo@mellanox.com, John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	dev@dpdk.org, guyk@marvell.com, dev@dpdk.org,
	pbhagavatula@marvell.com, shahafs@mellanox.com,
	hemant.agrawal@nxp.com, opher@mellanox.com, alexr@mellanox.com,
	dovrat@marvell.com, pkapoor@marvell.com, nipun.gupta@nxp.com,
	bruce.richardson@intel.com, yang.a.hong@intel.com,
	harry.chang@intel.com, gu.jian1@zte.com.cn,
	shanjiangh@chinatelecom.cn, zhangy.yun@chinatelecom.cn,
	lixingfu@huachentel.com, wushuai@inspur.com,
	yuyingxia@yxlink.com, fanchenggang@sunyainfo.com,
	davidfgao@tencent.com, liuzhong1@chinaunicom.cn,
	zhaoyong11@huawei.com, oc@yunify.com, jim@netgate.com,
	hongjun.ni@intel.com, deri@ntop.org, fc@napatech.com,
	arthur.su@lionic.com, rasland@mellanox.com
Subject: Re: [dpdk-dev] [PATCH v4] app/test-regex: add RegEx test application
Date: Thu, 30 Jul 2020 09:08:47 +0200	[thread overview]
Message-ID: <2965464.3eFNUZBfGT@thomas> (raw)
In-Reply-To: <1596046198-134903-1-git-send-email-orika@mellanox.com>

29/07/2020 20:09, Ori Kam:
> From: Yuval Avnery <yuvalav@mellanox.com>
> 
> Following the new RegEx class.
> There is a need to create a dedicated test application in order to
> validate this class and PMD.
> 
> Unlike net device this application loads data from a file.
> 
> This commit introduces the new RegEx test app.
> 
> The basic app flow:
> 1. Configure the RegEx device to use one queue, and set the rule
>    database, using precompiled file.
> 2. Allocate mbufs based on the requested number of jobs, each job will
> i  get one mbuf.
> 3. Enqueue as much as possible jobs.
> 4. Dequeue jobs.
> 5. if the number of dequeue jobs < requested number of jobs job to step
> 
> Signed-off-by: Ori Kam <orika@mellanox.com>
> Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
[...]
> +++ b/app/test-regex/Makefile
> @@ -0,0 +1,17 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright 2020 Mellanox Technologies, Ltd
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +APP = testregex

In order to match meson and the doc,
I rename to dpdk-test-regex.

> +
> +CFLAGS += -O3
> +CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API

Experimental API is already enabled via rte.vars.mk.
I remove this line.

[...]
> +enum app_args {
> +	ARG_HELP,
> +	ARG_RULES_FILE_NAME,
> +	ARG_DATA_FILE_NAME,
> +	ARG_NUM_OF_JOBS,
> +	ARG_PERF_MODE,
> +	ARG_NUM_OF_ITERATIONS,
> +
> +};

Extra blank line

[...]
> +error:
> +	if (rules)
> +		rte_free(rules);
> +	if (*mbuf_mp)
> +		rte_mempool_free(*mbuf_mp);
> +	return res;
> +
> +}
> +
> +static void
> +extbuf_free_cb(void *addr __rte_unused, void *fcb_opaque __rte_unused)
> +{
> +
> +}

Extra blank lines

[...]
> +       if (ret < 0)
> +               rte_exit(EXIT_FAILURE, "init port failed\n");
> +       ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
> +                       nb_iterations, data_file, nb_max_matches);
> +       if (ret < 0) {
> +               rte_mempool_free(mbuf_mp);
> +               rte_exit(EXIT_FAILURE, "RegEx function failed\n");
> +       }
> +       rte_mempool_free(mbuf_mp);
> +       return 0;

Should return EXIT_SUCCESS

[...]
> +``--help``
> +  prints this help

In the doc, it should be better to reword to "print application options".

The MAINTAINERS file must be updated for this new directory.

Applied with above minor changes, thanks.





      reply	other threads:[~2020-07-30  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26 19:58 [dpdk-dev] [PATCH v1] " Ori Kam
2020-07-27  4:50 ` Jerin Jacob
2020-07-27  5:12   ` Ori Kam
2020-07-27 16:36     ` Thomas Monjalon
2020-07-28  4:36       ` Ori Kam
2020-07-27 17:09 ` Thomas Monjalon
2020-07-28  4:29   ` Ori Kam
2020-07-29 11:13 ` [dpdk-dev] [PATCH v2] " Ori Kam
2020-07-29 11:26 ` [dpdk-dev] [PATCH v3] " Ori Kam
2020-07-29 13:54   ` Thomas Monjalon
2020-07-29 18:09 ` [dpdk-dev] [PATCH v4] " Ori Kam
2020-07-30  7:08   ` Thomas Monjalon [this message]

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=2965464.3eFNUZBfGT@thomas \
    --to=thomas@monjalon.net \
    --cc=alexr@mellanox.com \
    --cc=arthur.su@lionic.com \
    --cc=bruce.richardson@intel.com \
    --cc=davidfgao@tencent.com \
    --cc=deri@ntop.org \
    --cc=dev@dpdk.org \
    --cc=dovrat@marvell.com \
    --cc=fanchenggang@sunyainfo.com \
    --cc=fc@napatech.com \
    --cc=gu.jian1@zte.com.cn \
    --cc=guyk@marvell.com \
    --cc=harry.chang@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hongjun.ni@intel.com \
    --cc=jerinj@marvell.com \
    --cc=jim@netgate.com \
    --cc=john.mcnamara@intel.com \
    --cc=liuzhong1@chinaunicom.cn \
    --cc=lixingfu@huachentel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=matan@mellanox.com \
    --cc=nipun.gupta@nxp.com \
    --cc=oc@yunify.com \
    --cc=opher@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=pkapoor@marvell.com \
    --cc=rasland@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=shanjiangh@chinatelecom.cn \
    --cc=viacheslavo@mellanox.com \
    --cc=wushuai@inspur.com \
    --cc=xiang.w.wang@intel.com \
    --cc=yang.a.hong@intel.com \
    --cc=yuvalav@mellanox.com \
    --cc=yuyingxia@yxlink.com \
    --cc=zhangy.yun@chinatelecom.cn \
    --cc=zhaoyong11@huawei.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).