From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id BC8FF2A07 for ; Tue, 12 May 2015 11:24:29 +0200 (CEST) Received: by wgic8 with SMTP id c8so1779865wgi.1 for ; Tue, 12 May 2015 02:24:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=l7QDCN8jF3bn7frZy9rgIdzWQgU22tSvCFuWctDl2IU=; b=lomg54UuzFDOpQdSjoD9rOBoF6e3ktaPnM3HekkciXUMAqmOqErUIfj5rCMjkMe3hb Ov4VBg0+tphjHp/Cxg+LwIBopYHCMTbu+6gpMtL0P5FE2OYEy5GHsc4FTB1cRSXCGcOd HI4Vfj/BFwMokAVrRWWm2rkIiNp6Aag+K6VP+AQ7AfyO4hiuoSh8yI9L9V+ZEq+oTDAF xm+1cA+HYhaaGOVksfu9ORtAFf+JdOkGEjj5Ey6jDKjD011OsFZOkeVgMqPln6D3cGmS fb/9PCZBO/tR6T3rN5fyVVuBklm1oZYk4YshaJd8eh47wqbfTMPzfxe9vcSIsfMyaaO7 Oyzw== X-Gm-Message-State: ALoCoQmmX1sJ2ZWSAdr1zyiusz12FY9fiANkydrQpFBLIpd8pZiwk7oQqenXjLLqagZMaWuBY6bF X-Received: by 10.180.96.196 with SMTP id du4mr27874207wib.77.1431422669638; Tue, 12 May 2015 02:24:29 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id i6sm26764134wjf.29.2015.05.12.02.24.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 02:24:28 -0700 (PDT) From: Thomas Monjalon To: Ouyang Changchun , huawei.xie@intel.com Date: Tue, 12 May 2015 11:23:47 +0200 Message-ID: <2042841.HJ0llvHanu@xps13> Organization: 6WIND User-Agent: KMail/4.14.7 (Linux/4.0.1-1-ARCH; KDE/4.14.7; x86_64; ; ) In-Reply-To: <1430723719-27999-1-git-send-email-changchun.ouyang@intel.com> References: <1430723719-27999-1-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] vhost: Fix compilation issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 09:24:30 -0000 > Minor fix for the referring of a pointer when debug and dump is enabled. > The original commit is: 72ec8d77 > > Signed-off-by: Changchun Ouyang Applied, thanks This bug was not seen before because it was disabled: examples/vhost/main.h: //#define DEBUG That's why we must avoid putting some code in #if blocks. Please use log levels when possible. If you absolutely want a compile-time option (other than CONFIG_RTE_LOG_LEVEL), please put it in the config file instead of commenting a #define in a header file. In this case, it should be handled only with CONFIG_RTE_LOG_LEVEL. I think we can assume the debug level will have an impact on datapath performance. And maybe we should raise the default log level to RTE_LOG_NOTICE. Last comment about logs in vhost example: CONFIG_RTE_LOG_LEVEL should be used to define the macro PRINT_PACKET. In case of debug level at compile-time, it should call a function checking the runtime log level as in rte_vlog(). Please, let's avoid defining entirely a function in a macro, it's ugly. Thanks