From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0083.outbound.protection.outlook.com [104.47.33.83]) by dpdk.org (Postfix) with ESMTP id 035CB1200A for ; Wed, 24 Jan 2018 10:30:54 +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=AOvRLKBFaj1oWBUh4+ht5Bk9BEpg+rsdBS2jkmqymIw=; b=Jk37J9HmAO8W+qLmCkK9u8xl5fdtGRZZuOFqjL6jtDfyHakvnK3U1ze2IMYHB/r+tfBJeOyKVQDZPYwJWi2nXX1CHRY2X/i3+LwMRI1F3/pmRG2tXpB1ioe3JlKyCeBjsp724DXlUakEmAcx/AqElr7u6sRRnMBWf+wmX7zd5AQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Wed, 24 Jan 2018 09:30:50 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 24 Jan 2018 15:00:33 +0530 Message-Id: <20180124093033.20122-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: CY1PR07CA0028.namprd07.prod.outlook.com (10.166.202.38) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b77c34b4-bfe1-4ce0-8564-08d5630d293d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:CDlKJBdNSkgDi5+Gv38xr8QS5ggic76GSZG79Kn4r+Trq4XcLcB5sdUvJqnU/bvPmptsiivMB8djMrcKgUihrke1uitwapF7fi3AUKb6thKp0WSGeP/TU9X1rfObzlaQcGzsYKLWerlEhj1iQa2ZLpq/Xq9QICUAvz12stsNhjzYyOOPoAtsnNFG1fkAanSaDGtBWy71ybte0TKCBk7j+Pd8EedWZaWC4bUenXNULyVD9OqKHukQTu2FkbPFWknX; 25:4cPOJAbyZpC32X5zzi2PS9v9FZrx8kSKFvSvXeutOp43G8tx75XeuXGtLqAaIGZKoW31b/dPS+Ftf3QNvksS/U5Kq/+nL8gQ/UababZdQ4kfeoQ61ZmWWbHn2EuOm296Ad8i9tvU9NacxybLsAKk+8aeewCsa7PuRmcfqVR+1VmuauoOzklq2jYFx4U8PJLH8aq+D02OKXAHL70kOB9J2bP3FTtZQExsrdaQ7NQ0AIyz3VIAiYlB05DO0bCcBVbKDbuNTj5JfVuPemYyYIUOt180xteqxa/0RS/WDPrRbZcnfDO9+E7RB52t9xYWstoRG1Vh4CkBJM0VWQc0/ONK1g==; 31:dfdYVs+J252AMUeepaJFse6usrfVoDr/K0/tLS5qHPTyrpJr3tEjkI4SfcDLW+4ZUeqlyxGUWHRZHbRvr6/hckxLTH2W/DksiYfk6Fa1et1M6UMj4j+rxJnBu/YuzKv1DtFG6RKzIIOZalRjcxVs3GgAgPyZbQYu5UtOg5+GXUjyyXunAQBeit0gxvBHERNe8u0G65QBrbFXkggooO61HbJRFg5tZKN4iWyzHBdXUps= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:3EiBHYXMIXYQC4u0QyQAi1uj0E/W1NqnjoH0YhFh8cFhsFpGq5Wz/ZiF0VFe0AZ0pA6R4aPSF9Pp7v0FvkYSBCI0nKWou6HMiNEjBJGkg6NH1FtSNs3fl/TG+XOEZA5Pj5/2y9M9umuMPnKe4lNiRfNXdjAg6wHbnSVkd/b7ESwnbdnghpzzVgC8dfG8znmoIMFni7ikufsGTOn1I3rdz4u7Oxq2WxcJY+5nvXydlGcCwvPJlfpIz1tpW7LN72aSCsES/LRRuld4XOVBhV+puDEu45xp5yI6lRVH9AxfRymLSh9yLPYX0tZOreuUgDpTztJpG4Q4qRkR21GugiJqzwWM9HWOrQ4XpSEYR8kWfnVX4zOwn//kXU8ZyzkPqmSNRZpDl11oVBHUJOD10VTpp48A2W8Pb3MonK6xe+aQAdjT6oY+4tsK6783so/WjwvZljkLF1eh8RUUhHP4UxGUvbqeKzkV9XKGxEuwT7CPIHiofbLg5C6Rq/10Ica6kAAJiq6vMXqfZ9GbtFYaVwoGEjfyJCHKdtu5Lqsm2muEZNezQtIbRnT8S3hZfmStU72Pe8RpN74c2WEpZZJD7VchTJb5envDPLin7Ef5b4TY0GQ=; 4:Xhrfs2iWPA8q9Ql9HxrTYoy8g8Ch++4kD0Qm1YKN3STWP1Xms5FPJfHtd9RzfEQmkM/3de4CwGsxQ5gw06C1gRgbua54FVX6iJxpTNDxibyAogloD3zTOxJj5IsMYLQ0wCaXfeRLRqrcvYMa/7SDLRcabj/nKSj5UwrfHIJb4EtIBtcd6Njl5XTTDwIKNn7Y0L/PwyKfDvSFK37VRAWsWgZDdJh9T72icWMTIiAvlHUqYFfW5+eTpGHVqzwVPkqJCFNeQo2Aj3nTp68YL414VA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231023)(2400081)(944501161)(10201501046)(93006095)(3002001)(6041288)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB3464; X-Forefront-PRVS: 056297E276 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39380400002)(346002)(376002)(39860400002)(199004)(189003)(107886003)(5009440100003)(68736007)(81156014)(81166006)(8936002)(42882006)(8676002)(478600001)(48376002)(50466002)(25786009)(50226002)(575784001)(72206003)(2906002)(26005)(69596002)(4326008)(51416003)(52116002)(6486002)(53936002)(6512007)(16526018)(386003)(6506007)(316002)(6666003)(7736002)(305945005)(3846002)(1076002)(6116002)(47776003)(36756003)(66066001)(53416004)(105586002)(5660300001)(97736004)(16586007)(106356001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; 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; CY4PR07MB3464; 23:s2T5d5t4xAgZtO2kkmWiZRV2RlyzlXlQqp164/7JG?= =?us-ascii?Q?sBiVuEzylsTMnEu9nBrqA7E8iXqaWLbuQkyk1SvOCx66mFYtlexqyeFIKsge?= =?us-ascii?Q?pWK0m7L942UDqfl+/rmj+VXIQeFrxnCKKPFpT3O0IYcqyTktIHl8WEbOlxly?= =?us-ascii?Q?mmIDEZA5z4JKpfFxiGr2qxH/EC6e5dxOTbvaqz93j89ZLEDRQk+/VXKLLBw8?= =?us-ascii?Q?S+c1P1B/cYD/2E4Au+RfwoYD5j4UPXeuh1Ol7jKBrPQgCCEFNWtfRJHN80Ek?= =?us-ascii?Q?eJaYra/UaXepZKscbsoLGUDznrOmvgwFB/X3f3RT73mccgkK4IYFO3byOdL3?= =?us-ascii?Q?xfNjjEFAT7T98ePS7DHlfPHseufsVycEkte97ccrisq404ikw0zixhOOV6Xo?= =?us-ascii?Q?FZZP3DQvCljMPe6/dmIxy8X3Jk7bgVcep8lveWodJOIjdG6k/MPWP7JFmG0E?= =?us-ascii?Q?BEayfj+k60Eev/cuQWpm+NbHVSzRgND1lL35Jp6U/0wG97evoDqyscF4hTXk?= =?us-ascii?Q?HINjPjm9MJpyAX8UaCjiO70R/uKTtk482AVJVwDx7Ow8OwgmD6Eo6nDj3WfU?= =?us-ascii?Q?VOtYA6c6eRrdUXyyQXlKZK+QHkDcKUo5330l36T0aAq9iv/a8Rvy2pwRCYSP?= =?us-ascii?Q?e9Ka0erUkbGb5p3aqGDcOrJlJc02m21HT7MrK2tgDtEVeB+b8uCqsNURjAlH?= =?us-ascii?Q?WsD5NRdhp3MPpxB/2h+9QJO9HwPnNGkANgBUcYkmCdeRkLfF2M1euuo6Vac8?= =?us-ascii?Q?nQhRBP1W3flgzlXdx3X2LGmVmIcJvQADIdjJzUbMjylS9zp8tNyj3t8J4T9k?= =?us-ascii?Q?ypGJmwiwyYn3yxONu5lfpVl7KEolsShEPg8brx8/zGKLW9o4pxV/jFma1DiL?= =?us-ascii?Q?Q4ApD6Vtk/yDmgorra+YTAAC/U9ilxr8Imrq/8rwm6mw1ASOV/sG55FjL823?= =?us-ascii?Q?b6vkntMaI8AcEkuQG2CIp1o0EMzgUnPVhJuzw+9TC0Feb7GFOguIO33aqb56?= =?us-ascii?Q?OSqixkk1cu2jcbXXUhV8Lii36AMzQP1TZXhISr/adHQlMwqXuMa1KjORHm6r?= =?us-ascii?Q?Zcz/sTj5mzoZLpRkl36liT/4xFhz/G++zYKQZ3jkzfz0Qrb1dhH3QNw5scg3?= =?us-ascii?Q?1+SownPhvNGDV+xN5BBNQRH5OFNt8qLCVkJxAyEulHxjqArd2SLL2JvEL03S?= =?us-ascii?Q?U9WzATIe4IwcLS07mHB/5BqqQo8MmSI04sT?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 6:344aiGLzMJM+bNiiMf8zBDG8PxSCR2uLKy7F/GJJk+ianmut0QtnfPpj4tWKTyDiWqeofCAMOEypPD/dxA7VBIp1U9TRDSPPI/4OzUHc4D2TvwydptYVu4QtacdQvAeBadFLfCl73xlaWitadMWIqXSn/yWrC0CEKJGqaYGFnZgYnpW/KavNZKrM5e415DIdc5oCEEFqIr2UD8VZg8vyGeA3yvdRipv4AjHM23rXNk3+yN/dopT8XBadQzEtDcuIZExX/qYAyqKriLsitdqT9HsaU3BJMlnzo2BC08anhpUrh5aQgsRWpD6NCvb+gLyY3z512tgWfmwb0bRSLTbl95eunrnPtFZaEfWgRJm1vm0=; 5:CNbi0waIyiOsXMJB4/w3UYCu3jKZoEkLuIE+JCm+Wq6B2CDItslLyPBMPqGcOUbVwr73C8JUz88J3yFizJG5yWyKxN/VfJwADea9OAalcrUTOCMbNWC3pEKFqO2MQxHPebOyneGrsOU7CgOd0mIal0aR9RjUxdtFj1B2XLCbGIg=; 24:Aegdos4nH3nr3TZ6bDuOcVjSUsztysW7w7ZLYze3a7tR5QDChAEli8Y77IhHEjQkl0qAccB2NWdnYdwngxM+ad9xO62+EVIZNsDpgW7+woE=; 7:nY5h7FPNSD1yI9+FRdaCt3hxwM6Stb3qgHDDhuHFx3y4mewx5IQGc2tm6FwctXPJaVvftk455lduq+b6U3oCCqPtxVAIwRE4GsKCzQ/MQGIbowK19rMS8ItrwNSBRkKsbF88qm1jHTIRz1vIDXyIaxhFICMsizULWzSf/77SndAKbsLzWLqNcVGJeEIMuNlZ+J+zE3uoL1DEH/HEc/gR6a4wNMWXPcNGLlBP007uY1yC/l+1RpYcTPrM48ICOKFj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2018 09:30:50.6196 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b77c34b4-bfe1-4ce0-8564-08d5630d293d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH] app/eventdev: fix port dequeue depth configuration 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: Wed, 24 Jan 2018 09:30:55 -0000 The port dequeue depth value has to be compared against the maximum allowed dequeue depth reported by the event drivers. Fixes: 3617aae53f92 ("app/eventdev: add event Rx adapter setup") Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_perf_atq.c | 13 ++++++++++++- app/test-eventdev/test_perf_common.c | 25 +++++-------------------- app/test-eventdev/test_perf_common.h | 3 ++- app/test-eventdev/test_perf_queue.c | 12 +++++++++++- app/test-eventdev/test_pipeline_atq.c | 3 +++ app/test-eventdev/test_pipeline_queue.c | 3 +++ 6 files changed, 36 insertions(+), 23 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index d07a05425..b36b22a77 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -207,7 +207,18 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } - ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, nb_queues); + 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 p_conf = { + .dequeue_depth = opt->wkr_deq_dep, + .enqueue_depth = dev_info.max_event_port_dequeue_depth, + .new_event_threshold = dev_info.max_num_events, + }; + + ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, nb_queues, + &p_conf); if (ret) return ret; diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index e279d81a5..59fa0a49e 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -285,22 +285,12 @@ perf_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, - uint8_t stride, uint8_t nb_queues) + uint8_t stride, uint8_t nb_queues, + const struct rte_event_port_conf *port_conf) { struct test_perf *t = evt_test_priv(test); 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 = port_conf.enqueue_depth, - .new_event_threshold = port_conf.new_event_threshold, - }; /* setup one port per worker, linking to all queues */ for (port = 0; port < evt_nr_active_lcores(opt->wlcores); @@ -313,7 +303,7 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, w->processed_pkts = 0; w->latency = 0; - ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf); + ret = rte_event_port_setup(opt->dev_id, port, port_conf); if (ret) { evt_err("failed to setup port %d", port); return ret; @@ -327,18 +317,13 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, } /* port for producers, no links */ - 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, - }; 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 = perf_event_rx_adapter_setup(opt, stride, prod_conf); + ret = perf_event_rx_adapter_setup(opt, stride, *port_conf); if (ret) return ret; } else { @@ -352,7 +337,7 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, p->t = t; ret = rte_event_port_setup(opt->dev_id, port, - &prod_conf); + port_conf); if (ret) { evt_err("failed to setup port %d", port); return ret; diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index f8d516ce4..9ad99733b 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -133,7 +133,8 @@ int perf_test_setup(struct evt_test *test, struct evt_options *opt); int perf_ethdev_setup(struct evt_test *test, struct evt_options *opt); int perf_mempool_setup(struct evt_test *test, struct evt_options *opt); int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, - uint8_t stride, uint8_t nb_queues); + uint8_t stride, uint8_t nb_queues, + const struct rte_event_port_conf *port_conf); int perf_event_dev_service_setup(uint8_t dev_id); int perf_launch_lcores(struct evt_test *test, struct evt_options *opt, int (*worker)(void *)); diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index d5b890876..db8f2f3e5 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -219,8 +219,18 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + 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 p_conf = { + .dequeue_depth = opt->wkr_deq_dep, + .enqueue_depth = dev_info.max_event_port_dequeue_depth, + .new_event_threshold = dev_info.max_num_events, + }; + ret = perf_event_dev_port_setup(test, opt, nb_stages /* stride */, - nb_queues); + nb_queues, &p_conf); if (ret) return ret; diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c index 36abbddda..dd7189776 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -378,6 +378,9 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + if (opt->wkr_deq_dep > info.max_event_port_dequeue_depth) + opt->wkr_deq_dep = info.max_event_port_dequeue_depth; + /* port configuration */ const struct rte_event_port_conf p_conf = { .dequeue_depth = opt->wkr_deq_dep, diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 835fe0782..02fc27cf8 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -397,6 +397,9 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + if (opt->wkr_deq_dep > info.max_event_port_dequeue_depth) + opt->wkr_deq_dep = info.max_event_port_dequeue_depth; + /* port configuration */ const struct rte_event_port_conf p_conf = { .dequeue_depth = opt->wkr_deq_dep, -- 2.16.0