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 BDACE458AC; Fri, 30 Aug 2024 22:15:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90E0742F8B; Fri, 30 Aug 2024 22:14:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 3C30B40151 for ; Fri, 30 Aug 2024 22:14:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725048882; x=1756584882; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hGQIVfkSbd0FJMNmakPc/XynJ+2y1gB2v5XuksakiTQ=; b=iVOxFeTovV3Kqq7ItQzuAJA5NQ2flKtjjSCr9vs27PFuA7zCF4vf5Cbx fRrCjewvVAvhEorpHUpjI1DQcKpopkWH8d1El0sD2T/obkOCzxUrFYzf+ T60YbdtKKZ8mzco04cOmI0xcxM+AGQ+IsIASUhxlUOUv/d9OFbSqhG9xW /BeprZWbw8wxJQu9Ed8bPfOr5sCzXt1nFjMRywP5HbsqXHV27lnSh9gE9 Itt3IHp2qMaP678EFQm9N0LUjoiNxOeO/JxZ30RXhD0mwWkqN0DCz4LD7 7JdM6AiER0vt4HrPGeXhN8VwIpdRloigp7vw8V044+9a51xuqKVGAuq0u A==; X-CSE-ConnectionGUID: U+JXyWBpTxa2+NgFAXSVBQ== X-CSE-MsgGUID: ZVqR6xMGSEGhHPSjM66BeA== X-IronPort-AV: E=McAfee;i="6700,10204,11180"; a="23661189" X-IronPort-AV: E=Sophos;i="6.10,189,1719903600"; d="scan'208";a="23661189" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2024 13:14:41 -0700 X-CSE-ConnectionGUID: 7KrabM9vRPOecwEbAx8qbQ== X-CSE-MsgGUID: B6pWknDuQPaa3x6NGJ2XFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,189,1719903600"; d="scan'208";a="94731882" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa002.jf.intel.com with ESMTP; 30 Aug 2024 13:14:39 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v1 04/10] baseband/acc: future proof structure comparison Date: Fri, 30 Aug 2024 13:09:46 -0700 Message-Id: <20240830200952.182685-5-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240830200952.182685-1-hernan.vargas@intel.com> References: <20240830200952.182685-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Some implementation in the PMD is based on some size assumption from the bbdev structure, which should use sizeof instead to be more future proof in case these structures change. Signed-off-by: Hernan Vargas --- drivers/baseband/acc/acc_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h index 0d1357ace61f..5c5cccf4c9c6 100644 --- a/drivers/baseband/acc/acc_common.h +++ b/drivers/baseband/acc/acc_common.h @@ -95,8 +95,8 @@ #define ACC_COMPANION_PTRS 8 #define ACC_FCW_VER 2 #define ACC_MUX_5GDL_DESC 6 -#define ACC_CMP_ENC_SIZE 20 -#define ACC_CMP_DEC_SIZE 24 +#define ACC_CMP_ENC_SIZE (sizeof(struct rte_bbdev_op_ldpc_enc) - ACC_ENC_OFFSET) +#define ACC_CMP_DEC_SIZE (sizeof(struct rte_bbdev_op_ldpc_dec) - ACC_DEC_OFFSET) #define ACC_ENC_OFFSET (32) #define ACC_DEC_OFFSET (80) #define ACC_LIMIT_DL_MUX_BITS 534 -- 2.37.1