From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0084.outbound.protection.outlook.com [104.47.32.84]) by dpdk.org (Postfix) with ESMTP id 950F01B34A for ; Tue, 30 Jan 2018 09:42:48 +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=grrPW/oQiU7x4ol7AUSNC7m3ZeZAkhmjShQM0d6t/Q4=; b=jolzt4/eIbcy1BqSzoWIr28ZGnPt918Nk5JdybVB4mxxJ0XIJ5CtAum4qJQf8/2tSlcH3H+19GGQCenPikIeWanBJOIHukl8RhsKvqqP3eVUbYd4PnTD6uj9QZdXZ09sTGfQBREUNLwFFh6zzjfG49NiRXPDW2SAP/VN6xipVpo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 08:42:45 +0000 Date: Tue, 30 Jan 2018 14:12:01 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: harry.van.haaren@intel.com, dev@dpdk.org Message-ID: <20180130084200.GA28735@jerin> References: <20180124093033.20122-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180124093033.20122-1-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0071.INDPRD01.PROD.OUTLOOK.COM (10.174.208.139) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c280945a-81d5-450b-7805-08d567bd6fef X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:C+sBJYR1FOZaxqatSB4QbUwfgU4iCJusDkfz35phiA9iGeKrJQDBDtIGw5XzZ/5+hpjoabXesVjHbjQdRR21/3lOyD8ShSHgmcgmXHbST5iOh5H8wLbmrCIyqJpIfs2ZmS/h2YNc5pt3spsnHWvHgPcgng8/vvfTDXTVh3ZLu59hnrL34DqT1ShNj7atmeZwYMKEoajS1z0UglrVl6qyDju1yhonp8ZVcJrmLczmQdxRA1v1bXtEhTENSDvMHYVD; 25:AYAdl8gPUEu4NRAACszs1qKuWJPfcrT677KNwY01H6s6dQNRHhw+NIihdSwV20DDWQ5EdfqN+SqRvd8osP7zZDW7FdWdvNZ6xFWtBZ+2je7rjT3+jRtlxBge3W0AAE3cs/y4Vtz74RB0i37FxwWqgm3hvhcjLEQkujMW3XFJa1kfmBQhg1KP6kv01Rd1aNrlcN2WVr8Q1rA8RVFm9RAi7XWwymucpyll+56zxYzvtgd2WtN3MZwlh3HDi0JlTsAsRnOsEXfhLydUljEM9HeSlTXsbShvE3/Jk2/g/jkJMZ90YP2Knve06mqWYjbqYiyFaeNfd/2PXcBR8YoUGLrcTQ==; 31:8yCnUqLFE5lJ9YCmKccfv4OeAc7g9djzKCM64IC1BBDcPLc5NsQyAI6JoqGyCvwR2tF8FJPQbVywQ067k4SxUJ0JAiaiUoV/SvWSw7jK8euOMvNd4XrhzGbWTlx5y0c9SIJBL9AGTw7INutR3jRsBBzs0dcPaNa7OEIpoGITgWYWAVjnoS0FjpCaR0Q+PWqFTaqTldjOwAysZ7k2tSQAvYH6HhoPEJYw+2XlPW1w6AQ= X-MS-TrafficTypeDiagnostic: CO2PR07MB2520: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 20:Aqkh2Yr9b6wcB8wSESvwEvmCbX5bWn91eogDcHfnyrsh3ZINSsrZX2IF3HR0bnKrhQalGnbJx9tnr5BGaduCFSUAFYnVqSMOmMmhtdbBi7An8BjSlSsSOnp7iaeFygiIXzvtWeuw9ADS2o+LoNXnIiuYgadaBWs4rSQarTX1CYl6/ZH9ffa3K8EaXhd6DZmn8CrQjwLACZ7ud4cLmXNrQpImBPyd47cJAiCeJdPnvqk+TKDMrbK9w39SLBGwg9J+W7mzaJ85RPHPm+r/JHm8xNtyc3hqgHQRedW6GX6lOvOIGfTWoMHNwUvMt4JGnQkLUaxfuwddDaK0Ghl2I/yRWgSAMniWm69RedDposwd+e1XbwmxrGpux4GiwYombHebMEWMY2uwKm32iyBUThix0ocRKxamdeOkXzOGgEkiGAad/QnRMfg8SbJwXBQnOyM2wJBTJS/R6GjBjVR/tCa4zc6rCkoGxKaX71muaG1JQF6eKpzmVz9FNFaoOdR7r1J65myVmnCdXH5fvvMwp27AWItMMTo94Cg+pgHYNhO9QTlOAjSa6wF0V8BZ1gEAdgtTtyikKZJY1GsyMJZh4CdkJVqY9tqFsN5ucXBs6wMo2h4=; 4:b/NFNeBwEAXvzjgXyNepoTnA1NwwlimAjrFXcbYByIT3XRhs7U8aQ7ekANTXn29Hjdu+OCJvN8w6KBMHwJZNztzAb6f2uCbu8l1KZCRlIjLBoMqzEzW3ahGAAC5Ri9qvV1UzGKiWLsMMsLanWh/MBYjX2b9ClZHxhfcT7ZNUO6zda/kAdv9hhpqsKpW1xEj/UzUcTJ32n01s1ugKG7LygfsRh3RrLvAB4wJtCQeY5pONjAk+vn1Ujhp5b9eb94qO2yRtJEDdpKuDoWNTTnxUhKl3g7iPeL410nZQhakIrE9gpUaX4PaZst/2W24h6jVx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(944501161)(3002001)(93006095)(10201501046)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2520; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39380400002)(396003)(346002)(376002)(366004)(39860400002)(13464003)(189003)(199004)(2906002)(97736004)(66066001)(5009440100003)(23726003)(3846002)(50466002)(81156014)(42882006)(6116002)(1076002)(25786009)(81166006)(2950100002)(6636002)(76176011)(26005)(6666003)(5660300001)(386003)(33896004)(33656002)(8936002)(52116002)(8676002)(6496006)(575784001)(53936002)(478600001)(16526019)(47776003)(305945005)(9686003)(68736007)(72206003)(316002)(6246003)(16586007)(55016002)(4326008)(7736002)(58126008)(106356001)(105586002)(33716001)(229853002)(83506002)(6862004)(18370500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CO2PR07MB2520; 23:hmLNBBgPsMeKDkiNOp+rnH8y+o+FjLFp8q+szEWun?= =?us-ascii?Q?gYz85Fw2C4ELCaHP1yYLyydxGgWbbIyPS9FcmcaB3LvVNw1HRMAGhXhUcDIG?= =?us-ascii?Q?FpKnweKAGR01zMwuG/ON3LXzgGW++J9cVIYb1igZuXOw1VdexXPsAYPWasp/?= =?us-ascii?Q?jDbpiKwJztUz3kEv62t4ERGECoXPaeAE+B9Mvwegp89tzYwDKfhhd6uz9aj0?= =?us-ascii?Q?g++pTSAkzS7eV7ZLEiMuPDgblaDE821MrljcmvbNbs/WTyOjRN915X4MY+K9?= =?us-ascii?Q?Lvcx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AHDJII6+myKyKK6iS6uJrGzBhSE4UtoCehE+zeqyJ1rJWOH7uXO2dnNoBdrLRoOuKosdm7BPKt6dMLM4aRxbdeuxe6tml4aXrAy73Wy9EKTUG+IalqUpvsATrMEKgmjZHKp6q8OJOpIaLkVfsDALUFEcUP1KIDdxu/C/emZlVAz7uldWCF4WJF6Ox2tbARnS1V7K/Wglq5J4GKMvGUz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 08:42:45.3946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c280945a-81d5-450b-7805-08d567bd6fef X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 Subject: Re: [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: Tue, 30 Jan 2018 08:42:49 -0000 -----Original Message----- > Date: Wed, 24 Jan 2018 15:00:33 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH] app/eventdev: fix port dequeue depth > configuration > X-Mailer: git-send-email 2.14.1 > > 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); I think, it is better to pass port_conf as pointer. With that change: Acked-by: Jerin Jacob