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 745B4397D for ; Fri, 15 Dec 2017 20:56:38 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Dec 2017 11:56:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,406,1508828400"; d="scan'208";a="12190753" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.53]) ([10.241.225.53]) by FMSMGA003.fm.intel.com with ESMTP; 15 Dec 2017 11:56:35 -0800 To: Ilya Matveychikov , dev@dpdk.org References: <9B0F484B-2803-4882-B324-8E4B1AFEFAF2@gmail.com> <76A6A6A4-98AC-4765-9579-44100B4CE159@gmail.com> From: Ferruh Yigit Message-ID: <0ba9268f-6b78-25c6-e04d-660029c61656@intel.com> Date: Fri, 15 Dec 2017 11:56:35 -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: <76A6A6A4-98AC-4765-9579-44100B4CE159@gmail.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, 15 Dec 2017 19:56:38 -0000 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