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 C217141DCC; Mon, 13 Mar 2023 13:29:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2053406BC; Mon, 13 Mar 2023 13:29:43 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CEE7A40151 for ; Mon, 13 Mar 2023 13:29:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678710582; x=1710246582; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3dbtzu9qtsPtD7ezxGHa7z3EUiF8qpIhLAu6IkAV+yU=; b=D8QZK0BC4I4Yq52/S5r9xfGalrv+N+0HB+aY+5MG7kWASMPjV/qhiwf9 XaR2Klxb3c2gFKL5ZGA9pxSp1OHBScQVjDG+HFXgFHaetQfDTTWdmoBF7 a9wxc3NGlQPEpdF+KzvvnQDHNnRoY+IKY53e1RcfFQ0Rm+aeob4zb+VY3 83G/Y4irAUV1GEaPPafcjGEQ9j386vDVW4VehquHDySW1M5nxJLSrqhoi YEP5RYtoXzybDJSZms5Z++pnjaEhQFgpHvJ/u9+AZtY2ukRmeIO8tksKA QxWvYdb+q06bN2sGKYKt5rgCih9jlKNZEGj5KKICKIHT1OQOO7v7YMTW8 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="364794469" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="364794469" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2023 05:29:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="1007964048" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="1007964048" Received: from silpixa00400884.ir.intel.com ([10.243.22.145]) by fmsmga005.fm.intel.com with ESMTP; 13 Mar 2023 05:29:40 -0700 From: Radu Nicolau To: Radu Nicolau , Akhil Goyal Cc: dev@dpdk.org Subject: [PATCH 1/2] examples/ipsec-secgw: allow single xform SA Date: Mon, 13 Mar 2023 12:29:37 +0000 Message-Id: <20230313122938.53716-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 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 Update check capabilities before session create to allow single xform SA i.e. auth or cipher only Fixes: a8781df86c14 ("examples/ipsec-secgw: check capabilities before session create") Cc: gakhil@marvell.com,kai.ji@intel.com Signed-off-by: Radu Nicolau --- examples/ipsec-secgw/ipsec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index a5c2b524a7..a5706bed24 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -101,13 +101,11 @@ static inline int verify_crypto_capabilities(const struct rte_cryptodev_capabilities *capabilities, struct rte_crypto_sym_xform *crypto_xform) { - if (crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) - return verify_crypto_xform(capabilities, crypto_xform); - else if (crypto_xform->next != NULL) + if (crypto_xform->next != NULL) return (verify_crypto_xform(capabilities, crypto_xform) || verify_crypto_xform(capabilities, crypto_xform->next)); else - return -ENOTSUP; + return verify_crypto_xform(capabilities, crypto_xform); } static inline int -- 2.25.1