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 A4AA5A034F; Mon, 7 Feb 2022 11:50:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55EA6410FF; Mon, 7 Feb 2022 11:50:51 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3C75F410EA for ; Mon, 7 Feb 2022 11:50:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644231049; x=1675767049; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=lIz1sRjCzQtFoQ7Sezc+D6gBtmqIKOPtqjncQpBxsQc=; b=HhkLh2UhRskwrzcuhDT/TvysHNYjBdjfyLFCGL3IhUL2ixrXsjzdFMrU GofXv7y7wL9EdhMP2Vx6U5SPH56eYDXUXC9i4csU1aOmMjhBlw1PoE1OZ aAv0XBmgaXS2ZguW6hKsUEPDWz+C6zFDJXkaoy7LvxiIXiIQEZ55KCppw wgg0frqmIOKUziktilB4bqYqem1p2BOAWq/fQY6EfVCg6npTFBnMMcpWI qx2DeWV3yBFjPPxRYfhgisQtpIrd74rkyUKNY5mEHM6ysROjVdPLlOP9T qMy8WbBESbu/YKHt9mOsQpoYZIZ6UNHSsu7R9/Wtmo102m3vsA1A5qsX4 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="236092437" X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="236092437" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 02:50:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="540046634" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga008.jf.intel.com with ESMTP; 07 Feb 2022 02:50:48 -0800 From: Ganapati Kundapura To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com, abhinandan.gujjar@intel.com, dev@dpdk.org Subject: [PATCH v4 2/2] eventdev: update crypto caps get to return SW cap Date: Mon, 7 Feb 2022 04:50:36 -0600 Message-Id: <20220207105036.3468246-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220207105036.3468246-1-ganapati.kundapura@intel.com> References: <20220111103631.3664763-1-ganapati.kundapura@intel.com> <20220207105036.3468246-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