From patchwork Fri Aug 19 22:24:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 74337 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp519905qga; Fri, 19 Aug 2016 15:24:57 -0700 (PDT) X-Received: by 10.200.52.182 with SMTP id w51mr11547510qtb.90.1471645497756; Fri, 19 Aug 2016 15:24:57 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n131si27005qke.128.2016.08.19.15.24.57; Fri, 19 Aug 2016 15:24:57 -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 5CA3D60972; Fri, 19 Aug 2016 22:24:57 +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 7D22160694; Fri, 19 Aug 2016 22:24:54 +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 31C02607CB; Fri, 19 Aug 2016 22:24:52 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id F218E6065B for ; Fri, 19 Aug 2016 22:24:38 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id b199so42168106lfe.0 for ; Fri, 19 Aug 2016 15:24:38 -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=BqAzSO9onSAA+bsGMQp2qhEpSjlyQ+cuc+AGUTzrLLY=; b=BVDkMEgybUftVkR0taL4J/v3xEb8KG+z0s8sgwObGaL8pkoVZRbJsZ+O8e7LVBi3H2 liA1CSGLBS/UYfxJMCs7/Ldo4feVgPnAh6A1TOxijg3TiwCfEIxCRB/R0qXtqCqfuqxb e61dlch36BiS/LrrrOPaJXGcPXhFi6R2H13zrPIC5VukQ9d6hyEtbbYr5BcZXDexQ/xd g2/NRVdeFsUQ2Y3FOqplxcM6TmG8RN9Um/eGSpTMmK1zkl8lAAJDMXbGL5TDoA8l0o/y M/b2b4revnJKnL5NIANJL6CtYhy5KLeHcSFQomJ9ipzvYoCqU1syV1sWz+XKQAs6i4wX IS5w== X-Gm-Message-State: AEkooutAf3UizsHzZgQTpexLOt9X0D95covA6ncoSewED3aOOkIaK1FYAf/6waTK+1kLVF0j6Gg= X-Received: by 10.25.218.75 with SMTP id r72mr2215978lfg.131.1471645477699; Fri, 19 Aug 2016 15:24:37 -0700 (PDT) Received: from localhost.localdomain (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id 83sm1562314ljj.14.2016.08.19.15.24.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 15:24:37 -0700 (PDT) From: Christophe Milard To: bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Sat, 20 Aug 2016 00:24:31 +0200 Message-Id: <1471645471-18758-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3] 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 Reviewed-by: Bill Fischofer 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..5dd182d 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_LITTLE_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;