From patchwork Mon Jul 21 06:22:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 33946 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C4936202DA for ; Mon, 21 Jul 2014 06:22:41 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf22356201yhl.6 for ; Sun, 20 Jul 2014 23:22:41 -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=Y/v3hzS4nIIJ1xqz3tPh5cww/MKZhNynFPVEFFQjlyQs21eBvGs0Gt6clMVlSfr9dH hjMh666yNJGkVmrBzuHCNh3h/lfudFYHU3ne3azwEsyFpDOHi0ZIW2N5YQrzhiAKJxha j86KEoTyRvlw9stbEmVkoSOtWHNedWM3ckjvXGKAhlfW/YlqaIjLpsrS5C8SRqKdlnCT gsuU2uNEOj7fOZaKad141UKUghqe5nibsgJjLXJ9vtEb86l6CUvSezUrzMNTwuBXMGzy kFGVKPhPBKAtobNn8MB7GtGqU0EBkOZ2pWVMXAUb4lNmXqrWiIv6mET4C1vMg3NjE+rS UNgQ== X-Gm-Message-State: ALoCoQk8wouLUK4ALKiGANpJoIOOLgnTIksaXTseSmuqfbaz+LK67mm/Senn9UZiCFyCZTMa7PtS X-Received: by 10.224.223.129 with SMTP id ik1mr11258022qab.8.1405923761579; Sun, 20 Jul 2014 23:22:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.213 with SMTP id n79ls1854937qgd.29.gmail; Sun, 20 Jul 2014 23:22:41 -0700 (PDT) X-Received: by 10.52.241.76 with SMTP id wg12mr22478048vdc.5.1405923761466; Sun, 20 Jul 2014 23:22:41 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ut10si3797008vcb.79.2014.07.20.23.22.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Jul 2014 23:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hu12so11408346vcb.0 for ; Sun, 20 Jul 2014 23:22:41 -0700 (PDT) X-Received: by 10.52.163.229 with SMTP id yl5mr1114452vdb.79.1405923761371; Sun, 20 Jul 2014 23:22:41 -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 tc5csp86817vcb; Sun, 20 Jul 2014 23:22:41 -0700 (PDT) X-Received: by 10.224.34.73 with SMTP id k9mr38430782qad.11.1405923760663; Sun, 20 Jul 2014 23:22:40 -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 38si2394782qgc.102.2014.07.20.23.22.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 20 Jul 2014 23:22:40 -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 1X96zf-0000jI-TQ; Mon, 21 Jul 2014 06:22:39 +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 1X96za-0000j5-OP for lng-odp@lists.linaro.org; Mon, 21 Jul 2014 06:22:34 +0000 X-IronPort-AV: E=Sophos;i="5.01,698,1400050800"; d="scan'208";a="40044941" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw2-out.broadcom.com with ESMTP; 20 Jul 2014 23:31:50 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sun, 20 Jul 2014 23:22:28 -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; Sun, 20 Jul 2014 23:22:28 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 0CEE89F9F9; Sun, 20 Jul 2014 23:22:27 -0700 (PDT) From: To: Date: Mon, 21 Jul 2014 11:52:17 +0530 Message-ID: <1405923737-3338-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] [PATCHv7 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.169 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