From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1796A0524; Fri, 27 Nov 2020 20:09:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80C97C93C; Fri, 27 Nov 2020 20:09:28 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 15325C93A for ; Fri, 27 Nov 2020 20:09:25 +0100 (CET) IronPort-SDR: UNVRbBZNovPCVBemB0mJPtJuCUbcYAjBD2kAmdT9XFhPnAr3NJRsesoGx+rSbnoIMoUgwkBrF0 TCrgQmEbOT0Q== X-IronPort-AV: E=McAfee;i="6000,8403,9818"; a="159473711" X-IronPort-AV: E=Sophos;i="5.78,375,1599548400"; d="scan'208";a="159473711" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2020 11:09:24 -0800 IronPort-SDR: MqChqusXo6U0k5JN7dS8KewR4OOAe8D5BYphfGYd35GvEsncaxlJ5ETp4p1IO6ptBDfN5vMyv6 ue55a1fEENnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,375,1599548400"; d="scan'208";a="371502050" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga007.jf.intel.com with ESMTP; 27 Nov 2020 11:09:22 -0800 From: Ferruh Yigit To: Olivier Matz Cc: Ferruh Yigit , dev@dpdk.org, Haiyue Wang , Stephen Hemminger , Bing Zhao Date: Fri, 27 Nov 2020 19:09:20 +0000 Message-Id: <20201127190920.3312280-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC] net: make eCPRI header host network order X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Other protocol structs are in the host byte order, having eCPRI in network byte order is insistent and error prone. Making eCPRI protocol header host byte order. Signed-off-by: Haiyue Wang Signed-off-by: Ferruh Yigit --- Cc: Stephen Hemminger Cc: Bing Zhao Cc: Olivier Matz --- lib/librte_net/rte_ecpri.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/librte_net/rte_ecpri.h b/lib/librte_net/rte_ecpri.h index 1cbd6d813363..67bf9186ff6f 100644 --- a/lib/librte_net/rte_ecpri.h +++ b/lib/librte_net/rte_ecpri.h @@ -60,21 +60,20 @@ extern "C" { RTE_STD_C11 struct rte_ecpri_common_hdr { union { - rte_be32_t u32; /**< 4B common header in BE */ + uint32_t u32; /**< 4B common header in host byte order */ struct { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN - uint32_t size:16; /**< Payload Size */ - uint32_t type:8; /**< Message Type */ uint32_t c:1; /**< Concatenation Indicator */ uint32_t res:3; /**< Reserved */ uint32_t revision:4; /**< Protocol Revision */ + uint32_t type:8; /**< Message Type */ #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN uint32_t revision:4; /**< Protocol Revision */ uint32_t res:3; /**< Reserved */ uint32_t c:1; /**< Concatenation Indicator */ uint32_t type:8; /**< Message Type */ - uint32_t size:16; /**< Payload Size */ #endif + uint32_t size:16; /**< Payload Size */ }; }; }; -- 2.26.2