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 BA1EAA0093; Tue, 4 Jan 2022 13:31:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46E0F40040; Tue, 4 Jan 2022 13:31:21 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C86A24003C for ; Tue, 4 Jan 2022 13:31:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641299480; x=1672835480; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lIz1sRjCzQtFoQ7Sezc+D6gBtmqIKOPtqjncQpBxsQc=; b=E0ePmp2NjtqvMaxiVk8EGNXziaMlnKr66J1WPfjqPAgVsLLLjCEkJR2E ZPLC7cF/goqJ/JSezjWtYqar/daXj2ZyMoCxeGbCA0c8jcS9BULeQ0PD7 qp4BLQps+aHkKhBUTJSzmaPo+Nb0lxdSePB6ifUt7IoFyi66eJoN/1zKJ i4TXUeJQGmXaZB5wJ+TXuYBonHe4Q4w2Zrexm0RaOTJT7Ol1pYtYHm10W 5SNFVtYSqkHW6bWhVWGSolQEBbaQJeyH6K9Ye2q/mcZ5RICvyCRDHNocx RSrDZS6kHepXdoa6IcHHa4G3wfq6WdN6CWddSAH18WTByRVcpeiaw6y6q w==; X-IronPort-AV: E=McAfee;i="6200,9189,10216"; a="328558928" X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="328558928" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2022 04:31:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="526030836" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga008.jf.intel.com with ESMTP; 04 Jan 2022 04:31:18 -0800 From: Ganapati Kundapura To: jerinjacobk@gmail.com, jay.jayatheerthan@intel.com, dev@dpdk.org Cc: abhinandan.gujjar@intel.com Subject: [PATCH v2 2/2] eventdev: update crypto caps get to return SW cap Date: Tue, 4 Jan 2022 06:31:14 -0600 Message-Id: <20220104123114.1053806-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220104123114.1053806-1-ganapati.kundapura@intel.com> References: <20211221113125.719189-1-ganapati.kundapura@intel.com> <20220104123114.1053806-1-ganapati.kundapura@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 update rte_event_crypto_adapter_caps_get() to return SW_CAP if PMD callback is not registered. Signed-off-by: Ganapati Kundapura diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c index 79b9ea3..6988bf1 100644 --- a/lib/eventdev/rte_eventdev.c +++ b/lib/eventdev/rte_eventdev.c @@ -176,11 +176,15 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, if (caps == NULL) return -EINVAL; - *caps = 0; + + if (dev->dev_ops->crypto_adapter_caps_get == NULL) + *caps = RTE_EVENT_CRYPTO_ADAPTER_SW_CAP; + else + *caps = 0; return dev->dev_ops->crypto_adapter_caps_get ? (*dev->dev_ops->crypto_adapter_caps_get) - (dev, cdev, caps) : -ENOTSUP; + (dev, cdev, caps) : 0; } int -- 2.6.4