From patchwork Mon Nov 17 17:57:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 40971 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 74D2821F5F for ; Mon, 17 Nov 2014 17:57:54 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf1495457wib.2 for ; Mon, 17 Nov 2014 09:57:53 -0800 (PST) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=Mqaa7XnloDvGzQtGTjFxP5b3WjM7C8+wiGyKX5JcoY0=; b=Yq1NiFA7AT2tdmpkg2ApczemhHYUN2mkR+A9ftnR3baWCRQB2torE98666juib4PW4 POiHCucqMhFTnOJZuBObjWckq9p0OHa66MjJYxcWl7JoHwsG+Mu3VQYcorywqe/s/AGp QUhWgg+vCq+2H8NnrPeyc3uMnpwrFXQ0gu8fkj1/K/8jEnDlUFmVMm555q4lNcyjqzmD UaldDlTpBIWLYVlZ1tZJGuE1YDYAlSYjaZuZEk5JJF3iNPHmmV7jP91qVD0xqz6B4bQj sTT0rnoZUa+qFu2X+LioeKWm+U9hI5rWi2u0YQbhY4u4OiWcu3/MQscKvCZifQHQp5RT TXYQ== X-Gm-Message-State: ALoCoQk0xTh5TdbUZ1QQAazS4i5kMKten5N/gJoLhB3K3J0QhbZTisIQ57MBdDYIaA5Jd5BS6ubK X-Received: by 10.112.142.36 with SMTP id rt4mr14047845lbb.3.1416247073554; Mon, 17 Nov 2014 09:57:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.227 with SMTP id v3ls1285608lav.91.gmail; Mon, 17 Nov 2014 09:57:53 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr29193252lbc.66.1416247073406; Mon, 17 Nov 2014 09:57:53 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id v1si52837453lag.49.2014.11.17.09.57.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 09:57:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id gq15so2996419lab.6 for ; Mon, 17 Nov 2014 09:57:53 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr29193235lbc.66.1416247073261; Mon, 17 Nov 2014 09:57:53 -0800 (PST) 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.184.201 with SMTP id ew9csp1198927lbc; Mon, 17 Nov 2014 09:57:52 -0800 (PST) X-Received: by 10.52.167.38 with SMTP id zl6mr13178382vdb.66.1416247071973; Mon, 17 Nov 2014 09:57:51 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id qr20si22947730vdb.71.2014.11.17.09.57.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Nov 2014 09:57:51 -0800 (PST) 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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XqQYb-0002HI-AD; Mon, 17 Nov 2014 17:57:45 +0000 Received: from mail-qc0-f177.google.com ([209.85.216.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XqQYV-0002Gz-5O for lng-odp@lists.linaro.org; Mon, 17 Nov 2014 17:57:39 +0000 Received: by mail-qc0-f177.google.com with SMTP id x3so1972957qcv.8 for ; Mon, 17 Nov 2014 09:57:34 -0800 (PST) X-Received: by 10.140.22.71 with SMTP id 65mr18321490qgm.19.1416247053591; Mon, 17 Nov 2014 09:57:33 -0800 (PST) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id w75sm3088331qgd.14.2014.11.17.09.57.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Nov 2014 09:57:33 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 17 Nov 2014 12:57:16 -0500 Message-Id: <1416247037-13357-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] api: Add implementation version 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: , MIME-Version: 1.0 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: mike.holmes@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.47 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 Add odp_version_impl_str() so that the implementation may indicate its own version string independently of the ODP API changing. Signed-off-by: Mike Holmes Reviewed-by: Bill Fischofer --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/api/odp_version.h | 11 ++++++++ platform/linux-generic/odp_impl.c | 35 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 platform/linux-generic/odp_impl.c diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index ea77521..e709700 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ odp_coremask.c \ odp_crypto.c \ odp_init.c \ + odp_impl.c \ odp_linux.c \ odp_packet.c \ odp_packet_flags.c \ diff --git a/platform/linux-generic/include/api/odp_version.h b/platform/linux-generic/include/api/odp_version.h index 4450452..805ddba 100644 --- a/platform/linux-generic/include/api/odp_version.h +++ b/platform/linux-generic/include/api/odp_version.h @@ -69,6 +69,17 @@ static inline const char *odp_version_api_str(void) } /** + * Returns ODP implementation version string + * + * Every implementation of ODP may receive bug fixes independent of the version + * of the API changing, this function returns that indication string. + * @note This string is implementation specific. + * @sa odp_version_api_str() + * + * @return null terminated implementation specific version identifier string + */ +inline const char *odp_version_impl_str(void); +/** * @} */ diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c new file mode 100644 index 0000000..c58cc09 --- /dev/null +++ b/platform/linux-generic/odp_impl.c @@ -0,0 +1,35 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP Implementation information + */ + +#ifndef ODP_IMPL_H_ +#define ODP_IMPL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define ODP_VERSION_IMPL 0 +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) + +inline const char *odp_version_impl_str(void) +{ + return ODP_VERSION_IMPL_STR; +} + +#ifdef __cplusplus +} +#endif + +#endif