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 949DFA0350; Sun, 21 Jun 2020 11:47:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B3851C012; Sun, 21 Jun 2020 11:47:04 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10041.outbound.protection.outlook.com [40.107.1.41]) by dpdk.org (Postfix) with ESMTP id 6296B1C002 for ; Sun, 21 Jun 2020 11:47:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MTEmemOzDOuXQD3/l/40BEBLV+0mDjmzE4mUPQog6S2GJ0YbD71Ph5ux/X5uG09RGktmFXmp42pPLQdRCZ24xXLjH6eFDwGbosf2Ri0OCovzGsYyjWb9tAxxejvfd8i8LqvYzIpJq06AbcjDqDLSSMMntrYB13d6YJRdRrePydA8PNAYe7oul8HVWA+MBjMRT5MoU44vcVN59C6BBdA2QVyw/DQtJprYW49vcQsgavpn9CxKEGVObbWkPvFCpzO5ZH2jXSqAu8NQezgne8uM/46PwIcvIUNt46kszFbOg3TJrFk4IrZG6+llDZJceB6/t+Ln16t2jYiF8C6a9WHxPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8/fvLGayIq95fzhsbaVX1+MbyI9f2D29b1czZy9Uzu4=; b=FP7C8LskdsJ4TzEDv2mntFS/SrZDR9VvgBcODYLULuRaduXlBkYf21W33CQaVYyexVqzdzuXInuXxlLkuauYWbHFXN9PMSLx62Kv+ASI0Uim6uTOEsXDQBD+s1w0uR9td6EOv/232rHOWWa2K18Xifhlec6gYcIswbFY1OPoKEqSHRauWM884hyJjHWBxJFSoYA64Davf+06Oc6g+bj19sC/IHfmXAltRqAvmHhBhXP7ZGDfA8LZkR8BEIbh/Ird9ikpP5bkxrLUyJ3sFhdTjYD4FvllE4q5sdsBujc9+YU06izvItd0y7GcfS4fc0BlM8hXtRaJHr/Ad2l1s2OBqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8/fvLGayIq95fzhsbaVX1+MbyI9f2D29b1czZy9Uzu4=; b=RUnwsjWOEJRypL/aA3/0Kak4G8hKN7iOzvMEN9bzZ0w8fU/p6N4OQ6Yg5dblm20i8eTRA4KAFP/hAjU+eE22TKWuOqT1H3JmN7hyjbwGByLPI959yEUGrfpFjhbDmPlsL8DZlT+vHkECjd5m7BTygw5NUZ3o5qM7Y75ftzo+DTo= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) by VI1PR04MB5501.eurprd04.prod.outlook.com (2603:10a6:803:d3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Sun, 21 Jun 2020 09:47:00 +0000 Received: from VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::d4d6:f65d:34cd:aa43]) by VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::d4d6:f65d:34cd:aa43%3]) with mapi id 15.20.3109.025; Sun, 21 Jun 2020 09:47:00 +0000 To: jerinj@marvell.com, dev@dpdk.org References: <20200617063047.1555518-1-jerinj@marvell.com> <20200617063047.1555518-7-jerinj@marvell.com> From: "Sachin Saxena (OSS)" Message-ID: <852ed5bc-ebf0-d167-a290-606ce8cc1474@oss.nxp.com> Date: Sun, 21 Jun 2020 15:16:52 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 In-Reply-To: <20200617063047.1555518-7-jerinj@marvell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: SG2PR06CA0196.apcprd06.prod.outlook.com (2603:1096:4:1::28) To VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.10] (223.190.62.152) by SG2PR06CA0196.apcprd06.prod.outlook.com (2603:1096:4:1::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Sun, 21 Jun 2020 09:46:58 +0000 X-Originating-IP: [223.190.62.152] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e5789552-3251-4b9f-a4ad-08d815c80b33 X-MS-TrafficTypeDiagnostic: VI1PR04MB5501: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-Forefront-PRVS: 04410E544A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: il2gG5+mgjsrOQMuDTRx4RTfLZyog8iMUUkbZ6zQmUN7LoGmSlMm7ng9QYlS9OhYEGOh+FCDeRvGBzXpkdQPgA4b4tCVStZ2TdRNAL+Kz8dorvZU8Z9CX6jJtSzCYFu4P1zAXe+smKc90QQLeFZn8y6jlpLsy7g0fjL692WxmWy87KvLquytmOgt9LYSwP2kP+ynji7j+ym2mMlmPGYjQRqC3rTkp/pbcDk3z6F/HMem614vjZGahAuglbJJCoXB10sKh6J9+8MReU1qTImNjjF07Tjq/EkCVwncU7WCUddT6cW0wvdebIYBsS5e+YRWImkgjvUKFcUA8TrZrrBWjhrE7Hd7w/mptpfMOE0M/z6GuJpB/0U1yW/85ZBYFzJH X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5837.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(366004)(39850400004)(396003)(346002)(376002)(31686004)(186003)(478600001)(66556008)(2906002)(5660300002)(66946007)(6666004)(8936002)(6486002)(956004)(2616005)(66476007)(8676002)(52116002)(316002)(16526019)(31696002)(16576012)(26005)(53546011)(86362001)(83380400001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MUQX2sUsQg8V/9nRyY9z1yJTePtJgts2oA1jMARGYVmD7loTYLd1sI6rdaLmCHjW1vBCrjk+sClzQCr3sB1f2Su4OTEvlean5O9FXw/xoJbFiTavZfs9qgA6CAAbSsE/9oyMcRlUsVjaVHOznEJ5R+KFuntaZRBQ06YLBRP3mXfhC3BqDy50fJzLrUjmlWj6TggNbaYI5CSKQoldCRRHoQooE5SRumXYJxgj1aBtSZmeUKWR6948lyD5RvbaHAEdncr2ZH/5f97Cp+RpR0I1LduVS4lI03fh2KyIEAlR5UjsuXiQRO5mm+yFQ9X/CSaafmCkOP6fiQ+GV7whI8c397W6fxso+QxZcIRSiwVOgtVz1c5jVFWGfzW0qqYoFKp9oJ9HwkgkH009yUOyOHGDILE1IGEd7wIxnNKQpZ2mu/+nbixI0SjS030vzw9O6BlZqxwCWShOIdGmhr58oz4YTGBF6GnSPTQFYlPS3M0eHldNHzny6fKiWqgGka8Y1q0u X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5789552-3251-4b9f-a4ad-08d815c80b33 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2020 09:47:00.0550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: agN1bzRc+jiS4XKjWrZdwWEDo/sQygtorj2Y0PHwYFkf9nSdO7/LjIwWzzSbWUZx7mDlO8dXq7VsIoDLsYyJeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5501 Subject: Re: [dpdk-dev] [PATCH 06/13] drivers/mempool: use log register macro 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" Acked-by: Sachin Saxena On 17-Jun-20 12:00 PM, jerinj@marvell.com wrote: > From: Jerin Jacob > > Use log register macro to avoid the code duplication > in the log registration process. > > Signed-off-by: Jerin Jacob > --- > drivers/mempool/dpaa/dpaa_mempool.c | 10 ++-------- > drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 10 +--------- > drivers/mempool/octeontx/octeontx_fpavf.c | 10 +--------- > 3 files changed, 4 insertions(+), 26 deletions(-) > > diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c > index 451e2d5d5..8d1da8028 100644 > --- a/drivers/mempool/dpaa/dpaa_mempool.c > +++ b/drivers/mempool/dpaa/dpaa_mempool.c > @@ -36,7 +36,8 @@ struct dpaa_memseg_list rte_dpaa_memsegs > = TAILQ_HEAD_INITIALIZER(rte_dpaa_memsegs); > > struct dpaa_bp_info *rte_dpaa_bpid_info; > -int dpaa_logtype_mempool; > + > +RTE_LOG_REGISTER(dpaa_logtype_mempool, mempool.dpaa, NOTICE); > > static int > dpaa_mbuf_create_pool(struct rte_mempool *mp) > @@ -357,10 +358,3 @@ static const struct rte_mempool_ops dpaa_mpool_ops = { > }; > > MEMPOOL_REGISTER_OPS(dpaa_mpool_ops); > - > -RTE_INIT(dpaa_mp_init_log) > -{ > - dpaa_logtype_mempool = rte_log_register("mempool.dpaa"); > - if (dpaa_logtype_mempool >= 0) > - rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE); > -} > diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > index fa9b53e64..97ce08d78 100644 > --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > @@ -36,9 +36,6 @@ > struct dpaa2_bp_info *rte_dpaa2_bpid_info; > static struct dpaa2_bp_list *h_bp_list; > > -/* Dynamic logging identified for mempool */ > -int dpaa2_logtype_mempool; > - > static int > rte_hw_mbuf_create_pool(struct rte_mempool *mp) > { > @@ -454,9 +451,4 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = { > > MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops); > > -RTE_INIT(dpaa2_mempool_init_log) > -{ > - dpaa2_logtype_mempool = rte_log_register("mempool.dpaa2"); > - if (dpaa2_logtype_mempool >= 0) > - rte_log_set_level(dpaa2_logtype_mempool, RTE_LOG_NOTICE); > -} > +RTE_LOG_REGISTER(dpaa2_logtype_mempool, mempool.dpaa2, NOTICE); > diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c > index 0ff234913..339da7824 100644 > --- a/drivers/mempool/octeontx/octeontx_fpavf.c > +++ b/drivers/mempool/octeontx/octeontx_fpavf.c > @@ -105,15 +105,7 @@ struct octeontx_fpadev { > > static struct octeontx_fpadev fpadev; > > -int octeontx_logtype_fpavf; > -int octeontx_logtype_fpavf_mbox; > - > -RTE_INIT(otx_pool_init_log) > -{ > - octeontx_logtype_fpavf = rte_log_register("pmd.mempool.octeontx"); > - if (octeontx_logtype_fpavf >= 0) > - rte_log_set_level(octeontx_logtype_fpavf, RTE_LOG_NOTICE); > -} > +RTE_LOG_REGISTER(octeontx_logtype_fpavf, pmd.mempool.octeontx, NOTICE); > > /* lock is taken by caller */ > static int