From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EFE7A0551; Fri, 26 Aug 2022 08:04:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 122E7410DC; Fri, 26 Aug 2022 08:04:20 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2095.outbound.protection.outlook.com [40.107.244.95]) by mails.dpdk.org (Postfix) with ESMTP id F3C2240146 for ; Fri, 26 Aug 2022 08:04:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ivx4mru+qZcyf9XmbLDcVcZODHTFb+lTzyIjX73f1I6XAETtW3YgrFHd0mU8PafbwA3vwI5maEA+b+H9p/Qu2Uv0kc7snc/O68T+orVMAQbNGMz/fwqLD/JwdFbUtK+R8WAH6H5DBOFCYRENE0g2D6tzT29cizCXcZEimnBaaMgra1YQ82zQ2As+CKyMQT8TnSl1kmrY/aGl5RlqqxnL4CORll2hB3Yp4IPXcXQammDh7jOIczK2vwmPxoRh6/Pa/j34IzFaYn1+PJ71leUF6dMRVAk36HaRqu1vzWvBp9AgJIwwFQfumk3BVi/scOa/1cYqLlUOXeuRxHdnzABnbw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9NUrRaGG0NR7ovZoRqFoMjySTwxg0nayvRtti2dqJiA=; b=g54+4XVA6EmU8x95C+fcy7mEZocJV4hIy/COsNSZN8CP7or9ajcR5lOz+xLqar5K/m6Hg/ScFM9j4ckRHv/N8fMhjvOOoMx2OK1T3QiK5Z6MKuBVxJE8h2mJbHMXnN6/8Ew8dOVBPaU6KcV7WA5lgsi7rClKSEHbDeQvSaPMdVF96ZR6yDrV1wkwYjawysfQL/mFqLUaVSBeb/FzNBteMlPi7lqfVkHi4wgPmvgDGjHKaiXQi1Izxrlra86SRmhUIYliJ0IUm5ENHEB5qxO6gGOFqFI2QxiHmL2t7c3MXMExzEyqCkp/Y9vM6vs8E+87yYHJ8S6T/AGhP6vNrmsLwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9NUrRaGG0NR7ovZoRqFoMjySTwxg0nayvRtti2dqJiA=; b=qvYfodXvO4xtvXe4P/c/Ec5IA0Q88cH7uTvcc89W63XKWSHo+6CCrmAOqozCeriDtU11LY3ttvJbRu5iQK58UAR79mqzRzYqE9meVwM1nX/flZrxR6+Id8f1dM4zqA9avAG3DNF9p5y0Jea0W/UMuefms/h2OCnf5z42lWn9Q1s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CO1PR13MB4935.namprd13.prod.outlook.com (2603:10b6:303:d5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.3; Fri, 26 Aug 2022 06:04:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::402d:6abc:83a8:2431]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::402d:6abc:83a8:2431%6]) with mapi id 15.20.5588.003; Fri, 26 Aug 2022 06:04:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Long Wu Subject: [PATCH 1/2] net/nfp: add support for nfp cpp log print Date: Fri, 26 Aug 2022 14:03:05 +0800 Message-Id: <1661493786-25406-2-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1661493786-25406-1-git-send-email-chaoyong.he@corigine.com> References: <1661493786-25406-1-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY3PR10CA0012.namprd10.prod.outlook.com (2603:10b6:a03:255::17) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55a3533c-82af-448a-b699-08da8728cdc0 X-MS-TrafficTypeDiagnostic: CO1PR13MB4935:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6evn4mz9FQ99Tasux5PVnzG5Lj7TjGdCcElJaSrNji7h491UeN0bfxr9U37AhQFdfzoFbE6KqPhVuEcAv5hV3LRQ3LQcNuZpUM56QA9hDb4+Pmtq35q7gDvMMuJc38/a4DtbkCn4GYYZzIUXYiMZn0Szb5DZeGMhqCQ+OjB5+AwKPJJwdNxbwP+kvzkY3nKg26srx/G7UUOE92W6uVaYTWwQjvCGBZlrO+5dgwcZMDEsUOtVfGdYshFggzqtXtespL4+2BsTyhmaX/UeXRpGmhzVSYhGZxD9WL0u9wzgd1C2zcsZ3U67w7qvY185w2mP2CfK9Fw2a168f+jRzG/DJ3jdlhs1RL9u0LSVN0J5as4NbFGazcIs5uc8RpNsBWPboJXs+7uYhYUl5E7WUALYdzjhQfmX7+2CUqVOEEa7z9+1JU1fK47gA3KDt06dtrGCZ7x5pQBis1zUXX6cfdY9vmyQq2jN84R8XVTtWKEPXkUT5hZEqBcuCoLOWCztEp6XKYwAsqUm9aAe4qkJWngJs81mOMwjgR7yTGCZ+DgzqmpKeHAPfSnZ/YFGjQXpi1HbAGJ9rso1KF0XGRpT2l4koIyJOh7LNf0vKIadA9CLwGbSSYJudPli0yGnxQVMk5IIIwNqVGPHWapa7U4jCMu73ZxuCR/PgEK7XayH72AdCjMgeiVJxmuG9wuljKpMkoUMc/ydhjinEdvvNGNgfzwKTnfJtWvmNrHib/AgivAveu6zhPRxJ1Z8m5Shbp4ZL5382iH6U7ApcIk8f87yyF0WjDfcunBfVhZt3uHQrTBmsEwOrYWlc6QT8t9yO8zAShAU X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(396003)(366004)(136003)(39840400004)(346002)(38350700002)(107886003)(38100700002)(2616005)(2906002)(52116002)(26005)(6506007)(6512007)(86362001)(83380400001)(186003)(66574015)(8936002)(36756003)(66476007)(4326008)(6486002)(8676002)(66556008)(478600001)(66946007)(6666004)(44832011)(41300700001)(316002)(5660300002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N2VWWm5NZWNZUzJqTG9oMTgraW5Ec3RCRkNVUG45OC8xUjBWM2QxRjhxMWxo?= =?utf-8?B?RDQrZzc5dnZTRmlKTVlDZTNyUWhlaE5HTm5MSmlvSVRCMnRGcU9odmVFMWtY?= =?utf-8?B?SitvRjJqZ2JEQmpwc0lVbFVOL3JWbjlKQ0NtenNVdjFaUVhZWEIzUkt6UkRx?= =?utf-8?B?UHlMTWRjZXFFdHQ1d0pLREJucFFEVnJXRHBNQmpYczFveTV6M2tHU0JOTVAx?= =?utf-8?B?bHByOENuRHE0SVlFWG0vTFZORW8zZ3NDaXdTOEI0ZnFiR3hjYTVZMS9ialZ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b2pjeUZqSEZFQnNWVmdDL213RGdFaHo3T0daWU1Hd0Q1?= =?utf-8?B?K29LT0pBUVhhdXZIRnQ3ZWhKR0FHT1lNQkwrL3lRbk9PbFJCejdLL1ZRV3hj?= =?utf-8?B?OEE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55a3533c-82af-448a-b699-08da8728cdc0 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2022 06:04:15.2516 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2pWqj9+92Nb28JMRDatdHlXpFu9W6LUBXXZcNqWOj6VXnToPG5wRcr9/3yavsYcMjBzx2+v+Fj+QxyllI031S8fweOiid8rN/MxWiD5ToJg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR13MB4935 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Long Wu Nfp cpp log print is not available before. Add support for cpp print log and set its initial priority to "NOTICE". Signed-off-by: Long Wu Reviewed-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_common.c | 1 + drivers/net/nfp/nfp_logs.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c index 0e55f0c..fd46c84 100644 --- a/drivers/net/nfp/nfp_common.c +++ b/drivers/net/nfp/nfp_common.c @@ -1372,6 +1372,7 @@ RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE); RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE); +RTE_LOG_REGISTER_SUFFIX(nfp_logtype_cpp, cpp, NOTICE); /* * Local variables: * c-file-style: "Linux" diff --git a/drivers/net/nfp/nfp_logs.h b/drivers/net/nfp/nfp_logs.h index cc49a15..e22df70 100644 --- a/drivers/net/nfp/nfp_logs.h +++ b/drivers/net/nfp/nfp_logs.h @@ -30,7 +30,10 @@ #define ASSERT(x) do { } while (0) #endif -#define PMD_CPP_LOG(level, fmt, args...) do { } while (0) +extern int nfp_logtype_cpp; +#define PMD_CPP_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, nfp_logtype_cpp, \ + "%s(): " fmt "\n", __func__, ## args) extern int nfp_logtype_driver; #define PMD_DRV_LOG(level, fmt, args...) \ -- 1.8.3.1