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 CF5F0A00C2; Thu, 10 Feb 2022 13:03:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0DEE426E7; Thu, 10 Feb 2022 13:03:51 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 76752411DB; Thu, 10 Feb 2022 13:03:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644494629; x=1676030629; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w3nkWAkj48JjmdHoviKPTULgG9C8eXj6VE6zcJgyzQQ=; b=KPd6OgM5Vlf9k57GntUA+YvXVv16RXdF7995N942UZkz+pEJiQ5vRcCQ mTiB4Aj1R7eUPcq+J1i3p4WECGFKtiCsYbUvQ7MBlXtbfvpkgs1VFEbhP GQ7yBVvWxQhvg8K4iXUEXrx8odDRMgQTwpvmbg/tYdDrACnPg2fkyOcfR /yZ0S5Gp+dkUdfhlSwI9UPQ+tI+jS7rujh7QXgi/+fGGEqyzXnGw3qxyG 7wXr4jyXPqJhB8rm+1oCThmZsISfTd7JdbS/baxNm70DO6xF/T7ODA8aa xBKUM9c3QZwDdhIyWaigpEHWnHGzktP8JLcM6FsalkJoaEt8ZbKxUjyMY A==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="249227143" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="249227143" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 04:03:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="622658298" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by FMSMGA003.fm.intel.com with ESMTP; 10 Feb 2022 04:03:42 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , konstantin.ananyev@intel.com, stable@dpdk.org, Declan Doherty , Akhil Goyal Subject: [PATCH v2 4/7] ipsec: fix missing explicit cast for C++ build Date: Thu, 10 Feb 2022 12:02:54 +0000 Message-Id: <20220210120257.585822-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220210120257.585822-1-bruce.richardson@intel.com> References: <20220204174209.440207-1-bruce.richardson@intel.com> <20220210120257.585822-1-bruce.richardson@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 C++ does not have automatic casting to/from void pointers, so need explicit cast if header is to be included in C++ code Fixes: f901d9c82688 ("ipsec: add helpers to group completed crypto-ops") Cc: konstantin.ananyev@intel.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- lib/ipsec/rte_ipsec_group.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h index 60ab297710..62c2bd7217 100644 --- a/lib/ipsec/rte_ipsec_group.h +++ b/lib/ipsec/rte_ipsec_group.h @@ -49,10 +49,10 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop) if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { ss = cop->sym[0].sec_session; - return (void *)(uintptr_t)ss->opaque_data; + return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data; } else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) { cs = cop->sym[0].session; - return (void *)(uintptr_t)cs->opaque_data; + return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data; } return NULL; } -- 2.32.0