[dpdk-dev] [PATCH 01/11] ixgbe: clean log messages

David Marchand david.marchand at 6wind.com
Tue Aug 26 16:55:42 CEST 2014


Hello Jay,

On Tue, Aug 26, 2014 at 4:23 PM, Jay Rolette <rolette at infiniteio.com> wrote:

> Why are you adding newlines to log message strings? Shouldn't that be up
> to whatever the messages end up getting routed to?
>

Actually, I wanted to have consistent log formats in the PMDs so that the
log messages displayed at runtime are aligned (and not bouncing with \n
before or after the log message).
There was two solutions from my point of view :
- either always add a \n in the log macro and remove all trailing \n
- do the opposite

I preferred the latter as it let users of the macro set the message format
as they want.


Before this change :

Configuring Port 0 (socket 1)
PMD: ixgbe_dev_tx_queue_setup(): sw_ring=0x7f3e59cd8080
hw_ring=0x7f3e59d02080 dma_addr=0x727702080

PMD: ixgbe_dev_tx_queue_setup(): Using simple tx code path

PMD: ixgbe_dev_tx_queue_setup(): Vector tx enabled.

PMD: ixgbe_dev_rx_queue_setup(): sw_ring=0x7f3e59cd57c0
hw_ring=0x7f3e59d12080 dma_addr=0x727712080

PMD: ixgbe_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
satisfied. Rx Burst Bulk Alloc function will be used on port=0, queue=0.

PMD: ixgbe_dev_rx_queue_setup(): Vector rx enabled, please make sure RX
burst size no less than 32.


After this change :

Configuring Port 0 (socket 1)
PMD: ixgbe_dev_tx_queue_setup(): sw_ring=0x7fd47ecd8080
hw_ring=0x7fd47ed02080 dma_addr=0x727702080
PMD: ixgbe_dev_tx_queue_setup(): Using simple tx code path
PMD: ixgbe_dev_tx_queue_setup(): Vector tx enabled.
PMD: ixgbe_dev_rx_queue_setup(): sw_ring=0x7fd47ecd57c0
hw_ring=0x7fd47ed12080 dma_addr=0x727712080
PMD: ixgbe_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
satisfied. Rx Burst Bulk Alloc function will be used on port=0, queue=0.
PMD: ixgbe_dev_rx_queue_setup(): Vector rx enabled, please make sure RX
burst size no less than 32.
Port 0: 90:E2:BA:29:DF:58


-- 
David Marchand


More information about the dev mailing list