From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 3B78912009; Wed, 21 Feb 2018 08:55:48 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C01CC8163C50; Wed, 21 Feb 2018 07:55:47 +0000 (UTC) Received: from [10.36.112.33] (ovpn-112-33.ams2.redhat.com [10.36.112.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75B06219D02E; Wed, 21 Feb 2018 07:55:46 +0000 (UTC) To: Tomasz Kulasek , yliu@fridaylinux.org Cc: dev@dpdk.org, huawei.xie@intel.com, stable@dpdk.org, Ben Walker References: <20180209172408.14976-1-tomaszx.kulasek@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 21 Feb 2018 08:55:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180209172408.14976-1-tomaszx.kulasek@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 21 Feb 2018 07:55:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 21 Feb 2018 07:55:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH] vhost: fix remove macro name conflict X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 07:55:48 -0000 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 > Signed-off-by: Tomasz Kulasek > --- > 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 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