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 17825A00BE; Thu, 10 Feb 2022 15:04:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92BAB4272B; Thu, 10 Feb 2022 15:04:37 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 7139242726; Thu, 10 Feb 2022 15:04:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644501872; x=1676037872; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w3nkWAkj48JjmdHoviKPTULgG9C8eXj6VE6zcJgyzQQ=; b=c0RujVbcE/aRQB446zzfz/+ufKhjD/0hfTrae6bWrZFcbempkY3R+Mj3 9LbPD1WWBETA0TSSiLDwpH927qfBadDtQ7vDoNgObyqYt7A89hMeZqDk0 wwLxHF3Kqeb+j/XL+UnWWYWeElrPy8ApUZT6aqlnCIyyhd51oafMT9ago 17J3MX7wF5yVh8GAYsKATmfqBUNHf549BXxWHzxGU2zIBoLXqryRX4kjp hkD4UrdGbSY6OvGMLj0BrsEhSqXpFWGXsQFR1xXcfHw4v9y+tuPA3zt0C s69wm5/zJHR21P0NHfaDu6o9Ive6t15kzhS00QxLj7XORY+E/8wSxaM7d g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="312781108" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="312781108" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 06:04:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="585964267" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by fmsmga008.fm.intel.com with ESMTP; 10 Feb 2022 06:04:29 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , konstantin.ananyev@intel.com, stable@dpdk.org, Declan Doherty , Akhil Goyal Subject: [PATCH v3 4/7] ipsec: fix missing explicit cast for C++ build Date: Thu, 10 Feb 2022 14:03:52 +0000 Message-Id: <20220210140355.586399-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220210140355.586399-1-bruce.richardson@intel.com> References: <20220204174209.440207-1-bruce.richardson@intel.com> <20220210140355.586399-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