[PATCH 1/2] net/ngbe: fix debug log

Ferruh Yigit ferruh.yigit at intel.com
Mon Feb 21 14:06:01 CET 2022


On 2/21/2022 9:21 AM, Jiawen Wu wrote:
> Remove 'DEBUGFUNC' due to too many invalid debug log prints, unify the
> DEBUG level macros.
> 
> Fixes: cc934df178ab ("net/ngbe: add log and error types")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>

<...>

> @@ -91,7 +86,7 @@ s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw)
>   
>   	if (i == timeout) {
>   		DEBUGOUT("Driver can't access the eeprom - SMBI Semaphore "
> -			 "not granted.\n");
> +			 "not granted.");

Not for this patch, but for future, preferred to not break
log messages, coding convention allows longer lines for log
messages.

The logic behid it is to let user able to search the log
she got from the console and easily find it in the code.

<...>
  
> @@ -590,18 +564,16 @@ s32 ngbe_init_rx_addrs(struct ngbe_hw *hw)
>   		/* Get the MAC address from the RAR0 for later reference */
>   		hw->mac.get_mac_addr(hw, hw->mac.addr);
>   
> -		DEBUGOUT(" Keeping Current RAR0 Addr =%.2X %.2X %.2X ",
> +		DEBUGOUT(" Keeping Current RAR0 Addr =%.2X %.2X %.2X %.2X %.2X %.2X",

Not for this patch, but for future, there is 'RTE_ETHER_ADDR_PRT_FMT'
macro that can be used for MAC format. It is good to use
existing macro for consistent output.



More information about the stable mailing list