From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DF3DA0032; Thu, 1 Sep 2022 11:39:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6235640684; Thu, 1 Sep 2022 11:39:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 9FF2340395 for ; Thu, 1 Sep 2022 11:39:54 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2811ZTVS020896; Thu, 1 Sep 2022 02:39:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=UhqmIOMf4u0V2mHU6WnOU4IavcqzYdqFk/J4idKZI8k=; b=Q5Wm/BvMqOfMS9abqlldHeNhcROYAucM/jGSIVaMYTGlktw7J3pkLqBiRwrnMBcHj9A3 ddeNz5wHUf3u/cAdsxLFT34VvsbXnXwwSAV3X19dx8oyZkCWp8Sh9hnlpm36UAmdC/Y2 N3GoiRZ6RLV/4n6IK3D5eLs7X0X+Q/h8nTTfHLgM8iBa42WeIhzlCpsRQ25MUsRNs3Nv 4tWC0o0fbrKC6A2fVCgIYdcO+acbaJblanKjFcNKa15WPWj0FPyDJAoTLIJIfVsYEDX3 QNl9JX/vjWJh7IMH+ZpO5OHzTPtibEiD1FhR7bjPRY3PUwP3RzDZC3RGpvNpQcErZhpL UA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jak731gc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 01 Sep 2022 02:39:53 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 1 Sep 2022 02:39:51 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 1 Sep 2022 02:39:51 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.193.83.114]) by maili.marvell.com (Postfix) with ESMTP id AC4B23F7050; Thu, 1 Sep 2022 02:39:49 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Fan Zhang CC: Jerin Jacob , Hemant Agrawal , Gagandeep Singh , Subject: [PATCH] test/cryptodev: ensure structs are updated in unison Date: Thu, 1 Sep 2022 15:09:50 +0530 Message-ID: <20220901093950.952-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: n-4wm-zaVS0TJmb1N4o2igOGzlVTzSY6 X-Proofpoint-ORIG-GUID: n-4wm-zaVS0TJmb1N4o2igOGzlVTzSY6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-01_06,2022-08-31_03,2022-06-22_01 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 The structs are directly indexed for generating standard vectors. Add asserts to make sure structs are not updated in isolation. Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 78a9ee0b11..6306fb7281 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -873,6 +873,17 @@ pdcp_proto_testsuite_setup(void) RTE_CRYPTO_AUTH_ZUC_EIA3 }; + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_auth_key)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_bearer)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_crypto_key)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_in)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_in_len)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_out)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_sn_size)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_hfn)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_hfn_threshold)); + RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_packet_direction)); + rte_cryptodev_info_get(dev_id, &dev_info); if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || -- 2.25.1