From patchwork Mon Sep 25 20:11:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garry Marshall X-Patchwork-Id: 131899 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA9ED42639; Mon, 25 Sep 2023 22:11:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8023F40144; Mon, 25 Sep 2023 22:11:34 +0200 (CEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id 7C00240041 for ; Mon, 25 Sep 2023 22:11:33 +0200 (CEST) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-99bdeae1d0aso889565666b.1 for ; Mon, 25 Sep 2023 13:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meaningfulname-net.20230601.gappssmtp.com; s=20230601; t=1695672693; x=1696277493; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nse8d8Q+ixzHXBpjVMig2UJLBCLfnvfRICehSI3qzYk=; b=khZINm4kmmj9iYACE8D5JVqevnfoZxp4iiZXcpafOblnYA6CNb+QoUVKGmVfvjMcT8 J6zcFvrX80x4/FJzNc1fuDgKlnTT5a4sPKFoiJyUYQylsVpItyzNzTMroQDE7k1kD0mm kd0eHTn2qoqkHFDhEuf25MKDPFpk0nuFeLTJGSX10Rd4DLAB/t76yg5x77//BlX39AkG bzSIZXJ2rCVElChTNu5QM0fflnHfs0hW6bKsbywErtbfnBq29ueGVQfhiGjRQOk/XrNK lZaq5mcy2wUtlu79yozwBI5gMy1fs4gYTuKD8IOEbS9GSrwEZG1P8GnLdz0KtmXsszaX GvYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695672693; x=1696277493; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nse8d8Q+ixzHXBpjVMig2UJLBCLfnvfRICehSI3qzYk=; b=j9bb/aFbRioCn8PjfZGS5sj5tvCgqi3NBd3jiBUUAoeTN72zPzFsL34eJJuz3V92+5 0yy44h/lMjjI0bpr9Wwu4tbBM0Yh+oXNNL5oEiKwRZJwE3RbvUpPOlPeZff3yFmSb0b4 tt2Ngc4rIbR5mER+wvxK5tJ9SBVd3udEI++HxS7nNEM+MLiRNZPkrk5olhZ06Jswmjiz SlDRAVZl/duj/WS3Cz+7p9nSWyl6wG+ccfCYXbauzzRNTEyZjwwg178XVfPurwbtVJJU csy65DymVrfvz/17xlnntP+EEL+JUFd/N+2H7Xzr28DslFS9LZQVV+w2iKhNXtrefbE1 WlSw== X-Gm-Message-State: AOJu0YyDbWNFXxuSfytNi6bboKKrw6kVjISbY01TknvTbdCkdOXf+IP6 857rzDKFtKmM0L28aIppqZmVi0fGn41Byfy4164Azw== X-Google-Smtp-Source: AGHT+IFzVTESXdMyNo2puoAa9rq0IwDMp8zj5yvHfINkJrs7pi/6vD78c6U41DDTFrPD+oVh6vNZpQ== X-Received: by 2002:a17:906:73db:b0:9a1:c659:7c56 with SMTP id n27-20020a17090673db00b009a1c6597c56mr7837642ejl.22.1695672693044; Mon, 25 Sep 2023 13:11:33 -0700 (PDT) Received: from IL-1641.il.global (cpc101772-grth12-2-0-cust159.16-4.cable.virginm.net. [92.233.102.160]) by smtp.gmail.com with ESMTPSA id y16-20020a1709064b1000b0099bd453357esm6713509eju.41.2023.09.25.13.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 13:11:32 -0700 (PDT) From: Garry Marshall To: dev@dpdk.org Cc: Garry Marshall , Konstantin Ananyev , Vladimir Medvedkin Subject: [PATCH] ipsec: use sym_session_opaque_data for RTE_SECURITY_TYPE_CPU_CRYPTO Date: Mon, 25 Sep 2023 21:11:28 +0100 Message-Id: <20230925201128.861-1-gazmarsh@meaningfulname.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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 ipsec related processing in dpdk makes use of the crypto.ses opaque data pointer. This patch updates rte_ipsec_session_prepare to set ss->crypto.ses in the RTE_SECURITY_TYPE_CPU_CRYPTO case. Signed-off-by: Garry Marshall --- lib/ipsec/ses.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ipsec/ses.c b/lib/ipsec/ses.c index d9ab1e6d2b..29eb5ff6ca 100644 --- a/lib/ipsec/ses.c +++ b/lib/ipsec/ses.c @@ -44,7 +44,8 @@ rte_ipsec_session_prepare(struct rte_ipsec_session *ss) ss->pkt_func = fp; - if (ss->type == RTE_SECURITY_ACTION_TYPE_NONE) + if (ss->type == RTE_SECURITY_ACTION_TYPE_NONE || + ss->type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) rte_cryptodev_sym_session_opaque_data_set(ss->crypto.ses, (uintptr_t)ss); else