From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9875A1B305 for ; Fri, 22 Dec 2017 03:12:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 18:12:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,438,1508828400"; d="scan'208";a="4682748" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.224.153]) ([10.241.224.153]) by orsmga007.jf.intel.com with ESMTP; 21 Dec 2017 18:12:05 -0800 From: Ferruh Yigit To: Ilya Matveychikov , dev@dpdk.org References: <9B0F484B-2803-4882-B324-8E4B1AFEFAF2@gmail.com> <76A6A6A4-98AC-4765-9579-44100B4CE159@gmail.com> <0ba9268f-6b78-25c6-e04d-660029c61656@intel.com> Message-ID: <646036d7-1f30-3f21-cf6a-ca4ec9774cfe@intel.com> Date: Thu, 21 Dec 2017 18:12:04 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <0ba9268f-6b78-25c6-e04d-660029c61656@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] debug: update assertion macro 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: Fri, 22 Dec 2017 02:12:07 -0000 On 12/15/2017 11:56 AM, Ferruh Yigit wrote: > On 11/19/2017 6:41 AM, Ilya Matveychikov wrote: >> >> >>> On Nov 19, 2017, at 12:18 PM, Ilya Matveychikov wrote: >>> >>> Update RTE_VERIFY macro to make it possible to use complex expressions >>> in RTE_ASSERT. >>> >>> Signed-off-by: Ilya V. Matveychikov >>> >>> Fixes: 148f963fb532 ("xen: core library changes") >>> Cc: bruce.richardson@intel.com >>> >>> --- >>> Now it's incorrect to use complex expressions for assertion >>> like RTE_ASSERT((1 + 2) == 3). This patch makes it possible. >> >> Update. >> >> Now it’s possible to have % char inside the expression, for example: >> >> RTE_ASSERT((sizeof(some_struct) % 64) == 0) >> >> Before the patch, “%" sign acts like a conversion specification beginning >> character. > > previous sample is not correct, complex expressions "RTE_ASSERT((1 + 2) == 3)" > are working fine. > But you are right "%" causing problem, and this patch is fixing it. > > Reviewed-by: Ferruh Yigit Applied to dpdk/master, thanks. Note added into commit log.