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 718E9A0350; Fri, 4 Feb 2022 18:42:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D7E140E5A; Fri, 4 Feb 2022 18:42:44 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 47DBC40E09 for ; Fri, 4 Feb 2022 18:42:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643996563; x=1675532563; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cJ3V4VuGkAVShj73ZQTWTQdKr1BpKXyQ3o2Mz0ilgEo=; b=CBzWl3/nFjJMF2Ko2YqXj9LVKejwyCTCfw2Wz8v2/j/B9zIwNr7FCWkM n1HZfYO75YASvoMtKKLTj8FEzvzebA33IZdjB9H5GAQlw4GUugVtSOMJg tdPtAAwmFlFDb+7MAq+tDWTJjrk4mHw69Q6c5EmOYaRyawSbehyZkhqPh EAQ+8sjVGg2ErLHXF3Jf2x24OaHsa4Sz+OuW1JYtAO400andc9qYEIRHO Jb+ql95Yq61r1NSQDQo6DFiCsCr3NKApinTCtb1bQCCLmi1BEReuwBj3v qhzHBVexlJsY4wgUurQAbUh/qURmkjSRNyrSoVOMxtGXUCTTkZBtF9x1v g==; X-IronPort-AV: E=McAfee;i="6200,9189,10248"; a="229060598" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="229060598" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 09:42:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="620890414" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by FMSMGA003.fm.intel.com with ESMTP; 04 Feb 2022 09:42:41 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Konstantin Ananyev , Bernard Iremonger , Vladimir Medvedkin Subject: [PATCH 4/7] ipsec: add explicit cast to allow C++ build Date: Fri, 4 Feb 2022 17:42:06 +0000 Message-Id: <20220204174209.440207-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220204174209.440207-1-bruce.richardson@intel.com> References: <20220204174209.440207-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 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