DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/3] net/sfc: use locally stored data for logging
Date: Thu, 18 May 2017 11:59:11 +0100	[thread overview]
Message-ID: <2a7d4dc5-2306-b799-5fc1-c927dd07db53@intel.com> (raw)
In-Reply-To: <1495023908-10977-2-git-send-email-arybchenko@solarflare.com>

On 5/17/2017 1:25 PM, Andrew Rybchenko wrote:
> Required to be able to use logging in the secondary process
> where Ethernet device pointer stored in sfc_adapter is invalid.
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Reviewed-by: Andy Moreton <amoreton@solarflare.com>

<...>

> diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
> index d0f8921..6c43925 100644
> --- a/drivers/net/sfc/sfc_log.h
> +++ b/drivers/net/sfc/sfc_log.h
> @@ -35,18 +35,16 @@
>  /* Log PMD message, automatically add prefix and \n */
>  #define SFC_LOG(sa, level, ...) \
>  	do {								\
> -		const struct rte_eth_dev *_dev = (sa)->eth_dev;		\
> -		const struct rte_pci_device *_pci_dev =			\
> -			RTE_ETH_DEV_TO_PCI(_dev);			\
> +		const struct sfc_adapter *_sa = (sa);			\

Getting following build error with clang and icc [1]. I guess that is
because "_sa" declared on both sfc_log_init() and in the macro that
function uses (SFC_LOG).

[1]
.../drivers/net/sfc/sfc_filter.c:121:2:
error: variable '_sa' is uninitialized when used within its own
initialization [-Werror,-Wuninitialized]
        sfc_log_init(sa, "failed %d", rc);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../drivers/net/sfc/sfc_log.h:68:12: note: expanded from macro
'sfc_log_init'
        SFC_LOG(_sa, INFO,                              \
        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../drivers/net/sfc/sfc_log.h:38:36: note: expanded from macro 'SFC_LOG'
        const struct sfc_adapter *_sa = (sa);           \
                                 ~~~    ^~

  reply	other threads:[~2017-05-18 10:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 12:25 [dpdk-dev] [PATCH 1/3] net/sfc: carefully cleanup on init failure and shutdown Andrew Rybchenko
2017-05-17 12:25 ` [dpdk-dev] [PATCH 2/3] net/sfc: use locally stored data for logging Andrew Rybchenko
2017-05-18 10:59   ` Ferruh Yigit [this message]
2017-05-18 14:01     ` Andrew Rybchenko
2017-05-17 12:25 ` [dpdk-dev] [PATCH 3/3] net/sfc: support multi-process Andrew Rybchenko
2017-05-18 14:00 ` [dpdk-dev] [PATCH v2 1/3] net/sfc: carefully cleanup on init failure and shutdown Andrew Rybchenko
2017-05-18 14:00   ` [dpdk-dev] [PATCH v2 2/3] net/sfc: use locally stored data for logging Andrew Rybchenko
2017-05-18 14:00   ` [dpdk-dev] [PATCH v2 3/3] net/sfc: support multi-process Andrew Rybchenko
2017-05-22 11:29     ` Ferruh Yigit
2017-05-22 12:07       ` Andrew Rybchenko
2017-05-22 12:36         ` Ferruh Yigit
2017-05-22 12:44           ` Andrew Rybchenko
2017-05-22 12:54             ` Ferruh Yigit
2017-05-22 15:18           ` Sergio Gonzalez Monroy
2017-05-22 15:42   ` [dpdk-dev] [PATCH v2 1/3] net/sfc: carefully cleanup on init failure and shutdown Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a7d4dc5-2306-b799-5fc1-c927dd07db53@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).