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 53AAEA0C44; Mon, 14 Jun 2021 12:24:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B0E64067A; Mon, 14 Jun 2021 12:24:11 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 84EB84003F for ; Mon, 14 Jun 2021 12:24:10 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 74BDF4000F for ; Mon, 14 Jun 2021 12:24:08 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 5830740006; Mon, 14 Jun 2021 12:24:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.4.2 X-Spam-Score: -1.0 Received: from isengard.friendlyfire.se (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 9C5EC40010; Mon, 14 Jun 2021 12:24:06 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: jerinj@marvell.com Cc: dev@dpdk.org, =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Heng Wang Date: Mon, 14 Jun 2021 12:23:58 +0200 Message-Id: <20210614102358.11488-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] event/dsw: flag proper eventdev adapter capabilities 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 Sender: "dev" Set the appropriate capability flags for the RX, crypto and timer eventdev adapters to use. Signed-off-by: Mattias Rönnblom Tested-by: Heng Wang --- drivers/event/dsw/dsw_evdev.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 320a3784c..2301a4b7a 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -370,6 +370,34 @@ dsw_close(struct rte_eventdev *dev) return 0; } +static int +dsw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, + const struct rte_eth_dev *eth_dev __rte_unused, + uint32_t *caps) +{ + *caps = RTE_EVENT_ETH_RX_ADAPTER_SW_CAP; + return 0; +} + +static int +dsw_timer_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, + uint64_t flags __rte_unused, uint32_t *caps, + const struct rte_event_timer_adapter_ops **ops) +{ + *caps = 0; + *ops = NULL; + return 0; +} + +static int +dsw_crypto_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, + const struct rte_cryptodev *cdev __rte_unused, + uint32_t *caps) +{ + *caps = RTE_EVENT_CRYPTO_ADAPTER_SW_CAP; + return 0; +} + static struct rte_eventdev_ops dsw_evdev_ops = { .port_setup = dsw_port_setup, .port_def_conf = dsw_port_def_conf, @@ -384,6 +412,9 @@ static struct rte_eventdev_ops dsw_evdev_ops = { .dev_start = dsw_start, .dev_stop = dsw_stop, .dev_close = dsw_close, + .eth_rx_adapter_caps_get = dsw_eth_rx_adapter_caps_get, + .timer_adapter_caps_get = dsw_timer_adapter_caps_get, + .crypto_adapter_caps_get = dsw_crypto_adapter_caps_get, .xstats_get = dsw_xstats_get, .xstats_get_names = dsw_xstats_get_names, .xstats_get_by_name = dsw_xstats_get_by_name -- 2.25.1