From patchwork Thu Sep 3 19:21:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 53048 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id C559622E23 for ; Thu, 3 Sep 2015 19:22:18 +0000 (UTC) Received: by lanb10 with SMTP id b10sf19367290lan.3 for ; Thu, 03 Sep 2015 12:22:17 -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:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=vHMGmpmvMbERh7R5vw0dUtJnqOxWEKnoCP3gCrExuDM=; b=RQYIx+kBfLOgt1QJG9XgKkMgaU0lWes+2XcOvV/6c2NLDw0ZpEWrSrXltC3p3S8teb ZjJUDuEyzA2AxHzP7dMKOp188nuABpRPR88+C63/HNRGKiVziDqgaNZ8o2fOFTITGGv6 hfRpOjLyATQztk820HGXCbkAh5zDyLvZzG/MCF6m6Knzjz3kTIGsMql5HnIB5CjffrWQ QPjYk0Z8aOPd1T+ueBLgA2X6gGs8kr9ikt7Wwf+SM0Qgf+1ewXjySPXSF8L3KQJ69elE w7mLnlRZO+7CYH0CPXbrb+d+hM3fAd292k18Q5X55laAvSYKC+LtTPltELiKyoVLd4XZ HU0g== X-Gm-Message-State: ALoCoQk9UG1Nw0sjB02nR1uuC8ECGzapcUY/D3wGjnIuZd0i21M4s3iUsOvfQzpjVLyGNql2dNEF X-Received: by 10.112.199.5 with SMTP id jg5mr11168839lbc.14.1441308137565; Thu, 03 Sep 2015 12:22:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.168 with SMTP id u8ls33621lag.63.gmail; Thu, 03 Sep 2015 12:22:17 -0700 (PDT) X-Received: by 10.152.44.130 with SMTP id e2mr23436125lam.14.1441308137410; Thu, 03 Sep 2015 12:22:17 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id r3si14660963laa.97.2015.09.03.12.22.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 12:22:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by laeb10 with SMTP id b10so35999916lae.1 for ; Thu, 03 Sep 2015 12:22:17 -0700 (PDT) X-Received: by 10.112.63.138 with SMTP id g10mr23727814lbs.106.1441308137289; Thu, 03 Sep 2015 12:22:17 -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.112.164.42 with SMTP id yn10csp1474565lbb; Thu, 3 Sep 2015 12:22:16 -0700 (PDT) X-Received: by 10.140.150.213 with SMTP id 204mr69058754qhw.104.1441308136207; Thu, 03 Sep 2015 12:22:16 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r137si31221063qha.16.2015.09.03.12.22.09; Thu, 03 Sep 2015 12:22:16 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id DEDC561B6E; Thu, 3 Sep 2015 19:22:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2BCD461B68; Thu, 3 Sep 2015 19:22:04 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id C67E161B6A; Thu, 3 Sep 2015 19:22:01 +0000 (UTC) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id 6704D61A52 for ; Thu, 3 Sep 2015 19:22:00 +0000 (UTC) Received: by lamp12 with SMTP id p12so33580594lam.0 for ; Thu, 03 Sep 2015 12:21:59 -0700 (PDT) X-Received: by 10.152.45.69 with SMTP id k5mr23153518lam.13.1441308119037; Thu, 03 Sep 2015 12:21:59 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-161-180.pppoe.mtu-net.ru. [91.76.161.180]) by smtp.gmail.com with ESMTPSA id z12sm6620864lbp.46.2015.09.03.12.21.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 12:21:58 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 3 Sep 2015 22:21:53 +0300 Message-Id: <1441308113-14875-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: fix forward declarations for queue and buf X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@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.215.45 as permitted sender) smtp.mailfrom=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 Fix: In file included from odp_classification.c:15: In file included from ./include/odp_packet_io_internal.h:23: In file included from ./include/odp_classification_datamodel.h:27: ./include/odp_queue_internal.h:92:3: error: redefinition of typedef 'queue_entry_t' is a C11 feature [-Werror,-Wtypedef-redefinition] } queue_entry_t; ^ ./include/odp_buffer_internal.h:107:29: note: previous definition is here typedef union queue_entry_u queue_entry_t; Signed-off-by: Maxim Uvarov --- platform/linux-generic/include/odp/plat/queue_types.h | 3 +++ platform/linux-generic/include/odp_buffer_internal.h | 10 +++------- platform/linux-generic/include/odp_queue_internal.h | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/queue_types.h b/platform/linux-generic/include/odp/plat/queue_types.h index a7df155..33cb23a 100644 --- a/platform/linux-generic/include/odp/plat/queue_types.h +++ b/platform/linux-generic/include/odp/plat/queue_types.h @@ -47,6 +47,9 @@ static inline uint64_t odp_queue_to_u64(odp_queue_t hdl) return _odp_pri(hdl); } +typedef struct odp_buffer_hdr_t odp_buffer_hdr_t; +typedef union queue_entry_u queue_entry_t; + /** * @} */ diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index 6badeba..001654e 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -18,6 +18,7 @@ extern "C" { #endif +#include #include #include #include @@ -101,13 +102,8 @@ typedef union odp_buffer_bits_t { }; } odp_buffer_bits_t; -/* forward declaration */ -struct odp_buffer_hdr_t; -union queue_entry_u; -typedef union queue_entry_u queue_entry_t; - /* Common buffer header */ -typedef struct odp_buffer_hdr_t { +struct odp_buffer_hdr_t { struct odp_buffer_hdr_t *next; /* next buf in a list--keep 1st */ union { /* Multi-use secondary link */ struct odp_buffer_hdr_t *prev; @@ -144,7 +140,7 @@ typedef struct odp_buffer_hdr_t { queue_entry_t *target_qe; /* ordered queue target */ uint64_t sync; /* for ordered synchronization */ }; -} odp_buffer_hdr_t; +}; /** @internal Compile time assert that the * allocator field can handle any allocator id*/ diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h index 0f30965..69f7645 100644 --- a/platform/linux-generic/include/odp_queue_internal.h +++ b/platform/linux-generic/include/odp_queue_internal.h @@ -86,10 +86,10 @@ struct queue_entry_s { odp_atomic_u64_t sync_out; }; -typedef union queue_entry_u { +union queue_entry_u { struct queue_entry_s s; uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct queue_entry_s))]; -} queue_entry_t; +}; queue_entry_t *get_qentry(uint32_t queue_id);