From patchwork Fri Sep 6 10:34:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 173214 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp528683ilq; Fri, 6 Sep 2019 03:36:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCx8j5X41nGt9kvlpgnIH43PUz41qa5PPXlr3bVg5WzLnX0AdOfpmC22GxwpJdoOSf1fA4 X-Received: by 2002:a17:906:7ac6:: with SMTP id k6mr2682358ejo.243.1567766205533; Fri, 06 Sep 2019 03:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567766205; cv=none; d=google.com; s=arc-20160816; b=ZtECE9p+9Tb3gxHCkBbIT/v6NOMCcGmlZQbW/EY5p3pKQhQwWZV39DWbWqFEHax5vy nwKBATPN+/mcs4vVP5ppQW8uAzaFNk7OouOv4iJyD7Xl1wPVHXWULXLPqk89UmyjHW9X +6jhUzzlp6fJm57OnUac7NFfeoyuzYXCUxDUvYNIhwLS7xoVRreDtJ0pXRgRNrDDFltn bUxBEH1YyMPB/dktK/DOPfE4XbkhsbCPqAAmuxFtwS3+4rblOKpEFaLu0Ymei9rfglPK +wmPunE6a5UXG/fdN8xd2BB3VKuZS8C74wqt4gwrvJvS/S0KRri3vyCnc5WClkuznfZd Ssww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=GHjIBPJ+PwTl6X9tezsvSJH6nCeg20P1j2MJsj2LxCI=; b=lLJKeWvhSlVc2oDEYnNTTmhBqdd0NY0JED+KgJUVVzB6ZUguFiejym4SxXzzI40MRd i1RVb5emmT+Q619eUACzEjyTJpMHEx0DsQ9uuvzjZK2x5yDgEviS/zz5qq3+4mNepNzW bznA3q+RB08KM2MwgQjEjMHSSxRx3EVrliEVQCQ8B0iAwwYMfJXdhQa4lfge7QRbeFNL M2vsjN6f2nGzVU+PA9XgmWrmxS95RoOHGlPMUDBoi24TQ6tzoikEPOwlv900vRrcZXaW qrGFwMq/j5Q3QpBmBOAzP+vnBZtk/QhAhq7JBVKsH6MHX1aGT3TOnFX7GaXYoWrbSS6/ XFkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id e22si2936444eda.300.2019.09.06.03.36.45; Fri, 06 Sep 2019 03:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 580D31C033; Fri, 6 Sep 2019 12:36:14 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 860A91BE9F for ; Fri, 6 Sep 2019 12:36:06 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 66F622005CD; Fri, 6 Sep 2019 12:36:06 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9CFE42001FC; Fri, 6 Sep 2019 12:36:04 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E73EA402F0; Fri, 6 Sep 2019 18:36:01 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, Hemant Agrawal Date: Fri, 6 Sep 2019 16:04:09 +0530 Message-Id: <20190906103410.14996-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190906103410.14996-1-hemant.agrawal@nxp.com> References: <20190906103410.14996-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 4/5] event/dpaa2: add selftest cases X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Signed-off-by: Hemant Agrawal --- drivers/event/dpaa2/Makefile | 1 + drivers/event/dpaa2/dpaa2_eventdev.c | 1 + drivers/event/dpaa2/dpaa2_eventdev.h | 2 ++ drivers/event/dpaa2/dpaa2_eventdev_logs.h | 6 ++++++ drivers/event/dpaa2/meson.build | 3 ++- 5 files changed, 12 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile index e0bb527b1..634179383 100644 --- a/drivers/event/dpaa2/Makefile +++ b/drivers/event/dpaa2/Makefile @@ -40,5 +40,6 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API # SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_hw_dpcon.c SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev.c +SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev_selftest.c include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 9255de16f..902a80f36 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -951,6 +951,7 @@ static struct rte_eventdev_ops dpaa2_eventdev_ops = { .port_unlink = dpaa2_eventdev_port_unlink, .timeout_ticks = dpaa2_eventdev_timeout_ticks, .dump = dpaa2_eventdev_dump, + .dev_selftest = test_eventdev_dpaa2, .eth_rx_adapter_caps_get = dpaa2_eventdev_eth_caps_get, .eth_rx_adapter_queue_add = dpaa2_eventdev_eth_queue_add, .eth_rx_adapter_queue_del = dpaa2_eventdev_eth_queue_del, diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h index bdac1aa56..abc038e49 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.h +++ b/drivers/event/dpaa2/dpaa2_eventdev.h @@ -98,4 +98,6 @@ struct dpaa2_eventdev { struct dpaa2_dpcon_dev *rte_dpaa2_alloc_dpcon_dev(void); void rte_dpaa2_free_dpcon_dev(struct dpaa2_dpcon_dev *dpcon); +int test_eventdev_dpaa2(void); + #endif /* __DPAA2_EVENTDEV_H__ */ diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h index 86f2e5393..bb5a0e26c 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h +++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h @@ -35,4 +35,10 @@ extern int dpaa2_logtype_event; #define DPAA2_EVENTDEV_DP_WARN(fmt, args...) \ DPAA2_EVENTDEV_DP_LOG(WARNING, fmt, ## args) +#define dpaa2_evdev_info(fmt, ...) DPAA2_EVENTDEV_LOG(INFO, fmt, ##__VA_ARGS__) +#define dpaa2_evdev_dbg(fmt, ...) DPAA2_EVENTDEV_LOG(DEBUG, fmt, ##__VA_ARGS__) +#define dpaa2_evdev_err(fmt, ...) DPAA2_EVENTDEV_LOG(ERR, fmt, ##__VA_ARGS__) +#define dpaa2_evdev__func_trace dpaa2_evdev_dbg +#define dpaa2_evdev_selftest dpaa2_evdev_info + #endif /* _DPAA2_EVENTDEV_LOGS_H_ */ diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build index f7da7fad5..cea87d77b 100644 --- a/drivers/event/dpaa2/meson.build +++ b/drivers/event/dpaa2/meson.build @@ -9,7 +9,8 @@ if not is_linux endif deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec'] sources = files('dpaa2_hw_dpcon.c', - 'dpaa2_eventdev.c') + 'dpaa2_eventdev.c', + 'dpaa2_eventdev_selftest.c) allow_experimental_apis = true includes += include_directories('../../crypto/dpaa2_sec/')