From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 85D5AA052B; Thu, 30 Jul 2020 09:09:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A3DBDA69; Thu, 30 Jul 2020 09:09:01 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 637DC2AB for ; Thu, 30 Jul 2020 09:09:00 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id AC6D258028F; Thu, 30 Jul 2020 03:08:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 30 Jul 2020 03:08:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= weUguWh2bsxrlN2rmn7Z5N62AEK4vwK5BehbmraXKYk=; b=nMTRVzfzU1rZrJck 2ExoU9RFf8aGxzbPlOhetd9xbqApsXlyolcz0VPS1EwByznYhj+NljWIdHiZ5f0Z r+ww8F0onTLToTusZEoRk2Dyv/QOJl9/YC74LYibN0v9kYgr6fE/9JcIJYxQ8AN1 xZOOlTB7dgYn21oc/hifacfdANM7x6LWwkzFmkm/GvMXxM7oSCqF3s5s3m/tkh9C MuDpqi8dPJ0gYkCL+5AHpmoExdZB9qHFR6OQC6YRPXj6iiQ80NRQQIS4AyD38A/s T6c9tr6xUSMpMcSpxAHkHVyQvAduF9144dL1g+DZjI7jg6wIfjy+5PuJa8YehRG9 CMaTpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=weUguWh2bsxrlN2rmn7Z5N62AEK4vwK5BehbmraXK Yk=; b=SzPfe26OTAtUaSnh+UmfHFLlW+htbN3DD5qFNJknPl28nRYa4J1yFx2Ak EubF7EhewzLjKNHYT+2hV1o4N+hjMzRMkIcn/DkBCc385/LWQ7Pq6l06SvFor0qE nF8lFs/R4C8BH0shc+EAhyvcarah1Dritp5tcI8eZMgebXTHo4U5Bm1PufjRox90 EfEmri/oju4sZuenvoWSe46M+T9YxMXWPaJmXkxuEq4Q1CUw0CCjxpNGUbnS8Itr fIvrnUWhptXrKBOsxvCjfSS4Bwgs3o3fjFUFrwDKIVMgmTfOrK43mTWJP0RHuKgD U5jAWk4WYIj4mmnvFBdGtEXx3D6kg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieehgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepheehgefhleffhedtveffjedukedttddtvddthffhfffhveevvdeu heffgedtvdffnecuffhomhgrihhnpehvrghrshdrmhhknecukfhppeejjedrudefgedrvd dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 260753060067; Thu, 30 Jul 2020 03:08:48 -0400 (EDT) From: Thomas Monjalon To: Yuval Avnery , Ori Kam Cc: jerinj@marvell.com, xiang.w.wang@intel.com, matan@mellanox.com, viacheslavo@mellanox.com, John McNamara , Marko Kovacevic , 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 Date: Thu, 30 Jul 2020 09:08:47 +0200 Message-ID: <2965464.3eFNUZBfGT@thomas> In-Reply-To: <1596046198-134903-1-git-send-email-orika@mellanox.com> References: <1595793496-73205-1-git-send-email-orika@mellanox.com> <1596046198-134903-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] app/test-regex: add RegEx test application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 29/07/2020 20:09, Ori Kam: > From: Yuval Avnery > > 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 > Signed-off-by: Yuval Avnery [...] > +++ 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.