[dpdk-dev] [PATCH 2/6] net/sfc: add support for driver-wide dynamic logging
Andrew Rybchenko
arybchenko at solarflare.com
Fri Jan 26 07:51:44 CET 2018
On 01/25/2018 09:42 PM, Stephen Hemminger wrote:
> On Thu, 25 Jan 2018 17:00:43 +0000
> Andrew Rybchenko <arybchenko at solarflare.com> 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 <rte_io.h>
>>
>> #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.
More information about the dev
mailing list