[dpdk-dev] [PATCH v2 01/17] ixgbe: use the right debug macro
David Marchand
david.marchand at 6wind.com
Tue Sep 2 16:16:55 CEST 2014
Hello Jay,
On Tue, Sep 2, 2014 at 3:43 PM, Jay Rolette <rolette at infiniteio.com> wrote:
>
> On Mon, Sep 1, 2014 at 5:24 AM, David Marchand <david.marchand at 6wind.com>
> wrote:
>
>>
>> diff --git a/lib/librte_pmd_ixgbe/ixgbe_bypass.c
>> b/lib/librte_pmd_ixgbe/ixgbe_bypass.c
>> index 1d21dc0..1a980b8 100644
>> --- a/lib/librte_pmd_ixgbe/ixgbe_bypass.c
>> +++ b/lib/librte_pmd_ixgbe/ixgbe_bypass.c
>> @@ -40,20 +40,20 @@
>> #define BYPASS_STATUS_OFF_MASK 3
>>
>> /* Macros to check for invlaid function pointers. */
>> -#define FUNC_PTR_OR_ERR_RET(func, retval) do { \
>> - if ((func) == NULL) { \
>> - DEBUGOUT("%s:%d function not supported\n", \
>> - __func__, __LINE__); \
>> - return (retval); \
>> - } \
>> +#define FUNC_PTR_OR_ERR_RET(func, retval) do { \
>> + if ((func) == NULL) { \
>> + PMD_DRV_LOG("%s:%d function not supported", \
>> + __func__, __LINE__); \
>> + return retval; \
>>
> Need to keep the parens around retval in your macro
>
Actually, checkpatch complained about this.
So I can keep the parenthesis, but then I don't want Thomas to tell me my
patch does not pass checkpatch :-)
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
>> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
>> index dfc2076..46962bc 100644
>> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
>> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
>> @@ -1765,33 +1765,36 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
>> tx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?
>> tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);
>> if (tx_rs_thresh >= (nb_desc - 2)) {
>> - RTE_LOG(ERR, PMD, "tx_rs_thresh must be less than the
>> number "
>> - "of TX descriptors minus 2. (tx_rs_thresh=%u
>> port=%d "
>> - "queue=%d)\n", (unsigned int)tx_rs_thresh,
>> - (int)dev->data->port_id, (int)queue_idx);
>> + PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the
>> number "
>> + "of TX descriptors minus 2. (tx_rs_thresh=%u
>> "
>> + "port=%d queue=%d)\n", (unsigned
>> int)tx_rs_thresh,
>>
> Embedded newline on this log message. I noticed you have \n still on all
> of the PMD_INIT_LOG() calls following. Intended?
>
Yep intended, a patch after this removes all \n (idem for the other
comments).
Thanks.
--
David Marchand
More information about the dev
mailing list