From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30064.outbound.protection.outlook.com [40.107.3.64]) by dpdk.org (Postfix) with ESMTP id 36F991B24D for ; Mon, 9 Oct 2017 20:47:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kL2rjKYvwNW64wzzSQJg7/LZQ2oJG1UhaoN7JxXb+6s=; b=BFp7NiqtrJPry3m9YZBwq8r9nE6GBpx9DKm/3oeFIKbff2D/6IjhnfFi9tKew9kPVYsCthDi31NuLxBxGE1PuHtlckC+rOnssYtlfh8CI6SgOz31YNzt/niK17EUbqauZ7mQLQM309TDY8jEBjB5SIwVnbrfG+5gxC9cFfxKD34= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by VI1PR0501MB2046.eurprd05.prod.outlook.com (2603:10a6:800:36::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 9 Oct 2017 18:47:18 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Mon, 9 Oct 2017 11:46:56 -0700 Message-Id: <5cccaa29d74d63a7b6800797c35fb8dd425c1510.1507574644.git.yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: <20171005230032.7548-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: MWHPR2201CA0009.namprd22.prod.outlook.com (2603:10b6:301:28::22) To VI1PR0501MB2046.eurprd05.prod.outlook.com (2603:10a6:800:36::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efe72aaf-9cb5-4780-a142-08d50f462b88 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:VI1PR0501MB2046; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 3:TYKmbJI3af9fMwjLbpN7R46EaoiRIHKI/KUYjkZQSSOcZE8iTePNHG4YMjU4ojorrdwyKzCIXfuypErpm+immrHKDhXwMplppt24qmq5b/kJ1L00eILfqqhlkLgy6dUzQrXuT7zbNtDygPKVMF913yKbADeX8pudsLqdtUgvmjbNkcXAZn/nUjofhgjh3tZubLwdLQ3szvlof4DZz3WQqWDNRn7BDaltkRqyN0yUHOVYRD0ds6ZeNYxE1F0aj7Vw; 25:wbmHBxcSMhQA0DK7EL7foNG+A9v33SkHdVkrFSwARdP85VlxlP+5mdbNrrwdhxviTPqS9kU5OSCWBdX1Z/8H5LIbVpDMHs7EXvXacNMrNgWRZhvbVztpdybmJ+L6SMkmKCsIFPVrn+VOfYiNOH0JZqRa2iKDEgCupdf0NAE4nf7vd8YSnPEGQHd6DfVIWhzQkGDaofRxJXKenZbAoo0VEFEjHy9gWSqoWcB5pDE3Xa1Y1wUS1MhUi1L5T38JOdGaQDDj4LMpVj2phBmXQpDaEhqtCvOFZs2iHg/vAugdaYuhiUVf5vBVpRngxDK5ul8/EYSA4ZMD0DSX6gqXd2WSmg==; 31:Kl1N/nn+bn1S4wVvjjRmVpXZHcwI6XPaE4+ICjev/yJHhZd1OFbaZYZGH+bn5IMf00kLrly4GwyBwIVPkY9Gocx5ZNB6f7flRkYgIQUYEF+qUF2pJXhyG+f3dPe86eIzegyEJBgd3UfVaC52Eo/P+AaPQxKAUVxhlegmJenvwRROnq1HGNBCIHNDTT7VrdReLZGB7gYU0Z4OGGa97fAo7FQBhGsW7MrzfPdMaslEMwU= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2046: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 20:6lfDUAczXcO73ruwAJJcUze8WVJKt+FJSX4NMa8I4GQJH/MozJX9GZ3Uyv+tHV4Q+dH0g/d5fHfIxnSh4jul8FdjDUIp6zW+WiDDRdI3EH7ZBGXpSR8r8FHNZ6E87BomD7+Rxt936ZL+2ulVBVE2Lf/uPuctbIJPvhj+PDvTx8GVaHWIf2MsbwA9g0vch82bkA6dyrFTTfgevBkL0Jor8vK6auN6l6MhzZbiMZJHVTN/XMR//jHNaSrCJfohoRvMjx1eG+zZNgXfmNnASn1KDWNAD+5hA1hsQA8TMs0c2166OgM1RoHpL4OxRkZiHQugKujRfIviYCvuoEoE2xLQmtnLjapidyUEu2GrFylw87AjNGn+9GhL14qRYFTdcF8z44tvTycMBfZC+V/jYb81BMZihkWiitAcu+2MeNRQ66R2NFHYWNLej/vzPpM1lnKiSy6fxSoqplNQkr304N2VKG8qiuMcwMprWcZpLWGV/bU3paIxHZEH8Iusx1Chq3de; 4:CFB+6PXUlpn+3ESoutDW6GzH23YaSzLcyW2HEw992BDkrYkwdNnlcuW8nzgaj3nioijB/hsiuE2f/m0a/2ql6j0ZH5BUd8m/UC5lQagb9RjqoWzfc5vGVz2GwSlieNSN+nDYeWbOXiMx8wOgsa+nQTItIjIigsBD2Og212NdBxLlrDdqbaBkUhLatovYBQ1voWO4h7dlCW5PfY45QdZNrSxI7ac3H+nUWg6eBbdXxFhoAE5jd0/OwkvncGsUi+41hP5ZLhDFMOl3k+KW4NFxg+xt4nQHa2h8e6JB9Hjge4I= X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0501MB2046; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0501MB2046; X-Forefront-PRVS: 045584D28C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(199003)(189002)(50226002)(16586007)(50986999)(97736004)(36756003)(316002)(25786009)(8936002)(6116002)(48376002)(105586002)(81166006)(33646002)(3846002)(101416001)(76176999)(107886003)(68736007)(118296001)(4326008)(2906002)(50466002)(21086003)(66066001)(305945005)(86362001)(81156014)(69596002)(47776003)(8676002)(106356001)(16526018)(5660300001)(5003940100001)(7736002)(55016002)(478600001)(2950100002)(189998001)(53936002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2046; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2046; 23:BIxivoFMeT2LLvjtFU9xiWy3SWqr0YUXF8GaQE1?= =?us-ascii?Q?sncCBErUF/JmqsEMdMsy2zD2tlliePwT5gOFUtHIC0/oeJvRA4B1Z3t1eLlz?= =?us-ascii?Q?H4ssdoMPp2Vs9yij/UFTfUgAABUoP5Y28i9QeBR5xDzKdoTymfH9m+IowyJW?= =?us-ascii?Q?WgTnVyZyF9qktylEUEwUrHSTnaQsx9RcNXm5FoIsHSoaHsBraS0do+ZkP9Ov?= =?us-ascii?Q?MqtTLY5YFC4GrQLT1HAz/0JAsYqWD2JB6o9iYmorJB4O6HXCaYhnnqk1bVP0?= =?us-ascii?Q?pe6gJGtczV3OeFloZg9MgrSR080Ey49DKD2+W6RZsZ6TfxbpBSZt3BN03ula?= =?us-ascii?Q?K4jshNMnPLDKbBeQrQCtEUrnybAqLB2yQzT5jlrPX6o3PgOMqxhr1H52u44o?= =?us-ascii?Q?O3lJRTv5eZ9m6EpEB3ny/Hw98wmifACMFF3AEo3HvU0zQ9EREXqJyF9NufA8?= =?us-ascii?Q?iWupVYwpm7ZXdf162GNijrU4s/S7z9yN2Qzex/aHrm5R3hzAsxgzaEQJuQx6?= =?us-ascii?Q?65Xy3qbcI6mdzSjh5EqZsPxgt4hFFZ9mdhZbJbJxwUkTUHmwYbVraLlN1PLk?= =?us-ascii?Q?iGH3v4nzE1DpvWLSfNiJojqN3YiR0iLDTlcmLd+Cj82HJq4t4cukDZKP+UDJ?= =?us-ascii?Q?MUlUzYbrX49aA0qV81U+W5hDzjFtBhGHbRVR7HWpdQKmhip09q3CYNMbaEpt?= =?us-ascii?Q?Z0NxevIHV9ORQw9dLuS3lawkZjrqabDot/049mdbgkx4VdqSje7ixE8QBiev?= =?us-ascii?Q?xuL5r2dY+C9AZAxuSJDiWXCpqIYO0NnUaraXFj9wrr0479/wqIC72z+22sSl?= =?us-ascii?Q?rPi77r2q+dS1ZYp73riwXlL+Io/dPcyGb5/LMu1py8q2KrY7gVfqPG8yqI6M?= =?us-ascii?Q?jGqdDhFpvdQ599tbmGcocG3Yw43GgHMjpdDz5aclLLROHJOsy5gtI9D6AZdb?= =?us-ascii?Q?N6cM3QuOwXp80F2tD8oHNRDKTK73AZJ26wRlltCj3U56WopyFW4+cCnwG3dE?= =?us-ascii?Q?E+OvREMCshfcNjf050MDPgx34Y/wgTBhlA40/itBWT6BZrHO+YY4Nqo7Oyxf?= =?us-ascii?Q?ElsqtgzGahi39lwDjPSzCBDDpcOTPYJxYD05oioVLuN5qglaUKDeU4H1mS4j?= =?us-ascii?Q?JUTrZxwWoLFA=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 6:BHwn8/BvFG/dK3BnyJfzs9limCMlgGjk5xHZt7fWqA7m8teR13C7CG88oEJwV6cP6+eIRIGt9WwmKebuIFWwhdxZbQwZyGGxf45OEm5/XBvbULNwdfk4b4m1FAOeq/FjBZP2qcznJIcE70DCXJlQ3EFOENrec4N7wEhYa/zBFHFLtKoHc+QQjSiArRG4ElCSRwwUGTqpm3dV6TCyPGleE9vMyij1KK0b8w6ysRstQL1r2LIFaUpjCPLoanI17Dfwd8J23n1u2hkwk2h2kjnRFHly2i1vZaMiXgonsb95b8AuTJePT4eGET5UE8RG8vpzimRSeXIEoqskLW5KmOAUuQ==; 5:BLHX59dEVnpb0nqNzkhRkD3EqFRxlnp48FqWpGRgruc2ofnLE7xqohbP4YbLuxdYnBbhoyhmW8GfgJ7VYk7Uc9afpoch/8ywbHUt8Jb0f9rex8A68TIwlsrfErLPdn3XNOfR2rF3c12AFbfy0P+DAFxK2ZFGuRnSJHRBvZUbZT0=; 24:XuTqNiYtnbBQ+8KuB9ykmeC3PLAJgSM4Ho9rHq1XfYZdS/o/NPj7XfgCSqOZrW4ISprFJ3NyrIkFmFbfTDTf/Du8FcZmVui79lKe8ghSz1o=; 7:bT9mDCkkB/d+xhvoPOPSANA29oHjFMBExUww1hb8kiH+R2TPiVLabqdwSnLir4hWwPY5O9JfAPD4k/BSZWaM0tNiEsYLgbsCcP10KFtg7PS9Ks8ZAG1yZupgvN4MIDZ4KmTrVEfnJovpczjdd930EoNAA7WgnOSLn9me28LX9qf4mn1Khy0rBfvxnMYZu5TZ+EBzfJ0o2VsXc7V1pRFyltWt6yKzUG2LIlpythS2PKE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2017 18:47:18.4200 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2046 Subject: [dpdk-dev] [PATCH v2 3/7] net/mlx5: use static assert for compile-time sanity checks 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: , X-List-Received-Date: Mon, 09 Oct 2017 18:47:21 -0000 Replace compile-time sanity check with static_assert() as c11 standard has been set. Add mlx5_rxtx_vec.h and move the sanity checks to the file. Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxtx_vec.c | 32 +-------------- drivers/net/mlx5/mlx5_rxtx_vec.h | 87 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 31 deletions(-) create mode 100644 drivers/net/mlx5/mlx5_rxtx_vec.h diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c index e8f0626a6..deab2ad66 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c @@ -55,6 +55,7 @@ #include "mlx5.h" #include "mlx5_utils.h" #include "mlx5_rxtx.h" +#include "mlx5_rxtx_vec.h" #include "mlx5_autoconf.h" #include "mlx5_defs.h" #include "mlx5_prm.h" @@ -632,13 +633,6 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, 10, 11, 2, 3); #endif - /* Compile time sanity check for this function. */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) != - offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4); - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) != - offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8); - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, hash) != - offsetof(struct rte_mbuf, rx_descriptor_fields1) + 12); /* * Not to overflow elts array. Decompress next time after mbuf * replenishment. @@ -856,15 +850,11 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4], /* Merge to ol_flags. */ ol_flags = _mm_or_si128(ol_flags, cv_flags); /* Merge mbuf_init and ol_flags. */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) != - offsetof(struct rte_mbuf, rearm_data) + 8); rearm0 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(ol_flags, 8), 0x30); rearm1 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(ol_flags, 4), 0x30); rearm2 = _mm_blend_epi16(mbuf_init, ol_flags, 0x30); rearm3 = _mm_blend_epi16(mbuf_init, _mm_srli_si128(ol_flags, 4), 0x30); /* Write 8B rearm_data and 8B ol_flags. */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, rearm_data) != - RTE_ALIGN(offsetof(struct rte_mbuf, rearm_data), 16)); _mm_store_si128((__m128i *)&pkts[0]->rearm_data, rearm0); _mm_store_si128((__m128i *)&pkts[1]->rearm_data, rearm1); _mm_store_si128((__m128i *)&pkts[2]->rearm_data, rearm2); @@ -987,26 +977,6 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n) rxq->crc_present * ETHER_CRC_LEN); const __m128i flow_mark_adj = _mm_set_epi32(rxq->mark * (-1), 0, 0, 0); - /* Compile time sanity check for this function. */ - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) != - offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4); - RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) != - offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, pkt_info) != 0); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, rx_hash_res) != - offsetof(struct mlx5_cqe, pkt_info) + 12); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, rsvd1) + - sizeof(((struct mlx5_cqe *)0)->rsvd1) != - offsetof(struct mlx5_cqe, hdr_type_etc)); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, vlan_info) != - offsetof(struct mlx5_cqe, hdr_type_etc) + 2); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, rsvd2) + - sizeof(((struct mlx5_cqe *)0)->rsvd2) != - offsetof(struct mlx5_cqe, byte_cnt)); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, sop_drop_qpn) != - RTE_ALIGN(offsetof(struct mlx5_cqe, sop_drop_qpn), 8)); - RTE_BUILD_BUG_ON(offsetof(struct mlx5_cqe, op_own) != - offsetof(struct mlx5_cqe, sop_drop_qpn) + 7); assert(rxq->sges_n == 0); assert(rxq->cqe_n == rxq->elts_n); cq = &(*rxq->cqes)[cq_idx]; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h new file mode 100644 index 000000000..c41a9b96a --- /dev/null +++ b/drivers/net/mlx5/mlx5_rxtx_vec.h @@ -0,0 +1,87 @@ +/*- + * BSD LICENSE + * + * Copyright 2017 6WIND S.A. + * Copyright 2017 Mellanox. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of 6WIND S.A. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RTE_PMD_MLX5_RXTX_VEC_H_ +#define RTE_PMD_MLX5_RXTX_VEC_H_ + +#include +#include + +#include "mlx5_autoconf.h" +#include "mlx5_prm.h" + +/* + * Compile time sanity check for vectorized functions. + */ + +#define S_ASSERT_RTE_MBUF(s) \ + static_assert(s, "A field of struct rte_mbuf is changed") +#define S_ASSERT_MLX5_CQE(s) \ + static_assert(s, "A field of struct mlx5_cqe is changed") + +/* rxq_cq_decompress_v() */ +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, pkt_len) == + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4); +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, data_len) == + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8); +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, hash) == + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 12); + +/* rxq_cq_to_ptype_oflags_v() */ +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, ol_flags) == + offsetof(struct rte_mbuf, rearm_data) + 8); +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, rearm_data) == + RTE_ALIGN(offsetof(struct rte_mbuf, rearm_data), 16)); + +/* rxq_burst_v() */ +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, pkt_len) == + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4); +S_ASSERT_RTE_MBUF(offsetof(struct rte_mbuf, data_len) == + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, pkt_info) == 0); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, rx_hash_res) == + offsetof(struct mlx5_cqe, pkt_info) + 12); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, rsvd1) + + sizeof(((struct mlx5_cqe *)0)->rsvd1) == + offsetof(struct mlx5_cqe, hdr_type_etc)); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, vlan_info) == + offsetof(struct mlx5_cqe, hdr_type_etc) + 2); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, rsvd2) + + sizeof(((struct mlx5_cqe *)0)->rsvd2) == + offsetof(struct mlx5_cqe, byte_cnt)); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, sop_drop_qpn) == + RTE_ALIGN(offsetof(struct mlx5_cqe, sop_drop_qpn), 8)); +S_ASSERT_MLX5_CQE(offsetof(struct mlx5_cqe, op_own) == + offsetof(struct mlx5_cqe, sop_drop_qpn) + 7); + +#endif /* RTE_PMD_MLX5_RXTX_VEC_H_ */ -- 2.11.0