From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700045.outbound.protection.outlook.com [40.107.70.45]) by dpdk.org (Postfix) with ESMTP id 4720E28FD for ; Thu, 8 Nov 2018 22:19:29 +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:X-MS-Exchange-SenderADCheck; bh=Zq8oRUUWcv5ePj/uxXdn6jJb4Q9vyVDUNeKbUgvHvVU=; b=lAaegrumEKq3lM6BBJjceOUpanWm/0nkUjO/BjgjLWvvoExrdXQOkw/BlDAfC8s/eOcdxu9GD/HzcSBNF17w5XKvuNw9DyJxlkomH9/gGXIc3BKnr7NteqfELF7XA550oiiSSunCqHuxaOBS79FXFEFsMbwkINK/gjjyxlomaOU= Received: from BYAPR07MB5365.namprd07.prod.outlook.com (20.177.125.18) by BYAPR07MB4998.namprd07.prod.outlook.com (52.135.238.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Thu, 8 Nov 2018 21:19:27 +0000 Received: from BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::4012:e217:427e:320b]) by BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::4012:e217:427e:320b%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 21:19:27 +0000 From: "Mody, Rasesh" To: "dev@dpdk.org" CC: "Mody, Rasesh" , "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev Thread-Topic: [PATCH 1/2] net/bnx2x: fix to use rte log Thread-Index: AQHUd6i6XRY7Uow45kKutvMPXQ+44w== Date: Thu, 8 Nov 2018 21:19:26 +0000 Message-ID: <1541711947-3714-1-git-send-email-rasesh.mody@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0022.namprd02.prod.outlook.com (2603:10b6:a02:ee::35) To BYAPR07MB5365.namprd07.prod.outlook.com (2603:10b6:a03:64::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [198.186.1.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4998; 6:kkDsDquSW7KQR4WD7jKoX6+gBG816OLaxcYLJfsmvGphWqiTp4IkNrJ38qEyzCl/E8xvzYB7r1kdbWadNe+MWGycY6g+SBgsdFwGNfaU5BC/rEcSr9naWOfkNPsGEOWKmMa/jKNTyFYnUnyW5vMTYGu2xEDGcKtAy2Jy2QcqDM72T+NufaUao8YgkFr4mqBDyH2mscGGWvtt97YcgDlSdFPLhje8Ax9Rprx+peGJsxNVPsqjC76gd+uNP4Hs+Ti9PHeCoiH6avAtGsCJKUL+cjX7K6N1rIRHs365HjDE4OHE5v+t6eNDN6wfz8WMPMnjrYotL00PSnh1+kUXI8lqYcpoKpEeOwIjcMNvkFn8RplfqoDnI8CKAASziTKMYAyvGL9L7X5en56l7f8o4F2OgAnSNiYmYusv1kkCQL1WQWaq+JH8p2jm667IdJFFzm2/otpNzWr1N5OZcUhL2RRTrQ==; 5:vn9eFVTCrgz6LoR6p7j/Em9ugmkOepFFXo2U7t8RZ3zePjA7HKXBwvxvPfUAVISgt0j5ILbMiGGoWvg/STlGP56WmAAAzuYREtVSOrUUwwv7Mo31X9nna1YQLZmyZhF14txqKYysg7112BhgXTV4pmSErfTckCDfN/mIjgJqiRI=; 7:NcJylEKqkA0iO+5+hVtW53XzTg5ub/svF6036mlvkaJcDzhHTrnJhbZib0o38AaeVNufgH6IYPoDsMH0upE0bZxV6FICeWXHHBvq9rYtH1pH7cwy0+2YbwtSbDo1rV5iAE3vPRrmiEbElkgrW2cX2A== x-ms-office365-filtering-correlation-id: 08a0940a-fefa-4950-03d8-08d645bfdcd6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4998; x-ms-traffictypediagnostic: BYAPR07MB4998: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823302103)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:BYAPR07MB4998; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4998; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(396003)(136003)(376002)(346002)(199004)(189003)(25786009)(2351001)(6512007)(106356001)(86362001)(5640700003)(6916009)(2906002)(2501003)(72206003)(486006)(2616005)(6486002)(476003)(6436002)(107886003)(575784001)(478600001)(2900100001)(4326008)(53936002)(66066001)(68736007)(71190400001)(1730700003)(105586002)(99286004)(71200400001)(81166006)(8676002)(81156014)(5660300001)(316002)(8936002)(3846002)(6116002)(386003)(305945005)(14454004)(97736004)(54906003)(7736002)(52116002)(102836004)(256004)(186003)(36756003)(26005)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4998; H:BYAPR07MB5365.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2R16+Z2dTrMZUc/tCnoby+hIFryGTkU70mGLIbSRxQuCNr3eU0L6WWZWmzTxP5E6+iDOG4ww2wHpDJ2jY/aWc5TMEwY2nFaXSAN4esDUv3VGuK/aSooG9lh3iW1HiNfxLKy/51NQ3u6yYHUf6rMq3uwUSjL3HqbKtGb3LfdiJZN6lV6hMxV+9gRLktg3cC2dZR2U4MYqbygxmRegA/IX79Q7QpbM6uzyDYhCcM6JOKe1MeZtqucwzN4qD19bNGuOSkARRHS23/FhKusCtccHcCrWrBRmyZLUwmFf1w3uqi4mwdg7PRlQZ/mMfmxsk5TDOkIodoLkuwPZnNuG6Y3ZrYKeBzyPtXN6TSbj8ZkTdB4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08a0940a-fefa-4950-03d8-08d645bfdcd6 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 21:19:26.9580 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4998 Subject: [dpdk-dev] [PATCH 1/2] net/bnx2x: fix to use rte log 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: Thu, 08 Nov 2018 21:19:29 -0000 Use rte_log() rather than RTE_LOG() for dynamic logging. Rearrange dynamic log types to the top and configurable log types to bottom. Remove unused RTE_LIBRTE_BNX2X_DEBUG_TX_FREE Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name") Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_logs.h | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.= h index 753bccd..f0cf69c 100644 --- a/drivers/net/bnx2x/bnx2x_logs.h +++ b/drivers/net/bnx2x/bnx2x_logs.h @@ -10,43 +10,40 @@ =20 extern int bnx2x_logtype_init; #define PMD_INIT_LOG(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \ "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args) =20 #define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>") =20 +extern int bnx2x_logtype_driver; +#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "[%s:%d(%s)] " fmt, __func__, __LINE__, \ + (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) + +#define PMD_DRV_LOG(level, sc, fmt, args...) \ + PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args) + #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(): " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while(0) #endif =20 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(): " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while(0) #endif =20 -#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0) -#endif - -extern int bnx2x_logtype_driver; -#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, "[%s:%d(%s)] " fmt, __func__, __LINE__, \ - (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) - -#define PMD_DRV_LOG(level, sc, fmt, args...) \ - PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args) - #ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, "%s(%s): " fmt "\n", __func__, \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(%s): " fmt "\n", __func__, \ (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) #else #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) do { } while (0) --=20 1.7.10.3