From patchwork Fri Aug 19 18:17:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 74334 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp421168qga; Fri, 19 Aug 2016 10:24:06 -0700 (PDT) X-Received: by 10.200.49.14 with SMTP id g14mr9893623qtb.23.1471627446298; Fri, 19 Aug 2016 10:24:06 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y124si5248301qkc.83.2016.08.19.10.24.06; Fri, 19 Aug 2016 10:24:06 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id ECCCC609A0; Fri, 19 Aug 2016 17:24:05 +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 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 C55C561719; Fri, 19 Aug 2016 17:23:39 +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 E7A7461719; Fri, 19 Aug 2016 17:23:34 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 776066081A for ; Fri, 19 Aug 2016 17:18:06 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id g62so37390744lfe.3 for ; Fri, 19 Aug 2016 10:18:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VZtQnQj6Q/p0fcHQyp2/SPTqDMSNMWJxj3huJpFiVIE=; b=QYOTqRNguzL8VHIKL8HnfO5xLurmS4oqTGzznv/yEECUxoB2dQsPy+bpHgiIWrrPYy rZ7tA1jCRr+jmH/jQn7tTryjspgNE0VKII2IiCe4wnujZsszflH2zh+G8dR4zETV/Kkd tJAX0VScPfP3anVBaVeK9xDeFB/TwJ4NoqF7Bm/TDBFKQtg7vxAIpwtsprBMP0LgXGuu snaRq0nHF4BBMRaaT7aDPR5Iuk2aLKB8oY7U8O/s2DHiKAQi5cA0dcpYJceuk44CAFCh xFvWTKAX/S5eLQ6YKgZsCA/3tdvchclHwyGnHNR7TASInNBqz29sBpt/dg8+GRbn2+03 mJHg== X-Gm-Message-State: AEkoouu5/kEYVYM/sGWNFbA2AbMjRDSlWwPZZ+60d1K6EgXAQVhtlmQ+fbHPaPhx8EgIRfAEjcg= X-Received: by 10.46.9.145 with SMTP id 139mr2385463ljj.2.1471627085156; Fri, 19 Aug 2016 10:18:05 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id p128sm1381831lfb.32.2016.08.19.10.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 10:18:04 -0700 (PDT) From: Christophe Milard To: bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Fri, 19 Aug 2016 20:17:15 +0200 Message-Id: <1471630635-48894-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2] drv: byteorder: added bitfield order X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" mostly to keep the symmetry with the API side Signed-off-by: Christophe Milard --- include/odp/drv/spec/byteorder.h | 3 +++ platform/linux-generic/include/odp/drv/plat/byteorder_types.h | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/include/odp/drv/spec/byteorder.h b/include/odp/drv/spec/byteorder.h index d3f5d7e..bf363f5 100644 --- a/include/odp/drv/spec/byteorder.h +++ b/include/odp/drv/spec/byteorder.h @@ -38,6 +38,9 @@ extern "C" { * * @def ODPDRV_BYTE_ORDER * Selected byte order + * + * @def ODPDRV_BITFIELD_ORDER + * Selected bitfield order */ /** diff --git a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h index cb7aec2..aae6e69 100644 --- a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h +++ b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h @@ -49,12 +49,16 @@ extern "C" { #define ODPDRV_LITTLE_ENDIAN 1 #define ODPDRV_BIG_ENDIAN 0 #define ODPDRV_BYTE_ORDER ODPDRV_LITTLE_ENDIAN - #define ODPDRV_LITTLE_ENDIAN_BITFIELD + #define ODPDRV_LITTLE_ENDIAN_BITFIELD 1 + #define ODPDRV_BIG_ENDIAN_BITFIELD 0 + #define ODPDRV_BITFIELD_ORDER ODPDRV_LITTLE_ENDIAN_BITFIELD #else #define ODPDRV_LITTLE_ENDIAN 0 #define ODPDRV_BIG_ENDIAN 1 - #define ODPDRV_BYTE_ORDER ODP_BIG_ENDIAN - #define ODPDRV_BIG_ENDIAN_BITFIELD + #define ODPDRV_BYTE_ORDER ODPDRV_BIG_ENDIAN + #define ODPDRV_BIG_ENDIAN_BITFIELD 0 + #define ODPDRV_BIG_ENDIAN_BITFIELD 1 + #define ODPDRV_BITFIELD_ORDER ODPDRV_BIG_ENDIAN_BITFIELD #endif typedef uint16_t __odpdrv_bitwise odpdrv_u16le_t;