From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0063.outbound.protection.outlook.com [104.47.34.63]) by dpdk.org (Postfix) with ESMTP id B9350293B for ; Mon, 11 Dec 2017 16:14:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Gs44jtS8dY2uvwx2JESRfJZD3xid1rG3Z/QrklkWTvc=; b=HIbl2L/QboVIbOV+17wa5oWbam/I5TyvR0FUx0qfiwdg2BXMCvdl7S555iEnIu8n+50AxT9de21qHkEPfOtWWxIit+k0+ah049hacNwitE0VYsdbUFpl6Cb7z1Po3pU9/CeXqExN4CAhZN/c+kglCxQwPLthZL3ydlrS5gAvRWA= Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 11 Dec 2017 15:14:25 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 11 Dec 2017 20:43:44 +0530 Message-Id: <20171211151346.14405-6-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR13CA0046.namprd13.prod.outlook.com (10.168.240.160) To CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85ec7e30-6b7b-4a20-2866-08d540a9dfcf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:psezkGzwwtN4fzP6ypfNFnsg+IgQC9+dVOtz0TWlB92tO0FYSGgQp7PSBo0vK4OhoIF62ggajDqYSsZ4emVqBJc/kQYntwQi8HibdFL2etwRUT94Z+Y8VX+W9wCq+bwBULvaW+SRbb5OBZ5SxhsdGbTtiumvuA0aef6Xuwpa8RdszBgwutWv3cvnLdngjtZRN4itMnpVXuBrO7y+pz7kR+xa1752KiWvHv7/zDCw83ssnCD+SHZKZHa/Qk/VegT4; 25:YFJQ6H5DnpzcJACvIsLyJ0n0YqRaCn9wuQMOa2EzZgalK5ECxmJ03Q+iucy+rIyKhImrJ/w2lYY9/aW3Qi0ILZ50OR0Pt2Ny8dIcpHWVQrfjpNmUgeMJxhb+nE1AqWLxhsQyRlVh0fp6LKACFl7fnex7BpRWZZICmGPjgiq6cgdmdHxesL/xJ8L75Cq9o5BP7AacFIAjZrSass6F7QwgpM+uwaJAKAWYrem1lucyK19c5s64yb7YIM6cGAZJ09eb7z2nX+X7t1BBz6UgR15R0JjrPAoF426X/jKEOShwb51psR9tkK9grtl9d4nlnf233FDalACTbVihaU0tFHqhOQ==; 31:nrB6gX40uTmuKETXbQBu1MxqtyklI4MReyZtDS6EgslBPMEbNiqCRiareghL6JkVJtkKvP/Qk1hL5RdFI03mxbnfHKf++uZ90g9VyUH9E9Xk8mnP9XY4Mn3wBSoYXoTZlTd64U1k31J1eM4cOkqVNjbLnkOEPwy88b2OTl20tbGtDKTFRUGS/Yxkrs2BFvgk3v8kLAxtxQYjtMccEkZSYHpyOYDfE33HJBrkwp61CqE= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:RaVr8d1iEu3jNO4R3s7z+80s/71TQ72mNL+B13zoWDSvTHSZUS9+m9IIYMisDmGlK1EMN+Ia8CX4aAPrLFeSD/FMqOy1BTw1PWV+XUeShdDQ4DblouDqr6+VqlHg4HIiPJ9PUcYZfOADzR2eo9MeeKtAj7+HkrkOuntAvmoAoEyb+JR2m/fC9FzftY8KZG6ZLuz8ibqJ5MwygflKcZ66Tmcs0rNyzE5btBLifyrxmZ7Uh8kwYMnqyF05P+/pZwZ0aeaylRCTUp73Gv7ECgMaBq/V+LA7JhARVdv0zPivGIGfJI5wBfEdF0dxL/v2I8T+DoCO0KbzzR2lUH8YKZjsmgaxPHaDsyYmM7i9KLXc6jlmv25eI72WhIIXyZD5H5ocWY/cmY5OjBL32ly1nQbpSw8mxVvXOJYnmK5xMZ+j7H9Dvy7KftONS2VXAevcE4uyPGyrOR8guDq6oNPlColTj8tPmZEG92RTTvZmI1Z3q21WgPoMyfJH022NWXoKqVvA+YR8gxYQZC+wBfl9RMPmlaj8PYllLeKUo015NbsDtesEskWTMaYTbi2uLvfu0WEgT5KqBkfkXNNkx744xtr6y7SEKUq2P0/QZ1QjssWT1Xc=; 4:hxijtnrFAfCO0q+H9WpcN5Z5cA19nJBSDpTdu0RHOKEiSHPGq5ORLh9MYYWteNZGL9ET5lxgi+f8X+lKcl9zR9c15E7muaBsF0eiArJiMAkhtJZlaM2dn6Er2GS/T4uZwCiwIrhKIVaU1EeuUDn29U/y21CY1ZHfTuB3ufgkpdpzs6THeqHdXC6mQ+07l0v7n+Na3fJcriHT+UXKVSky9bfU2K6Rgl79H5Ju0fLTaWjrs2nVDSk9uOVry3t+dPvZaCwT6yysW0Dvpmn1+7bq6w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231022)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(199004)(189003)(97736004)(53936002)(53416004)(106356001)(16586007)(105586002)(8676002)(25786009)(1076002)(8936002)(107886003)(81166006)(36756003)(50226002)(69596002)(7736002)(305945005)(66066001)(50466002)(6506006)(4326008)(16526018)(6486002)(81156014)(3846002)(2906002)(2950100002)(5660300001)(42882006)(6636002)(6666003)(6116002)(316002)(68736007)(47776003)(478600001)(72206003)(52116002)(6512007)(8656006)(48376002)(5009440100003)(51416003)(59450400001)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3463; 23:a7Gq9EK/bx5gyvPHKuX1MAIoFsGpfDG2Pd45gvBrR?= =?us-ascii?Q?xUtAg3L1mqYl5jW/by7axFgUNX5t9pkAQIVoRpGqUKR/uo/N201duC2ydq9A?= =?us-ascii?Q?fJcEPFAr9IZj4e4Gyy7IEskbU0XEFqgxM/MPpOLDmOIUphMtgB0IJCAYjL78?= =?us-ascii?Q?cK+27kmMWZiWZcFcX228HXg296YdtQ7vH5ZqWHlTo2UDb6NyNDx+mjxyy00a?= =?us-ascii?Q?2iuSPujcB3HCBz09lxAWldRcp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osticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 15:14:25.9308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85ec7e30-6b7b-4a20-2866-08d540a9dfcf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: [dpdk-dev] [PATCH v3 6/8] app/eventdev: add event Rx adapter setup 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: , X-List-Received-Date: Mon, 11 Dec 2017 15:14:34 -0000 Add functions to setup and configure Rx adapter based on the number of ethdev ports setup. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- v3 Changes: - Fix compilation issues for gcc version < 5 v2 Changes: - Used default eventdev config values instead of hardcoded values. app/test-eventdev/test_perf_atq.c | 19 ++++-- app/test-eventdev/test_perf_common.c | 110 +++++++++++++++++++++++++++++------ app/test-eventdev/test_perf_common.h | 1 + app/test-eventdev/test_perf_queue.c | 16 ++++- 4 files changed, 119 insertions(+), 27 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 3aa12f56f..1fe16ed63 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -187,6 +187,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) uint8_t queue; uint8_t nb_queues; uint8_t nb_ports; + struct rte_event_dev_info dev_info; nb_ports = evt_nr_active_lcores(opt->wlcores); nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 : @@ -195,13 +196,22 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? rte_eth_dev_count() : atq_nb_event_queues(opt); + 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; + } + const struct rte_event_dev_config config = { .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, - .nb_events_limit = 4096, + .nb_events_limit = dev_info.max_num_events, .nb_event_queue_flows = opt->nb_flows, - .nb_event_port_dequeue_depth = 128, - .nb_event_port_enqueue_depth = 128, + .nb_event_port_dequeue_depth = + dev_info.max_event_port_dequeue_depth, + .nb_event_port_enqueue_depth = + dev_info.max_event_port_enqueue_depth, }; ret = rte_event_dev_configure(opt->dev_id, &config); @@ -225,8 +235,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } - ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, - nb_queues); + ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, nb_queues); if (ret) return ret; diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 03be8171c..1fd7ef8b1 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -231,19 +231,78 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, return 0; } +static int +perf_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, + struct rte_event_port_conf prod_conf) +{ + int ret = 0; + uint16_t prod; + struct rte_event_eth_rx_adapter_queue_conf queue_conf; + + memset(&queue_conf, 0, + sizeof(struct rte_event_eth_rx_adapter_queue_conf)); + queue_conf.ev.sched_type = opt->sched_type_list[0]; + for (prod = 0; prod < rte_eth_dev_count(); prod++) { + uint32_t cap; + + ret = rte_event_eth_rx_adapter_caps_get(opt->dev_id, + prod, &cap); + if (ret) { + evt_err("failed to get event rx adapter[%d]" + " capabilities", + opt->dev_id); + return ret; + } + queue_conf.ev.queue_id = prod * stride; + ret = rte_event_eth_rx_adapter_create(prod, opt->dev_id, + &prod_conf); + if (ret) { + evt_err("failed to create rx adapter[%d]", prod); + return ret; + } + ret = rte_event_eth_rx_adapter_queue_add(prod, prod, -1, + &queue_conf); + if (ret) { + evt_err("failed to add rx queues to adapter[%d]", prod); + return ret; + } + + ret = rte_eth_dev_start(prod); + if (ret) { + evt_err("Ethernet dev [%d] failed to start." + " Using synthetic producer", prod); + return ret; + } + + ret = rte_event_eth_rx_adapter_start(prod); + if (ret) { + evt_err("Rx adapter[%d] start failed", prod); + return ret; + } + printf("%s: Port[%d] using Rx adapter[%d] started\n", __func__, + prod, prod); + } + + return ret; +} + int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, uint8_t stride, uint8_t nb_queues) { struct test_perf *t = evt_test_priv(test); - uint8_t port, prod; + uint16_t port, prod; int ret = -1; + struct rte_event_port_conf port_conf; + + memset(&port_conf, 0, sizeof(struct rte_event_port_conf)); + rte_event_port_default_conf_get(opt->dev_id, 0, &port_conf); /* port configuration */ const struct rte_event_port_conf wkr_p_conf = { .dequeue_depth = opt->wkr_deq_dep, - .enqueue_depth = 64, - .new_event_threshold = 4096, + .enqueue_depth = port_conf.enqueue_depth, + .new_event_threshold = port_conf.new_event_threshold, }; /* setup one port per worker, linking to all queues */ @@ -271,26 +330,38 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, } /* port for producers, no links */ - const struct rte_event_port_conf prod_conf = { - .dequeue_depth = 8, - .enqueue_depth = 32, - .new_event_threshold = 1200, + struct rte_event_port_conf prod_conf = { + .dequeue_depth = port_conf.dequeue_depth, + .enqueue_depth = port_conf.enqueue_depth, + .new_event_threshold = port_conf.new_event_threshold, }; - prod = 0; - for ( ; port < perf_nb_event_ports(opt); port++) { - struct prod_data *p = &t->prod[port]; - - p->dev_id = opt->dev_id; - p->port_id = port; - p->queue_id = prod * stride; - p->t = t; + if (opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR) { + for ( ; port < perf_nb_event_ports(opt); port++) { + struct prod_data *p = &t->prod[port]; + p->t = t; + } - ret = rte_event_port_setup(opt->dev_id, port, &prod_conf); - if (ret) { - evt_err("failed to setup port %d", port); + ret = perf_event_rx_adapter_setup(opt, stride, prod_conf); + if (ret) return ret; + } else { + prod = 0; + for ( ; port < perf_nb_event_ports(opt); port++) { + struct prod_data *p = &t->prod[port]; + + p->dev_id = opt->dev_id; + p->port_id = port; + p->queue_id = prod * stride; + p->t = t; + + ret = rte_event_port_setup(opt->dev_id, port, + &prod_conf); + if (ret) { + evt_err("failed to setup port %d", port); + return ret; + } + prod++; } - prod++; } return ret; @@ -479,6 +550,7 @@ void perf_ethdev_destroy(struct evt_test *test, struct evt_options *opt) if (opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR) { for (i = 0; i < rte_eth_dev_count(); i++) { + rte_event_eth_rx_adapter_stop(i); rte_eth_dev_stop(i); rte_eth_dev_close(i); } diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index f33365628..95a217495 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index d606878a1..e446c5437 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -184,6 +184,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) int ret; int nb_ports; int nb_queues; + struct rte_event_dev_info dev_info; nb_ports = evt_nr_active_lcores(opt->wlcores); nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 : @@ -193,13 +194,22 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) rte_eth_dev_count() * nb_stages : perf_queue_nb_event_queues(opt); + 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; + } + const struct rte_event_dev_config config = { .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, - .nb_events_limit = 4096, + .nb_events_limit = dev_info.max_num_events, .nb_event_queue_flows = opt->nb_flows, - .nb_event_port_dequeue_depth = 128, - .nb_event_port_enqueue_depth = 128, + .nb_event_port_dequeue_depth = + dev_info.max_event_port_dequeue_depth, + .nb_event_port_enqueue_depth = + dev_info.max_event_port_enqueue_depth, }; ret = rte_event_dev_configure(opt->dev_id, &config); -- 2.14.1