From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0087.outbound.protection.outlook.com [104.47.33.87]) by dpdk.org (Postfix) with ESMTP id B30211B020 for ; Tue, 19 Dec 2017 13:25:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JtlzG4K5SRhnJvIFtBkX6hqOov0IzWN8kx+2nCwUaRY=; b=mddgZ0Kbl+AqAiNNi3RtY+sKb9XyxUNXu/UaGy40YFSub+v774QUY9R7ceC8GAIyybxCeDBEVvHGKxvh2Wak52eMWqYvtjS3xyF5pULdm6oTQFqNv8T34/+N18ly6avT/ivRjuX4ZqaxDFBoUPK6U0rt/yiOfRPKv2EUdk5864I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Tue, 19 Dec 2017 12:25:49 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, olivier.matz@6wind.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 19 Dec 2017 17:55:09 +0530 Message-Id: <20171219122510.15004-5-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171219122510.15004-1-pbhagavatula@caviumnetworks.com> References: <20171219122510.15004-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR14CA0017.namprd14.prod.outlook.com (10.173.157.155) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8679d2cd-5d38-4072-07f2-08d546dba49b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:YABnWtbIURSyZVGHM+PHu1Fu//Cr9S6TI5p52pLpZR3hXWAiGrHxMuV0/LU+rwec8XZ/QmlVbW2TAziNStEK5tPYqRkEC8f5atuEmC1gAzcLrOGWAcnbUjntImfq2YEpCAXcLocZ+J6eQHCmlNEIgZowuotNmZiH68QzSCSEhq7QgpSf8+0wyRkHr6/MWEyxYdeyaQrwhZ+0eZ6Xyp6+uiSkpDkH2wKjCBqa4z0aOiJQqd0y9Wi26N3LZwPsT4wj; 25:+jZp5MVhjMG9DtFHk/uad1Tdw6LptTP5Y75iFfTSVxs3rB/y5V9v+r0OI9Tsx/Ox4E6/er9qkNUTfyygKy6bWb3k0QPlIPS/wrJQgmjjeAMVnpDyTTP14ZHlf5fck8ZHWflx1jOt5KEFTibzw5p7aiAu4IwJXlwl43SlSHDJDoq+p6Lsq4LF6BrlQDRWwt5IEIg/JDvRkb411TNtE3yQShX5Ww9lp2ggScoaLxo4ZOKribzM0Km6/d6LLmZWy/JW8WgcLHDZarqkYHGhLVWKLxr4WwGix7+z0KxnkFG+aPa7AX41sIYbzM6nj/7UXWGjzPtdKJKj+SYB9aw1zEtjXw==; 31:+Il415Zsvylq0j6Tjz9mLAdVwrJC3WNH0RDFZnRYFWMtXyplq0uSwkGeEHEeLEscnG1B5EQRS5I0M3fk/aTn6katW9krRLwFfL1jtDfGcXRIT/darIF0qtCut+sBam9ku0vk61w3YMn+PsVJhWdfjWVKnJ5YP/9MJxV9+zpitVeUSojTcp8rxN30wfI0a0Blh98LSQF6JQwKXMyZONf0AK5790asg27S60UcIe4M5wk= X-MS-TrafficTypeDiagnostic: CY4PR07MB3462: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 20:IJu8GyHPIId1VbYT7oAh9mYOGE9x6RKJDS69VHXG4oAWVjy+Dyss6zhcucPDyBOyFc2iPCftzKlU630OREVGNfDuu+c6H+ayBTbrlsgyY6w+u+JByuA27QZqWuLKiY6Xhu/i1Z8Pkw4ieJvpOmZoq/SJf81QvJB4nSvfKhjHd4P4OQy/vpTkho2ijEUqTpXxn3eLD9LbU4MNyecRE/yD+E5rOeeWOrj+91/Z9PybOvqMrqzim1GnaydPyNvqlEPeCTKnqSNKqAjwdwiUAbIVfBuSUx2DOEVllNVItTBOORI5zFBlhvqja2RUJEGkW0y7qemEmrFeQx6ubAtcxXZRwFM3P2gIVYZu0NYyMoZyvnx5q3gYW7qpqtVRNFa46vgfI21LyCmWrPI4+a/fRww3cJoleWxTZY8bstLa7OEQPmcWpp1c66Q+cMQhv7f8vhZ/F70QrnHBxEGsQV0osHUcqJqfImTP0/Mb/Cc12WBJKiASFH8w/ttEoP9i9UY3OSfsBGZxwmSkRvdETtkap7qQ645WBc73h5I52CStDBF59i9FHhorf+523UyAJI+dCMZ0xwiPTu9rjiTixhlvFIIrIMDVW0uTL7aej7xSvW3sWa8=; 4:ZhO1by78ZNAXyVymUEwZzxa7+WX+BFXbnFciSquv3Cj4OyPGb0Lq873tBK+9Jr74pmW2pKxBQjDI8kJGCPgoalKEjYLveI6PM5dAko3H6safXUWAD8gUiig52T9EuRbg9+ZloD5/5/z8G6mQDeFJLdiFRNOs/TU+27xFspErkylR1uYIhI7tcuX1avX6qfVcPbKKP4z4LQb2qeaNgWQjp47XUGSifwxhjYfOJ6cIc9/hv5xsNS9X1lXGo+5vpSyGelGX9CnzBIgVW9FS7Z+/ow== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(3231023)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(6072148)(201708071742011); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 052670E5A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(346002)(396003)(376002)(199004)(189003)(68736007)(5009440100003)(53416004)(6506007)(386003)(59450400001)(106356001)(50466002)(36756003)(7736002)(8936002)(76176011)(2906002)(8676002)(66066001)(51416003)(316002)(81166006)(16586007)(72206003)(69596002)(50226002)(2950100002)(42882006)(6666003)(16526018)(53936002)(97736004)(81156014)(52116002)(4326008)(305945005)(6486002)(107886003)(1076002)(478600001)(3846002)(48376002)(6116002)(5660300001)(6512007)(105586002)(25786009)(47776003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3462; 23:H18MEQsccSIIfRi10412kp5e54XkWbe4mBvfhwTQk?= =?us-ascii?Q?LdUVYP3XB7bry0dZIItaKrm31SQ7OSgk2ZOL+VZZlhCDAM1bldyBeNDPTcVm?= =?us-ascii?Q?TgE1BC54qOXq525MKT//TR+RD2u8sm2w5byxDGx8wAsJAi4ktQjx+exGcumV?= =?us-ascii?Q?k/tkX8zRr37C9FN/pftcrPPp56NeyGMBQ6bo2d2ZtgWFKEQjFDzn3ypqxM2B?= =?us-ascii?Q?3WqX1lXUyvHEYk7MrMLlqLXCuN9RIQlEtWI3VWB7uX315JzQO8TYDLlSGZKm?= =?us-ascii?Q?iw11hbjJT3eXsE+5UiEFWkiAU506yNXKMBLa1pZdpYRkzImWk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HJLVwpjNnvky5mUiUAl?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 6:257jm8kLQsuJ+W+fv0sEOQ34/NmnsdiyU4to7Zfeq01jYTXj9D/2WUboqxIflkskg34+fy2imtMU7pvPxdKbwJmK9++H3kNSnSD3cPVQLRWufKRI3A+w8+3pYYmb3Bh7SfZG5qOe+F0jrCHlwHJ3RxTGsOG8/uTcq6QZ+oD4Q49Gwtxlay74gtb6D7JrEY3cdAVVlucL8q1/FWCuFwndNnEZzmoeg+xKwIQroivZD0wziGNIMMsFPAt/8nD+BDIx+sGaB26TQZGbKg37Rw+pf5XcCWYtcWrvn+a0rqF7FLurJsub3Nvr+HVfNw3KfooQSrBtjChPABHOY2/j3JsWzROYZlEO4qC1Q8whn7eWD/0=; 5:wgKPBAlrvQZ9PZG6IMUAz03zM+ha+Ec82+D8JggvhIKfIGRfac7aokYf8Uz2D4dZ2dnVJaKwgHstGPSeqoMZ+7qXRwuXvEqGet+LiD8SU5zEpEBrE8HSpjJNyBAgmA9RHW9yrYUmBNqSFaakKY/nyWHmC1Wj1ImlTOu4k1PzMCI=; 24:Yeh2zC7R0fZ2J0BedZ5XbazY/Jxli1cIAyPdcdu/pGZ2h09+h128BJDE0TB08z3y7FavcJfdW35q3lNRN5S3TjIpHvtZkUAYPl8CzhfJjXk=; 7:AEoiD6tMqWD8+z4V1F4lPNDfExEFKzXbtblg3j1wSaGYhPUhYUPzXn2ah2R6Jtz4UDzZ4ACYymOU6PUtAa1Uj1kC/R+n/lJamCUJd0CpQw8s5iYfFvLMl/NRIyEPzOwN2f2bRjypmepvhtTEM94Y6MzvkTY+4Sw3Rf8txEg+bK4qxWMYKKCxPM7NJ9V0CgVpVNxjj83L4mgZz67sU2eZOAaOpjJy/LZJTPnwBLabNQOpCV6+kLcAL8fKrLSpju71 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2017 12:25:49.1667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8679d2cd-5d38-4072-07f2-08d546dba49b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: [dpdk-dev] [PATCH 4/5] event/octeontx: implement dynamic logging 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: , X-List-Received-Date: Tue, 19 Dec 2017 12:25:53 -0000 Signed-off-by: Pavan Nikhilesh --- config/common_base | 1 - config/defconfig_arm64-thunderx-linuxapp-gcc | 1 - drivers/event/octeontx/ssovf_evdev.c | 11 +++++++++++ drivers/event/octeontx/ssovf_evdev.h | 25 ++++++++++--------------- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/config/common_base b/config/common_base index b616ac3d1..fc52c7be9 100644 --- a/config/common_base +++ b/config/common_base @@ -583,7 +583,6 @@ CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n # Compile PMD for octeontx sso event device # CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y -CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n # # Compile librte_ring diff --git a/config/defconfig_arm64-thunderx-linuxapp-gcc b/config/defconfig_arm64-thunderx-linuxapp-gcc index 45038b119..9232214ef 100644 --- a/config/defconfig_arm64-thunderx-linuxapp-gcc +++ b/config/defconfig_arm64-thunderx-linuxapp-gcc @@ -41,4 +41,3 @@ CONFIG_RTE_MAX_LCORE=96 # Compile PMD for octeontx sso event device # CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y -CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 117b1453e..fc9a40426 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -46,6 +46,17 @@ #include "ssovf_evdev.h" +int otx_logtype_ssovf; + +RTE_INIT(otx_ssovf_init_log); +static void +otx_ssovf_init_log(void) +{ + otx_logtype_ssovf = rte_log_register("pmd.otx.eventdev"); + if (otx_logtype_ssovf >= 0) + rte_log_set_level(otx_logtype_ssovf, RTE_LOG_NOTICE); +} + /* SSOPF Mailbox messages */ struct ssovf_mbox_dev_info { diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index b093a3e73..a116aecdd 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -41,22 +41,15 @@ #define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx -#ifdef RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG -#define ssovf_log_info(fmt, args...) \ - RTE_LOG(INFO, EVENTDEV, "[%s] %s() " fmt "\n", \ - RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args) -#define ssovf_log_dbg(fmt, args...) \ - RTE_LOG(DEBUG, EVENTDEV, "[%s] %s() " fmt "\n", \ - RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args) -#else -#define ssovf_log_info(fmt, args...) -#define ssovf_log_dbg(fmt, args...) -#endif - +#define SSOVF_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, otx_logtype_ssovf, \ + "[%s] %s() " fmt "\n", \ + RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args) + +#define ssovf_log_info(fmt, ...) SSOVF_LOG(INFO, fmt, ##__VA_ARGS__) +#define ssovf_log_dbg(fmt, ...) SSOVF_LOG(DEBUG, fmt, ##__VA_ARGS__) +#define ssovf_log_err(fmt, ...) SSOVF_LOG(ERR, fmt, ##__VA_ARGS__) #define ssovf_func_trace ssovf_log_dbg -#define ssovf_log_err(fmt, args...) \ - RTE_LOG(ERR, EVENTDEV, "[%s] %s() " fmt "\n", \ - RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args) #define SSO_MAX_VHGRP (64) #define SSO_MAX_VHWS (32) @@ -180,6 +173,8 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev) return eventdev->data->dev_private; } +extern int otx_logtype_ssovf; + uint16_t ssows_enq(void *port, const struct rte_event *ev); uint16_t ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); -- 2.14.1