From patchwork Wed Jul 16 10:24:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 33719 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC244201F1 for ; Wed, 16 Jul 2014 10:24:29 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf1834344qac.4 for ; Wed, 16 Jul 2014 03: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:delivered-to:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=xT/UtJ9lzH421YRLHLNQEoqwC+s3kxglTzhUnh1+La4=; b=ITHorTV4DaMT4CzTEM7pIkxjm5w/1yikynLy3yp2DpqJrD3DEfvXp7Zl8/iH9J5uE5 gszJcB1oY7qI2CYGB+bsLrePKKH2jJDAF2J6bq1+SHVQJkpiHxVHx4OTRV+0d1MkZWFz sAX9yywAlMaFixvfhsF4qAPUiIqfIGrv2ZQNlrTIywWve3Fcu+WfM5af62v0omz9nBuX NfBUrGuRqj82uA5WF0G5DVJDdP5JUI+yqqHnEweVd1pGfzLHxA70G5tfmkBj1pFZ2Hiy V9uBA1e630Y6b8Jq+OCJgBTp33J55ONgFsBFcVyEoTiXGznuOJrTm3gxUclHAB5HviJG 4z6Q== X-Gm-Message-State: ALoCoQmBsPCybF6zuAGRbyD072XHTSDAM5Jt73JO7jLb2ikTxvqDD1dojVG15dTWf4fxpn2JYCS1 X-Received: by 10.236.159.198 with SMTP id s46mr12390397yhk.17.1405506269697; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.134 with SMTP id e6ls359669qgf.34.gmail; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) X-Received: by 10.220.44.20 with SMTP id y20mr6144213vce.60.1405506269603; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id s7si8087122vcl.50.2014.07.16.03.24.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 03:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so1197769vcb.32 for ; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr23127806vdc.8.1405506269520; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp285406vcb; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) X-Received: by 10.140.108.99 with SMTP id i90mr41774003qgf.56.1405506269124; Wed, 16 Jul 2014 03:24:29 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m1si25582105qaa.43.2014.07.16.03.24.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Jul 2014 03:24:29 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X7MLa-0001Ew-4L; Wed, 16 Jul 2014 10:22:02 +0000 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X7MLU-0001EU-K9 for lng-odp@lists.linaro.org; Wed, 16 Jul 2014 10:21:56 +0000 X-IronPort-AV: E=Sophos;i="5.01,671,1400050800"; d="scan'208";a="39483308" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw2-out.broadcom.com with ESMTP; 16 Jul 2014 03:32:53 -0700 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 16 Jul 2014 03:24:17 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Wed, 16 Jul 2014 03:24:17 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 6DBDE9FA0C; Wed, 16 Jul 2014 03:24:14 -0700 (PDT) From: To: Date: Wed, 16 Jul 2014 15:54:02 +0530 Message-ID: <1405506242-26905-1-git-send-email-venkatesh.vivekanandan@linaro.org> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCH v4 2/2] ODP-DPDK compilation fix X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkatesh.vivekanandan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Venkatesh Vivekanandan - Added new file platform/linux-dpdk/include/odp_debug.h - ODP_ASSERT complains of array getting a negative value. Root cause is, struct rte_mbuf { . . } __rte_cache_aligned; <-- this alignment causes the error. Since dpdk code can't be changed, added new file odp_debug.h as a temporary fix. Further analysis will be done and fixed cleanly later. Signed-off-by: Venkatesh Vivekanandan --- platform/linux-dpdk/include/odp_debug.h | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 platform/linux-dpdk/include/odp_debug.h diff --git a/platform/linux-dpdk/include/odp_debug.h b/platform/linux-dpdk/include/odp_debug.h new file mode 100644 index 0000000..e37ca8d --- /dev/null +++ b/platform/linux-dpdk/include/odp_debug.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @file + * + * ODP debug + */ + +#ifndef ODP_DEBUG_H_ +#define ODP_DEBUG_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __GNUC__ + +/** + * Indicate deprecated variables, functions or types + */ +#define ODP_DEPRECATED __attribute__((__deprecated__)) + +/** + * Intentionally unused variables ot functions + */ +#define ODP_UNUSED __attribute__((__unused__)) + +#else + +#define ODP_DEPRECATED +#define ODP_UNUSED + +#endif + +/** + * Compile time assertion-macro - fail compilation if cond is false. + */ +#define ODP_ASSERT(cond, msg) typedef char msg[(cond) ? 1 : 0] + +/** + * Compile time assertion-macro - fail compilation if cond is false. + * @note This macro has zero runtime overhead + */ +#define ODP_STATIC_ASSERT(cond, msg) _static_assert(cond, msg) + +/** + * Debug printing macro, which prints output when DEBUG flag is set. + */ +#define ODP_DBG(fmt, ...) \ + do { if (ODP_DEBUG_PRINT == 1) \ + printf(fmt, ##__VA_ARGS__); \ + } while (0) + +/** + * Print output to stderr (file, line and function). + */ +#define ODP_ERR(fmt, ...) \ + fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \ + __LINE__, __func__, ##__VA_ARGS__) + +#ifdef __cplusplus +} +#endif + +#endif