From patchwork Fri Aug 19 15:39:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 74256 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp347933qga; Fri, 19 Aug 2016 07:40:00 -0700 (PDT) X-Received: by 10.55.141.199 with SMTP id p190mr9003307qkd.185.1471617600009; Fri, 19 Aug 2016 07:40:00 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v19si4719348qkv.311.2016.08.19.07.39.59; Fri, 19 Aug 2016 07:39:59 -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 50635616CA; Fri, 19 Aug 2016 14:39:59 +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 B6BC7609A8; Fri, 19 Aug 2016 14:39:55 +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 8F99460E65; Fri, 19 Aug 2016 14:39:53 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by lists.linaro.org (Postfix) with ESMTPS id 47EF4609A0 for ; Fri, 19 Aug 2016 14:39:52 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id f93so34410632lfi.2 for ; Fri, 19 Aug 2016 07:39:52 -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=lAl8K7s1wnRlgHJC5k7kz6WOXz9FR9A91WrkAkB6VUM=; b=iIWe0BvKqL4cwfd0QDGEsdyUWHREeqdnH6KnZ8Uwg9ZuhL0mMDHE3MXTpv2hOKgGpZ DewYPG6DR4Q8Jf7tIXd1oS0RyBlgqwGddw3lYgQ3BmdH0TRRNquvt4RaY6KAXzuT1bNV rGyR3SSBr2UA+DsihaK13IpmekYbtmi8ZqKpQTdk5wYR5sAoRDd7XUPe9ZqGxW8M+4Wu ox+RLKpBmRC0bqus+CyL7x4e5fJD5J72tC+6CisLNoc1L/qRRbpmtxDIfqarNi2E6A4p pmeqAJrVfZmVoy+UKziIKi4ic95a+Z0S9sDNtyqPd/ueI/8GaiUJQ4kU80gi7DvHkgmQ UqCA== X-Gm-Message-State: AEkoousg9KVnyBGypGmER9Nz53xrwLRH2D+6O5wiZrlVtlRojEHsk1dSXpVpGSBK91MFzC0XqMg= X-Received: by 10.25.155.149 with SMTP id d143mr1824917lfe.121.1471617590880; Fri, 19 Aug 2016 07:39:50 -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 i22sm1308207lfh.8.2016.08.19.07.39.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 07:39:50 -0700 (PDT) From: Christophe Milard To: lng-odp@lists.linaro.org, mike.holmes@linaro.org Date: Fri, 19 Aug 2016 17:39:03 +0200 Message-Id: <1471621143-7992-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH] 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 | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) -- 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..9785d04 100644 --- a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h +++ b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h @@ -50,11 +50,15 @@ extern "C" { #define ODPDRV_BIG_ENDIAN 0 #define ODPDRV_BYTE_ORDER ODPDRV_LITTLE_ENDIAN #define ODPDRV_LITTLE_ENDIAN_BITFIELD + #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_BYTE_ORDER ODPDRV_BIG_ENDIAN #define ODPDRV_BIG_ENDIAN_BITFIELD + #define ODPDRV_BIG_ENDIAN_BITFIELD 1 + #define ODPDRV_BITFIELD_ORDER ODPDRV_BIG_ENDIAN_BITFIELD #endif typedef uint16_t __odpdrv_bitwise odpdrv_u16le_t;