From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id BB3291B33B for ; Fri, 26 Jan 2018 07:51:56 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 0E23840006D; Fri, 26 Jan 2018 06:51:55 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 26 Jan 2018 06:51:50 +0000 To: Stephen Hemminger CC: , Ivan Malov References: <1516899647-8541-1-git-send-email-arybchenko@solarflare.com> <1516899647-8541-3-git-send-email-arybchenko@solarflare.com> <20180125104255.57e0cd19@xeon-e3> From: Andrew Rybchenko Message-ID: <7d8035cf-f0e8-7e16-a83d-cd0fc36ab486@solarflare.com> Date: Fri, 26 Jan 2018 09:51:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180125104255.57e0cd19@xeon-e3> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23620.002 X-TM-AS-Result: No--11.135900-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1516949516-47EeNydXtxPX Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/6] net/sfc: add support for driver-wide 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: Fri, 26 Jan 2018 06:51:57 -0000 On 01/25/2018 09:42 PM, Stephen Hemminger wrote: > On Thu, 25 Jan 2018 17:00:43 +0000 > Andrew Rybchenko wrote: > >> diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h >> index c7a54c3..8dd225e 100644 >> --- a/drivers/net/sfc/efsys.h >> +++ b/drivers/net/sfc/efsys.h >> @@ -26,6 +26,7 @@ >> #include >> >> #include "sfc_debug.h" >> +#include "sfc_log.h" >> >> #ifdef __cplusplus >> extern "C" { >> @@ -721,7 +722,7 @@ typedef uint64_t efsys_stat_t; >> #define EFSYS_ERR(_esip, _code, _dword0, _dword1) \ >> do { \ >> (void)(_esip); \ >> - RTE_LOG(ERR, PMD, "FATAL ERROR #%u (0x%08x%08x)\n", \ >> + SFC_GENERIC_LOG(ERR, "FATAL ERROR #%u (0x%08x%08x)", \ >> (_code), (_dword0), (_dword1)); \ >> _NOTE(CONSTANTCONDITION); \ >> } while (B_FALSE) > Off topic, but why is this header file having C++ wrapper? > It is driver private, and driver is always built with C. In this particular case it is just few lines which, as I understand, never hurt. So, it is better to have and not think about it. I have no strong opinion on it.