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 A5FABA00C4; Wed, 28 Sep 2022 16:12:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93DF24113C; Wed, 28 Sep 2022 16:12:48 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 27E4A410FA for ; Wed, 28 Sep 2022 16:12:47 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id w2so7966856qtv.9 for ; Wed, 28 Sep 2022 07:12:47 -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=8Vs+Ac9Hfz1cPtiNXlM6BIKeA+0XMyn6U5K5uFTzEHU=; b=nwcUVd3gmoWh4ga++XrLc4xjCVahJy6NlzeCpgnm0dRjv91G3+9gYKiat3D+uv9R3t gNB4aOY8mm/ZIUMPWlOna6kuFgQ8HSsLHpb87FLV2TcdpG4HQLMv8WSrbll6CowK8nF9 7fv16K21UixWuEOmRQHw+rl70aQfSUWsg2R990R+nni18P7tx1CI/izOgSuRhrdGy1JN sKs7XOyHHrDiZ4ev8ekrzJtiNmLyYUM7lTjOMZh0vt6VmW+4+NRFdYJnrZgXl/CqL4dr BybUvJRmGl+n+ndp5jzo2goXeW1WQRwoSwm7+98y1TcRuJ4uHpefbJLHtvOUSuRk/+cd 157g== 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=8Vs+Ac9Hfz1cPtiNXlM6BIKeA+0XMyn6U5K5uFTzEHU=; b=bfoEj5Vhi+QeH8z9zC1MHajkYAxOI61QHIQJu0+5slyap7LvxDlYK+uGJj6gTu/eb+ hGFODolSHrGbCNBD7FviH/tnrXJITxQx1jr7Lde7RZsJla8nbZQ/w4d9wvd6woUrTWt4 TtFq14aH7wK3CLyqek3HwhaDMglAmvgRQpaJd03IEf9j6em/BrwpaCtB0ZVOCrtXCe9P THaiWFIzprY15ZAsh9UhHOatufKZklfGJlqylvvbAmBbY77ZGfmJDQKb6iuilQK4ay// f7kzzjeSbAhdzOi4QjNueta/LpCo3MqPhS7ztsIbnAiYMiNA8uyVCQ7mhDvnGQ9HpOJR yQJA== X-Gm-Message-State: ACrzQf2LZ66XqY1TNyMM3KUpeJ9XVSkQ/rYsH0Cy/rPd6JFutaj4plHL 2d8KST1+IL2f11+ZtMao7E82mMawGC8RApsmlWmpcHiUP/4mjA== X-Google-Smtp-Source: AMsMyM6fmAYeSkslXRbT+WHFcfw7lR9xTbzllIHv4X7iL6K4wzspU8CF79AksAnaXw45b61oNsD7wqPlddHwjZ745Z4= X-Received: by 2002:ac8:7d90:0:b0:35b:afd3:20aa with SMTP id c16-20020ac87d90000000b0035bafd320aamr26456338qtd.252.1664374366429; Wed, 28 Sep 2022 07:12:46 -0700 (PDT) MIME-Version: 1.0 References: <20220921162853.739427-1-abdullah.sevincer@intel.com> <20220927150537.1464936-1-abdullah.sevincer@intel.com> In-Reply-To: <20220927150537.1464936-1-abdullah.sevincer@intel.com> From: Jerin Jacob Date: Wed, 28 Sep 2022 19:42:20 +0530 Message-ID: Subject: Re: [PATCH v4] event/dlb2: fix max cq_depth/enq_depth cli override To: Abdullah Sevincer Cc: dev@dpdk.org, jerinj@marvell.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 Tue, Sep 27, 2022 at 8:36 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 dequeuing correct number of > events as set by max_cq_depth. > > Signed-off-by: Abdullah Sevincer Fix below issues [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 grep: warning: stray \ before white space Missing 'Fixes' tag: event/dlb2: fix max cq_depth/enq_depth cli override Invalid patch(es) found - checked 1 patch [for-main]dell[dpdk-next-eventdev] $ > --- > 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 759578378f..dbb8284135 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 >