From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01D56A00C2; Tue, 27 Sep 2022 13:12:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A84A341133; Tue, 27 Sep 2022 13:12:39 +0200 (CEST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mails.dpdk.org (Postfix) with ESMTP id 6473340694 for ; Tue, 27 Sep 2022 13:12:38 +0200 (CEST) Received: by mail-qk1-f172.google.com with SMTP id d17so5747274qko.13 for ; Tue, 27 Sep 2022 04:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=SDWPUrSoPLehcvQg6RFEX0igkap+cvJwoONDnrpIhAc=; b=BnZjA4E1KzX3TonfiKuvIaJlNqkmCi7L5Yf7o0JGQfXqOTBR5veiqV9h/E5rANG3bP 6oOzfXhbCd1Dl3jX7KO5KelvB1BvPwMUHkS+Q+AMZ3EE8CnlpQrMbWgZRRXlmx7390Oh 59gOPHDCD4S9v4MzfvN+2KnGoMvIQCChk/RF/pV1Jw+YwRXE5W6l3PS6EzyS/8WIMxKU ZxYkwMfZ2OBU6U6UgH9Z6J4Okx/c7eDb95gs3kc6lZCTL5pFE4y1BmnTknO9RUnZNVRL 1WBwSkCGHfV/2S2hbZB1ZuMYy07XXt2LzfJlJbpJT3VozpMuqo2J/Akoz8V8+TZmCqPb P4QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=SDWPUrSoPLehcvQg6RFEX0igkap+cvJwoONDnrpIhAc=; b=IE7InvscxIBjurLPrFSolt8fdL/2k9lqMBHBGI004c1+xxHv+2HVH83dfa0XnlR/Yw 043fUbeNTdcG1gzpsLcYxTWVMV+uuWi5SuDg2S9iROFMOH44cDHCaV5cPVa6juFAQPrJ Qo8mQqla0qTeYwbjCL4qSE2bGnABS9RXtAUqk/Q76nlW8UyC5SkD2dcEwFmGYKRNf4hZ ZOQ0LDKFQJYhcN/1b3PgSUu+/PvAjrDWUoDj8y28h/Fj2PxO7HWhVzXeJi7valzaMtqZ ci9QIgXYorJ2wJHU2d0gTESMYzdF8XQkHMdCy6NiIfhFZOZhNIYco4tyWVYMwyL/ncCl v9kA== X-Gm-Message-State: ACrzQf2uQ5dscOV/l/xm8KGBr235Zq+OlztGWi5bXWUzAIAd8FqRAI6W rq316qZZp333nWdSXIE3TOEHgXGeKNwNbRn2q6U= X-Google-Smtp-Source: AMsMyM6r7+AGY+g6Jg5nQkH29snjbUPclKqauThHh76igT1ofa6TqbUJPrp7lN9+muooqe9GQq1NnnKsoge5B2nklSI= X-Received: by 2002:a05:620a:9d0:b0:6ce:1aac:8642 with SMTP id y16-20020a05620a09d000b006ce1aac8642mr17402299qky.305.1664277157682; Tue, 27 Sep 2022 04:12:37 -0700 (PDT) MIME-Version: 1.0 References: <20220921161911.737899-1-abdullah.sevincer@intel.com> <20220921162853.739427-1-abdullah.sevincer@intel.com> In-Reply-To: <20220921162853.739427-1-abdullah.sevincer@intel.com> From: Jerin Jacob Date: Tue, 27 Sep 2022 16:42:11 +0530 Message-ID: Subject: Re: [PATCH v3] event/dlb2: fix max cq_depth/enq_depth cli override To: Abdullah Sevincer Cc: dev@dpdk.org, jerinj@marvell.com, rashmi.shetty@intel.com, pravin.pathak@intel.com, mike.ximing.chen@intel.com, timothy.mcdaniel@intel.com, shivani.doneria@intel.com, tirthendu.sarkar@intel.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Sep 21, 2022 at 9:59 PM Abdullah Sevincer wrote: > > This patch addresses an issue of enqueuing more than > max_enq_depth and not able to dequeuing events equal > to max_cq_depth in a single call of rte_event_enqueue_burst > and rte_event_dequeue_burst. > > Apply fix for restricting enqueue of events to max_enq_depth > so that in a single rte_event_enqueue_burst() call at most > max_enq_depth events are enqueued. > > Also set per port and domain history list sizes based on > cq_depth. This results in dequeing correct number of > events as set by max_cq_depth. > > Signed-off-by: Abdullah Sevincer Please fix the following [for-main]dell[dpdk-next-eventdev] $ ./devtools/checkpatches.sh -n 1 ### event/dlb2: fix max cq_depth/enq_depth cli override WARNING:TYPO_SPELLING: 'dequeing' may be misspelled - perhaps 'dequeuing'? #16: cq_depth. This results in dequeing correct number of ^^^^^^^^ total: 0 errors, 1 warnings, 33 lines checked 0/1 valid patch [for-main]dell[dpdk-next-eventdev] $ ./devtools/check-git-log.sh -n 1 Wrong headline format: event/dlb2: fix max cq_depth/enq_depth cli override Missing 'Fixes' tag: event/dlb2: fix max cq_depth/enq_depth cli override Invalid patch(es) found - checked 1 patch total: 0 errors, 1 warnings, 33 lines checked > --- > drivers/event/dlb2/dlb2.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c > index 5a443acff8..e8c21c41fd 100644 > --- a/drivers/event/dlb2/dlb2.c > +++ b/drivers/event/dlb2/dlb2.c > @@ -813,7 +813,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, > cfg->num_ldb_queues; > > cfg->num_hist_list_entries = resources_asked->num_ldb_ports * > - DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; > + evdev_dlb2_default_info.max_event_port_dequeue_depth; > > if (device_version == DLB2_HW_V2_5) { > DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d\n", > @@ -1538,7 +1538,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, > cfg.cq_depth = rte_align32pow2(dequeue_depth); > cfg.cq_depth_threshold = 1; > > - cfg.cq_history_list_size = DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; > + cfg.cq_history_list_size = cfg.cq_depth; > > cfg.cos_id = ev_port->cos_id; > cfg.cos_strict = 0;/* best effots */ > @@ -2966,6 +2966,7 @@ __dlb2_event_enqueue_burst(void *event_port, > struct dlb2_port *qm_port = &ev_port->qm_port; > struct process_local_port_data *port_data; > int retries = ev_port->enq_retries; > + int num_tx; > int i; > > RTE_ASSERT(ev_port->enq_configured); > @@ -2974,8 +2975,8 @@ __dlb2_event_enqueue_burst(void *event_port, > i = 0; > > port_data = &dlb2_port[qm_port->id][PORT_TYPE(qm_port)]; > - > - while (i < num) { > + num_tx = RTE_MIN(num, ev_port->conf.enqueue_depth); > + while (i < num_tx) { > uint8_t sched_types[DLB2_NUM_QES_PER_CACHE_LINE]; > uint8_t queue_ids[DLB2_NUM_QES_PER_CACHE_LINE]; > int pop_offs = 0; > -- > 2.25.1 >