From patchwork Sun Jun 30 17:52:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 55674 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8CF41B974; Sun, 30 Jun 2019 19:52:51 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 00A0E1B955; Sun, 30 Jun 2019 19:52:49 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5UHp53I004369; Sun, 30 Jun 2019 10:52:49 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=QU1wSVvIXiwQgqmGsNkwpXWlafcfxBqxU/CB5F4xLTg=; b=H+C5ZsHy3MmZ7em61XwyatkM+cplE/QNT1emfpy/JJ+/DjejXq0sXCrLWWvWhHISrQ+l Myj4V0JTwS0In+Ae2g3loXdoS/Q9HQ5nyq3yA6cBaCyp9D/oj+9twO/TTYU60V6KQdZq NB1oAEUgpG315/umMG2jfdU124BiNduALkwXUa+nxw9rZRTSJUek79iyrlSIkA62NRKH 5Y+nfRy9U/ANOW+oTAwe7enbyE5O4U+bbpb359Tick107WKQH378Cf1kilMMeIc6TlgF SjvEspfkZJbu2ss7ODAIQ9NyyqalWEivWaJzFhJac16Fu6nbSL3He3yid6l4jal61YTJ GA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2te7gm3x2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 30 Jun 2019 10:52:48 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 30 Jun 2019 10:52:47 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 30 Jun 2019 10:52:47 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.14]) by maili.marvell.com (Postfix) with ESMTP id 54D413F703F; Sun, 30 Jun 2019 10:52:44 -0700 (PDT) From: To: CC: , Pavan Nikhilesh , Date: Sun, 30 Jun 2019 23:22:39 +0530 Message-ID: <20190630175240.1126-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-30_08:, , signatures=0 Subject: [dpdk-dev] [PATCH 1/2] app/eventdev: fix order test port creation 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" From: Pavan Nikhilesh Configure event ports based on the underlying event device info rather than using hardcoded values. Cc: stable@dpdk.org Fixes: 5710e751813e ("app/testeventdev: add order port setup") Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_order_common.c | 32 ++++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c index 8a3420130..252e4a14c 100644 --- a/app/test-eventdev/test_order_common.c +++ b/app/test-eventdev/test_order_common.c @@ -67,6 +67,11 @@ order_producer(void *arg) int order_opt_check(struct evt_options *opt) { + if (opt->prod_type != EVT_PROD_TYPE_SYNT) { + evt_err("Invalid producer type"); + return -EINVAL; + } + /* 1 producer + N workers + 1 master */ if (rte_lcore_count() < 3) { evt_err("test need minimum 3 lcores"); @@ -298,12 +303,23 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, int ret; uint8_t port; struct test_order *t = evt_test_priv(test); + struct rte_event_dev_info dev_info; + + memset(&dev_info, 0, sizeof(struct rte_event_dev_info)); + ret = rte_event_dev_info_get(opt->dev_id, &dev_info); + if (ret) { + evt_err("failed to get eventdev info %d", opt->dev_id); + return ret; + } + + if (opt->wkr_deq_dep > dev_info.max_event_port_dequeue_depth) + opt->wkr_deq_dep = dev_info.max_event_port_dequeue_depth; /* port configuration */ - const struct rte_event_port_conf wkr_p_conf = { + const struct rte_event_port_conf p_conf = { .dequeue_depth = opt->wkr_deq_dep, - .enqueue_depth = 64, - .new_event_threshold = 4096, + .enqueue_depth = dev_info.max_event_port_dequeue_depth, + .new_event_threshold = dev_info.max_num_events, }; /* setup one port per worker, linking to all queues */ @@ -314,7 +330,7 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, w->port_id = port; w->t = t; - ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf); + ret = rte_event_port_setup(opt->dev_id, port, &p_conf); if (ret) { evt_err("failed to setup port %d", port); return ret; @@ -326,12 +342,6 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, return -EINVAL; } } - /* port for producer, no links */ - const struct rte_event_port_conf prod_conf = { - .dequeue_depth = 8, - .enqueue_depth = 32, - .new_event_threshold = 1200, - }; struct prod_data *p = &t->prod; p->dev_id = opt->dev_id; @@ -339,7 +349,7 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, p->queue_id = 0; p->t = t; - ret = rte_event_port_setup(opt->dev_id, port, &prod_conf); + ret = rte_event_port_setup(opt->dev_id, port, &p_conf); if (ret) { evt_err("failed to setup producer port %d", port); return ret; From patchwork Sun Jun 30 17:52:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 55675 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DD091B99D; Sun, 30 Jun 2019 19:52:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 8A9F91B996; Sun, 30 Jun 2019 19:52:52 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5UHoeHE016509; Sun, 30 Jun 2019 10:52:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=SO0y7cyXaTE+Je6w9yf5tc4EGmscf31DfYlBtw5lw+o=; b=Wb8vuBOXOpOsVhI6md+Hr2oQXqHf/sdSXDqeF0MRrsnnUd2aK5XcTo67BVzD4R81QREQ zjGMiARtOp6QIY7kMoQs+NONtZc4hsMd6nPjOPD4FsnjigPrvAqCmtL7rBHHCNJSte+Q z/E8WMhA/XmZCFqsBfOMZ81u9nCgliqLPEJbj4mzoiMCEHfJxK8lw+1A2XDqVeoXeVs+ eseGxGyx8IiqFq0iaoxZbrOalr3NXZEeXkZEBu6QjwzcX5gyeZw39tFH0bYrZ+CyKA+X IBZ5L0KmouZtXoPsFnMpU6fztmATiU1N1/7KZw4SRzYVZag9lzJAmwEauBrGUjZBKLZk 4g== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2te5bn4f5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 30 Jun 2019 10:52:51 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 30 Jun 2019 10:52:50 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 30 Jun 2019 10:52:50 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.14]) by maili.marvell.com (Postfix) with ESMTP id 68FA23F703F; Sun, 30 Jun 2019 10:52:48 -0700 (PDT) From: To: CC: , Pavan Nikhilesh , Date: Sun, 30 Jun 2019 23:22:40 +0530 Message-ID: <20190630175240.1126-2-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190630175240.1126-1-pbhagavatula@marvell.com> References: <20190630175240.1126-1-pbhagavatula@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-30_08:, , signatures=0 Subject: [dpdk-dev] [PATCH 2/2] test/eventdev: fix producer core validity checks 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" From: Pavan Nikhilesh When producer type is event timer adapter producer lcore checks are skipped. Since, timer adapter relies on SW to arm timers producer lcore is essential for its functionality. Verify producer lcore validity when producer type is event timer adapter. Cc: stable@dpdk.org Fixes: b01974da9f25 ("app/eventdev: add ethernet device producer option") Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_perf_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 01f782820..2e9e83e88 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -562,7 +562,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) return -1; } - if (opt->prod_type == EVT_PROD_TYPE_SYNT) { + if (opt->prod_type == EVT_PROD_TYPE_SYNT || + opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { /* Validate producer lcores */ if (evt_lcores_has_overlap(opt->plcores, rte_get_master_lcore())) {