From patchwork Mon Oct 25 12:31:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 102773 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0CDAA0C52; Mon, 25 Oct 2021 14:31:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5FE340E3C; Mon, 25 Oct 2021 14:31:32 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7922A4003E for ; Mon, 25 Oct 2021 14:31:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635165090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IfxhzXoiLP8f++3Fd8xZOYjXaXJG7zjBO/nSZ8iegRo=; b=VNszSWwXjE16k4UUt670LNNaSDc3y0FzbMtFtKkqrCZi7u1/wcImWOjT2qx5wbKx14VQfZ MXbSF2lbitTjI+bfbHBGqMmQJRH2BPFx3rYGDNPX2pUxIV8lbOfcJVSwl0J0NLUkPYHSLQ hkqfCJh7jHfSqvtMWuZ9y+D9tDCV4Lw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-Pbmv-lhaNt66LD2-spXvvw-1; Mon, 25 Oct 2021 08:31:27 -0400 X-MC-Unique: Pbmv-lhaNt66LD2-spXvvw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2FD63A40C0; Mon, 25 Oct 2021 12:31:26 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20E4C5FC25; Mon, 25 Oct 2021 12:31:23 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Olivier Matz , Ferruh Yigit , Ori Kam , Jie Wang , Wenjun Wu , Andrew Rybchenko Date: Mon, 25 Oct 2021 14:31:07 +0200 Message-Id: <20211025123107.1600-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH] net: remove endianness annotations for L2TPv2 bitfields X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Endianness is already handled by the checks on RTE_BYTE_ORDER. Marking bitfields with endianness types is at best unneeded, at worse it breaks build with OVS (with sparse enabled). Example: ../../lib/ofp-packet.c: note: in included file (through .../ovs/dpdk-dir/build/include/rte_flow.h, ../../lib/netdev-dpdk.h, ../../lib/dp-packet.h): .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:92:37: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:93:37: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:94:40: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:95:37: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:96:40: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:97:37: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:98:37: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:99:40: error: invalid bitfield specifier for type restricted ovs_be16. .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:100:39: error: invalid bitfield specifier for type restricted ovs_be16. make[3]: *** [lib/ofp-packet.lo] Error 1 Fixes: 3a929df1f286 ("ethdev: support L2TPv2 and PPP procotol") Signed-off-by: David Marchand --- lib/net/rte_l2tpv2.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/net/rte_l2tpv2.h b/lib/net/rte_l2tpv2.h index 670fe5470e..b90e36cf12 100644 --- a/lib/net/rte_l2tpv2.h +++ b/lib/net/rte_l2tpv2.h @@ -89,25 +89,25 @@ struct rte_l2tpv2_common_hdr { __extension__ struct { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN - rte_be16_t t:1; /**< message Type */ - rte_be16_t l:1; /**< length option bit */ - rte_be16_t res1:2; /**< reserved */ - rte_be16_t s:1; /**< ns/nr option bit */ - rte_be16_t res2:1; /**< reserved */ - rte_be16_t o:1; /**< offset option bit */ - rte_be16_t p:1; /**< priority option bit */ - rte_be16_t res3:4; /**< reserved */ - rte_be16_t ver:4; /**< protocol version */ + uint16_t t:1; /**< message Type */ + uint16_t l:1; /**< length option bit */ + uint16_t res1:2; /**< reserved */ + uint16_t s:1; /**< ns/nr option bit */ + uint16_t res2:1; /**< reserved */ + uint16_t o:1; /**< offset option bit */ + uint16_t p:1; /**< priority option bit */ + uint16_t res3:4; /**< reserved */ + uint16_t ver:4; /**< protocol version */ #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN - rte_be16_t ver:4; /**< protocol version */ - rte_be16_t res3:4; /**< reserved */ - rte_be16_t p:1; /**< priority option bit */ - rte_be16_t o:1; /**< offset option bit */ - rte_be16_t res2:1; /**< reserved */ - rte_be16_t s:1; /**< ns/nr option bit */ - rte_be16_t res1:2; /**< reserved */ - rte_be16_t l:1; /**< length option bit */ - rte_be16_t t:1; /**< message Type */ + uint16_t ver:4; /**< protocol version */ + uint16_t res3:4; /**< reserved */ + uint16_t p:1; /**< priority option bit */ + uint16_t o:1; /**< offset option bit */ + uint16_t res2:1; /**< reserved */ + uint16_t s:1; /**< ns/nr option bit */ + uint16_t res1:2; /**< reserved */ + uint16_t l:1; /**< length option bit */ + uint16_t t:1; /**< message Type */ #endif }; };