From patchwork Wed Jul 16 06:41:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 33705 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CFED321141 for ; Wed, 16 Jul 2014 06:42:22 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id cm18sf1344169qab.7 for ; Tue, 15 Jul 2014 23:42:22 -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=N6ElqpZwJRdPFRRkK0M5UUaH2QkW7w4KhHm1ZRngBrhPw7H2AFKDlHQ7nJqjAFj+xF oRL8C0edinIIpJBmXuM7AzGT/ZzWL2MgDGHSx7b7ND/ReX1OE8myp78xd8TTJUOLQAZn EI//WJXBdLo/gyviLr/HJL8CXJnhrACDT+VdkoK7c2C5AeH4En/BS9BUmZ5qv2RitLh/ eqGR+359bL2nQ1rd/gzFaRv9m9Lp6mj7qbUa2MZ8SbrrflNhVdGceSWBHEVQL377Zhae 9/vM59d+68oDhcG15n8nf8zzQzZQz7/HW9tphEKuHSc0fdc7SHgyfswNKjgYhKNItXKh lBTw== X-Gm-Message-State: ALoCoQm4o+Ls4O/EnuG2b5oy03ZkKAU02Bo3fFnnPRMFfzWNTTnLWE5DAhq6UtqqVL9ucqbpm7Cx X-Received: by 10.236.207.164 with SMTP id n24mr13414683yho.5.1405492942668; Tue, 15 Jul 2014 23:42:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.236 with SMTP id g99ls304844qge.17.gmail; Tue, 15 Jul 2014 23:42:22 -0700 (PDT) X-Received: by 10.52.184.199 with SMTP id ew7mr4483148vdc.44.1405492942584; Tue, 15 Jul 2014 23:42:22 -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 ux9si7877944vdc.7.2014.07.15.23.42.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 23:42:22 -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 hu12so808933vcb.20 for ; Tue, 15 Jul 2014 23:42:22 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr22340976vdc.8.1405492942492; Tue, 15 Jul 2014 23:42:22 -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 tc5csp272683vcb; Tue, 15 Jul 2014 23:42:22 -0700 (PDT) X-Received: by 10.140.29.201 with SMTP id b67mr40782158qgb.44.1405492941684; Tue, 15 Jul 2014 23:42:21 -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 e11si24730474qga.5.2014.07.15.23.42.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Jul 2014 23:42:21 -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 1X7Isd-0004Kc-1X; Wed, 16 Jul 2014 06:39:55 +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 1X7IsK-0004HY-2n for lng-odp@lists.linaro.org; Wed, 16 Jul 2014 06:39:36 +0000 X-IronPort-AV: E=Sophos;i="5.01,670,1400050800"; d="scan'208";a="39267489" 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 23:50:53 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 15 Jul 2014 23:41:55 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Jul 2014 23:41:56 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 299569F9F7; Tue, 15 Jul 2014 23:41:54 -0700 (PDT) From: To: Date: Wed, 16 Jul 2014 12:11:45 +0530 Message-ID: <1405492905-25711-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 v3] ODP-DPDK patch set 3/3 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 - 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