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 7A36FA053D; Wed, 5 Aug 2020 16:51:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD83337B4; Wed, 5 Aug 2020 16:51:09 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 0545E2C23 for ; Wed, 5 Aug 2020 16:51:07 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D876F5C00CD; Wed, 5 Aug 2020 10:51:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 05 Aug 2020 10:51:04 -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; s=fm1; bh=ijW2Cb/P1pd9q 8fDjniVWtOT4UfoXydXgfTMCIXzzrI=; b=c9CNwtdJYDxu8AIwKwHrPzs/A1mmI H1RW9CcFdXh7hxhnxZdOgtPuJrsvjMQ4GZCWSov70pflDMCPyQjOufUSV1qAtuJT 7fp/9mNXpXSGfhzbNYO6b2UagR+OirnhKF3mcWArPkt0sKApOQFRUkl2IF1Myqhd wXGQXv6MtEPaM/pa3Agp3HirZCo1je24GDR5+XV0CoSHzTHZmlNlwrma88hjxlBv z98iz0R1kLilEz2FlpMbp3Lmz19p/ezeTzYhqcAUZdLMpYdiwbhSOR/MAuNIHYy1 5fIB1uMkF6qp0ErWSQT69ymqnypECzQwXO2pN+CpsxMEsiiUoflCsVnWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=ijW2Cb/P1pd9q8fDjniVWtOT4UfoXydXgfTMCIXzzrI=; b=EB3TX+Cm iO91PcBiZ1r9IUi11oRyXrDgyUDQ8VPalyThhv0Ues9jR7+1PCfDE3hpM3dRF7ZG K39ZG1yZmXVv1sf+Cc5huNcDc4yHXpWOzyZM9bd5R2pgB3L1wXV3lMrGhZk7ZwoZ ORISS4NVKGlVaDiqGk/x+rpmo7xaQ1xyFxqBUa6yn7a7NIHXoKpCff47ofxRBufb INACceZMpEdHn9e/zf/l1IEBUEuEc6HlEnSFZzaviZKGLCShViKvpHlUQzES8Xts gOpj+jjoKcqog4QXtG+lNA9izifV6R7Hjepmlm0h8XwRKb1ZmYdaUhsb0Ba9J+iu fhAmOijXzxx+yg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrjeekgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepffehteduleeugfehveehge fhhfefhefhleefkeekffejfeejudefudevtdfhieetnecuffhomhgrihhnpegurhhivhgv rhdrnhgrmhgvnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C8A833280066; Wed, 5 Aug 2020 10:51:03 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, orika@mellanox.com, matan@mellanox.com Date: Wed, 5 Aug 2020 16:51:01 +0200 Message-Id: <20200805145101.107060-1-thomas@monjalon.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <1596031264-59994-1-git-send-email-orika@mellanox.com> References: <1596031264-59994-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] regex/mlx5: fix registered driver name 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" The driver name was registered as "net_mlx5_regex". It is renamed as "regex_mlx5". The same name is used in mlx5_regex_driver.pci_driver.driver.name, instead of "mlx5_regex", for consistency. The string used for log registration (pmd.regex.mlx5) could be derived from the driver name. A macro is created so name definitions are close. Fixes: cfc672a90b74 ("regex/mlx5: support probing") Signed-off-by: Thomas Monjalon --- v2: add macros and fix PCI driver name --- drivers/regex/mlx5/mlx5_regex.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c index ae9f00189e..605ebcfe0e 100644 --- a/drivers/regex/mlx5/mlx5_regex.c +++ b/drivers/regex/mlx5/mlx5_regex.c @@ -19,6 +19,9 @@ #include "mlx5_regex_utils.h" #include "mlx5_rxp_csrs.h" +#define MLX5_REGEX_DRIVER_NAME regex_mlx5 +#define MLX5_REGEX_LOG_NAME pmd.regex.mlx5 + int mlx5_regex_logtype; const struct rte_regexdev_ops mlx5_regexdev_ops = { @@ -250,7 +253,7 @@ static struct mlx5_pci_driver mlx5_regex_driver = { .driver_class = MLX5_CLASS_REGEX, .pci_driver = { .driver = { - .name = "mlx5_regex", + .name = RTE_STR(MLX5_REGEX_DRIVER_NAME), }, .id_table = mlx5_regex_pci_id_map, .probe = mlx5_regex_pci_probe, @@ -266,7 +269,7 @@ RTE_INIT(rte_mlx5_regex_init) mlx5_pci_driver_register(&mlx5_regex_driver); } -RTE_LOG_REGISTER(mlx5_regex_logtype, pmd.regex.mlx5, NOTICE) -RTE_PMD_EXPORT_NAME(net_mlx5_regex, __COUNTER__); -RTE_PMD_REGISTER_PCI_TABLE(net_mlx5_regex, mlx5_regex_pci_id_map); -RTE_PMD_REGISTER_KMOD_DEP(net_mlx5_regex, "* ib_uverbs & mlx5_core & mlx5_ib"); +RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE) +RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__); +RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map); +RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib"); -- 2.27.0