From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0075.outbound.protection.outlook.com [104.47.1.75]) by dpdk.org (Postfix) with ESMTP id 09D4B1B1CE for ; Fri, 6 Oct 2017 01:00:56 +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=oRnrtDs+BWLJRDmXl9HawnI2z9xmvYg463xirym4zCfQkEZQyoCR2v/mPVz+G5+592OWOHaUkm2M+k/Evb//iFi49bDhZc9ak1abyliYD2ENwZlODioLOtvhSAXzZcc9j640PKheUVVy1vyzwPpDE+eSIZrISK924bQRewibmU0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by HE1PR0501MB2041.eurprd05.prod.outlook.com (2603:10a6:3:35::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 23:00:53 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Thu, 5 Oct 2017 16:00:28 -0700 Message-Id: <20171005230032.7548-4-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171005230032.7548-1-yskoh@mellanox.com> References: <20171005230032.7548-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: DM5PR2001CA0013.namprd20.prod.outlook.com (2603:10b6:4:16::23) To HE1PR0501MB2041.eurprd05.prod.outlook.com (2603:10a6:3:35::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8a5950d-10d9-474a-0f5d-08d50c44ef05 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:HE1PR0501MB2041; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2041; 3:fXcOhfkoe+Yr0DIkuXk7C0h+YuEmclzb1jp8mpX96Fk0eRefmrmVUu9f/XZvuSQTwBUag6bhH+4+6E8epZ+Q/B5h3GNO/DAlyoxZrMvN+HQ/+2GoosBmCtOyWhzOxSA3Nrc4hJ5fYDLrGuTl9/KxS7av00zhVfHvdgGsSL0hKJ7pF4IttLTaU0tT8y1IIkBLU97CpTIBPfuBgCtD3dZIAvJB1eVWLa1hsK1emnmkAO0fxDeNOGtx6hytTyqGJrmB; 25:gq0FCeu5MRW3XZyOYvbIBBcNicgLHO7Ih4uASxQjE9OP3/w1ErJjBdTZDbGbbI1PLUdlsOokqjsnIDgBQMdKnu/DbdbH3WL1WG3LTyX+jLt8ZvVjBAZ8yUaeeo8DK2yjwra2nXeRPRnVMOsbh0kCN1C/oBswE2cr13TB9d7bi5SMbvAsa1poXt3zQPD/wHsiRJYBD4oHraNnvM1LR60+3j4jC0Md7ZHy4B2KkwAfkIgKB1R4Y+gwoqSmIgbMmCFsGU8TMVpTqdeidYDvo8cWbEgmZ03hkxTvsREzMwMHGRbVADp9MLb0P/NhlsMoeVXBlj8frP/VhktUOadzG/GhYA==; 31:Ad9jQGwhgrFoQyY4ZdEFyn2sWRfKtc6Ef1d1hw0sr9d3Hmh4Hu9Jh+UQZDaGk0RnemWDCnFG+Mlvd+bGU60Rl8Z1raZBj8rRlBodcXILvGYmwxMoBGAx7At/zZihj6sQd6d/sbawP19yleIq2IxD8QNNbbWy7zKf9bA/F2yujeq2Ym0o+mHIYb+xI0c9jIeasLxFVMUPFTSBZmTLBKBLwZN7a+qXu8IaN27E4K6LGag= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2041: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2041; 20:3G+2BB43DoJ/sHRhzxXeSCFxrzjTna60wzi2XZEn01kZKaEDlswqwDiwZG5NGPtLKfxdnfh50ID8AeDTglrov0c0+svoAOxAaJpulaSeZa+gv7ZiCkBrMhj44o3p6GFfK2oevaezEuSrXY0/vQhE8zV73YOv7tmWWwkmhvAYUrYvP4ocyUCjIoOXc7JjZj8MYc2ZeGIJGib1yGUbBYaxRS/NOidZIIjHVx6L2BRhlcTN6kuVB/9zWGgoIz3OsrOu30W0GBTLLuI8CRUpRw7Z+n+NJSMrlqcuufihknXrw2ifYX7Opu7YkW8d5N8LIcJUEvWLBhLZLUZkzOMzUxZPk5NGJt4WIkEOSNQdq1BDOazBJactz4rwQDECdOj5tMBCQLR5m7SpzgoiIcRKJhvZc7zwewStM6UgpPhmkWe3kZ7os0uyN2lsADg8dxBe7WQBwxRufBwXai0iESm5ERzeOWaY/AZtPWT+4yaIZrI2M1DMWCGIVCCWPVwI/DVm+Vpc; 4:NCCT6W8XmJhPWtPyAjqBfflPrZooePnttWMUiameNCg9L72eyr0W6jLELGY8j+8CAjt5EzvREMS4joJojL2pJsikoPttQRgwiZVcvtmMLVYcZ/F7+Ny3j5zXgpC4gZmkYBZO49yzoOJrQqNODjr4oFQHZ8RS8NC48mhyk7N8H+oK4ne4C0u6sQ1LjlSCQwh+bRwxi890wy+2Z3LcyoGa3WnJyurvSWiKVDcshksdkYMw6ZNgnW1e23Kz2jaK9iFllivwtwW049PxyXFXxZjysWSAZZQxMfZAcjQY1ho4/8E= 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)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0501MB2041; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0501MB2041; X-Forefront-PRVS: 04519BA941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(8676002)(50466002)(2950100002)(81166006)(66066001)(81156014)(7736002)(478600001)(47776003)(305945005)(189998001)(16526018)(76176999)(97736004)(50986999)(86362001)(2906002)(101416001)(16586007)(33646002)(5003940100001)(6666003)(1076002)(105586002)(69596002)(316002)(6116002)(3846002)(50226002)(55016002)(25786009)(53936002)(48376002)(36756003)(5660300001)(106356001)(21086003)(4326008)(68736007)(8936002)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2041; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; HE1PR0501MB2041; 23:eIcaD66mnRc8RbewrFM5cjT2Y/mufSTKcCdQ7tZ?= =?us-ascii?Q?nLh5ryrBzbBCKv/6BbXWynZ/E/E1yN8MGZ/fhLF4Sh33lI8XnuUQym+E8EFT?= =?us-ascii?Q?Hm3wOlS78puZeA/d/K0UtZ7e6L1cKj1E8HyyDG1mxrVRUjTXdxIFDP10U8wP?= =?us-ascii?Q?e6LRlXS7S10w2NrgZ7m2YlNttGjwuXsLd5NBaGnJlpRW6Ztd8V7Q9GQsEPI3?= =?us-ascii?Q?rPKMW9PwoD2uQMCDm5YIBt0iI/vunUy/JTLESXBvjsqF4Ct/gfC2V/h8Q3jc?= =?us-ascii?Q?rZGIB1vCpyafdazaBcM1IoQ3xmSs+mlz/FDJ/Dio/z6IqlVXZS9LTrbUxrs6?= =?us-ascii?Q?Oc4YdkZl6Hv8aEl9IHvuXtEwOMudvJjJ1LnTrthBXVlQkP2PBDCHntFwHrWk?= =?us-ascii?Q?f6s0f5O/XjoYYIH04BZ5qk7WiVuSebmtGHMKS/sDSQFgZvzQNnc37bUczdc6?= =?us-ascii?Q?lwl3OCwvDfW8eQfju8IuI5pKplal1qSnXLbb7kZU5DBNNEOlfmr5qFhbHCHa?= =?us-ascii?Q?JVmuf1t34ALJ7NP7t9Yx2tm71nwFJg5AYLrULgrDUICF4yJqrMyV1FEbO3u6?= =?us-ascii?Q?PGCQekM3l18nY6KQ0E2BwplmzXUoQW0urUemU3+K01CniuNMO6tgvEm3UiYp?= =?us-ascii?Q?qDFi75f0F3koQAtWC9FDV2Cs6ziWBsRhCg5ZaEgT7LkaYtB0J7GXnIGXbZMH?= =?us-ascii?Q?gTlvdzsY/JiOYu0ggdXnVNsCE9pw/kye4Z/ZJoEFVvlQ2Zh32e9dK6jXHvGF?= =?us-ascii?Q?UPuHy86XlU1mtaiwwlqeuh4KZUz5CIcVKQkOZjjtURQSBWS49YWSVwxPxa6a?= =?us-ascii?Q?zphMU6edgXTwoijppNS9K/IEA9lcmKRlK4I1tcboDpSu3ZMLVKyvK/5HKTU6?= =?us-ascii?Q?3Zo3pW0z0NUxv8DwVFO6zERE9ys1OGf+qMF/taZPnNpp/aCQPfkHGd5DAbJe?= =?us-ascii?Q?bJ8zGK/a23vAzda1/N8vvzDRk/g7hTBoTrt+ffJ5q9NV/A70/Wi7rb2QRtn8?= =?us-ascii?Q?HiXNXwZw5Zxmgavqj5bryoG0ChtvV64gN3kUsrPffKpuwpqIR2IqvI8bMf3o?= =?us-ascii?Q?Yqehv1GqtLN/wNjv50V6xHv6GI+hqkiS6yUJbqbffhummyS0k9g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2041; 6:epVdbtCfMBSgyVW7YlFLWLhcCrgLVVwLf6KnY2utQX7oJK2FcBAnXNe2Gf1VnEtiGF5TdIS5dNitj2E/hRArDR8kua6uwti/f9tgLxbPb9vJe9RAyYByTjAs59WjJjmNySTvlOvsI68tVvYdrxkwTIlCl+O7/G2gHuHdz6oSQ3uYfV17VTewzLra1qbpA3Azx6TASLoz/xdiUgzyFQF0IssAZjViEBhAVklrg0zu1+/y+vXIJEEpONbEEErJQpcxhwpRZEU4nsd2UMHEpVTias5fb3q6z1edTm4z7oHiFA/tJbyTCpMO0YYBiRHVx6m/Fr33DeIjJlvDbZwSNxdjqw==; 5:cR3xFFSGBHqJYAIxjqbe6gMN9DFQUl6SChmXIMIhNKxTcC+5L0kwAbrkAkQX385/Gq1B7Oykcbt8hPm7/7HTU4Ih+n0CUwqEshS5sVZCDhvjkqhoq6r4FfJoYoTdXIwb5NCrHXSVhc0TxjaQcOYDpQ==; 24:1b6eQ1zxhgKV/S1hY7B7tu4MVRPN1VCx4YW/ia9MmzDj24RoudaJN3wVo4tWEqNNIVIPTFfD9Air2NPWUrlhiGK7mQi+/MgnJsIRsyDQ0TI=; 7:DhnvTzIcg8RzDlV2ud/dm0FgVxC4HVK3aiBKuelsDYaWlEJ0gDzX+RvxEN8mELDxpKYFFUpaAk2jmwxcWgkVZBV4f9dHxtZytFaAETFyRL02CZze2n8uC+UHQZKWOknDMTXBdg0/Mp4D6lGIRK2dzc6BZEd6uT2zPxptazHLwtvdm3t3UsrzZ3XUB/DvZwSLrQFLodcnMkJ3adqMhSXRvmpe2K+U1UcHMAUQQbCW5c0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2017 23:00:53.8782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2041 Subject: [dpdk-dev] [PATCH v1 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: Thu, 05 Oct 2017 23:00:57 -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