DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Tomasz Kulasek <tomaszx.kulasek@intel.com>, yliu@fridaylinux.org
Cc: dev@dpdk.org, huawei.xie@intel.com, stable@dpdk.org,
	Ben Walker <benjamin.walker@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: fix remove macro name conflict
Date: Wed, 21 Feb 2018 08:55:44 +0100	[thread overview]
Message-ID: <b166f47f-1bc3-1d9e-15d3-bcbc6d4c6eb9@redhat.com> (raw)
In-Reply-To: <20180209172408.14976-1-tomaszx.kulasek@intel.com>



On 02/09/2018 06:24 PM, Tomasz Kulasek wrote:
> LOG_DEBUG is a symbol defined by POSIX, so if sys/log.h is
> included the symbols conflict.
> 
> This patch changes LOG_DEBUG to VHOST_LOG_DEBUG.
> 
> Fixes: 1c01d52392d5 ("vhost: add debug print")
> Cc: huawei.xie@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ben Walker <benjamin.walker@intel.com>
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
> ---
>   lib/librte_vhost/vhost.h      | 13 +++++++------
>   lib/librte_vhost/vhost_user.c | 10 +++++-----
>   lib/librte_vhost/virtio_net.c | 16 ++++++++--------
>   3 files changed, 20 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index d947bc9e3..319cc6620 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -296,8 +296,9 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
>   
>   #ifdef RTE_LIBRTE_VHOST_DEBUG
>   #define VHOST_MAX_PRINT_BUFF 6072
> -#define LOG_LEVEL RTE_LOG_DEBUG
> -#define LOG_DEBUG(log_type, fmt, args...) RTE_LOG(DEBUG, log_type, fmt, ##args)
> +#define VHOST_LOG_LEVEL RTE_LOG_DEBUG
> +#define VHOST_LOG_DEBUG(log_type, fmt, args...) \
> +	RTE_LOG(DEBUG, log_type, fmt, ##args)
>   #define PRINT_PACKET(device, addr, size, header) do { \
>   	char *pkt_addr = (char *)(addr); \
>   	unsigned int index; \
> @@ -313,11 +314,11 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
>   	} \
>   	snprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), "\n"); \
>   	\
> -	LOG_DEBUG(VHOST_DATA, "%s", packet); \
> +	VHOST_LOG_DEBUG(VHOST_DATA, "%s", packet); \
>   } while (0)
>   #else
> -#define LOG_LEVEL RTE_LOG_INFO
> -#define LOG_DEBUG(log_type, fmt, args...) do {} while (0)
> +#define VHOST_LOG_LEVEL RTE_LOG_INFO
> +#define VHOST_LOG_DEBUG(log_type, fmt, args...) do {} while (0)
>   #define PRINT_PACKET(device, addr, size, header) do {} while (0)
>   #endif
>   
> @@ -411,7 +412,7 @@ vhost_vring_call(struct virtio_net *dev, struct vhost_virtqueue *vq)
>   		uint16_t old = vq->signalled_used;
>   		uint16_t new = vq->last_used_idx;
>   
> -		LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
> +		VHOST_LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
>   			__func__,
>   			vhost_used_event(vq),
>   			old, new);

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

And applied to dpdk-next-virtio/master with removing > +#define
VHOST_LOG_LEVEL RTE_LOG_DEBUG lines, as it conflicted with Jianfeng
change that removed LOG_LEVEL.

Thanks,
Maxime

      parent reply	other threads:[~2018-02-21  7:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 17:24 Tomasz Kulasek
2018-02-11  4:03 ` Tan, Jianfeng
2018-02-21  7:55 ` Maxime Coquelin [this message]

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=b166f47f-1bc3-1d9e-15d3-bcbc6d4c6eb9@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=benjamin.walker@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=stable@dpdk.org \
    --cc=tomaszx.kulasek@intel.com \
    --cc=yliu@fridaylinux.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).