From patchwork Tue Jul 15 13:20:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 33664 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 94E4D201F1 for ; Tue, 15 Jul 2014 13:21:03 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf3602992pad.6 for ; Tue, 15 Jul 2014 06:21:02 -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=cpngqwN9cnDDHcpvxgGbQUC7y8N94lJ1zXNk2WCrBf4=; b=gJia+2l6Bjnjt3DGlVcmMAeKlQDtHlLkAPJKFgJy5jmf1brUS3vnTmUtkZsw8G40rg 6kJ+xZuK3Qmz8N9pV6FUvZeNQReA7RU3s36yKaHcvQNkKDPiCLWqZu78Rxv7o4K9lm4B 4rQ7A9sVMQ5Cy0ZkcbGcWkD+wq4dUcB4SWeFdawEw+ByOVUmd3nYmPQyoJJ5XMbyMhCk Zg9Ywo9zwZ6pliF3xpHXIuWLeYeSdu0ECs93tiso8cBM2zIaQob4/cRUrgxbqDimhj+9 bA9+e9BbJ/BLtOE+1vDeNFpDO9epDDMKgF4Ro+nWoSiR3i+ScsoFLCCX8a8QP0WeETEQ /5ZA== X-Gm-Message-State: ALoCoQkVRz8qFovl3ij6BH3W87MfzNvz1B16z6n0D2G/5aGIuto0Q408tKUZQoecAAx7pyqkOm+V X-Received: by 10.68.137.99 with SMTP id qh3mr8059883pbb.2.1405430462727; Tue, 15 Jul 2014 06:21:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.11 with SMTP id n11ls90075qge.11.gmail; Tue, 15 Jul 2014 06:21:02 -0700 (PDT) X-Received: by 10.52.24.68 with SMTP id s4mr5604981vdf.37.1405430462615; Tue, 15 Jul 2014 06:21:02 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id 13si6649924vdg.106.2014.07.15.06.21.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 06:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hu12so4977509vcb.20 for ; Tue, 15 Jul 2014 06:21:02 -0700 (PDT) X-Received: by 10.53.5.230 with SMTP id cp6mr17389300vdd.25.1405430462504; Tue, 15 Jul 2014 06:21:02 -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 tc5csp214076vcb; Tue, 15 Jul 2014 06:21:02 -0700 (PDT) X-Received: by 10.140.93.161 with SMTP id d30mr5068638qge.53.1405430461946; Tue, 15 Jul 2014 06:21:01 -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 r18si20575410qga.61.2014.07.15.06.21.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Jul 2014 06:21:01 -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 1X72ct-00075o-O4; Tue, 15 Jul 2014 13:18:35 +0000 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X72cg-00075G-Bi for lng-odp@lists.linaro.org; Tue, 15 Jul 2014 13:18:22 +0000 X-IronPort-AV: E=Sophos;i="5.01,665,1400050800"; d="scan'208";a="39131592" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw3-out.broadcom.com with ESMTP; 15 Jul 2014 06:29:32 -0700 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 15 Jul 2014 06:20:41 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Jul 2014 06:20:41 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 7BA669F9FB; Tue, 15 Jul 2014 06:20:40 -0700 (PDT) From: To: Date: Tue, 15 Jul 2014 18:50:32 +0530 Message-ID: <1405430432-23064-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] [PATCHv2 3/3] - 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. 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.175 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 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