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 19A1446A9C for ; Mon, 30 Jun 2025 14:26:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11D98402E1; Mon, 30 Jun 2025 14:26:56 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 111A9402E1 for ; Mon, 30 Jun 2025 14:26:52 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3a50956e5d3so3752078f8f.1 for ; Mon, 30 Jun 2025 05:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286412; x=1751891212; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2yrJ7+zNwg2D6vAfFLNchzDXhode7EqZT1q8y5yCAB0=; b=LW3/pnfb2V9aMCo6WaHNmK3ivGIiAkLtNQl9ifzL8JGEsbc8IU+qG41zngnUUw4OmB /lK/f8cStYWAel6jsgtR1zrh/GHLEV8irPCgYvu/lWmHErwdFrCRMkwT/a17q2E6qLmb A5ijNkQvGf8QoUwwpHVqJgkdOVzm1sOUZaWYMdCYVAsoHkJ2GFA6/sfSKLI2QPuvuJyV m+SrU1HpB9+huT4NEzspgayuepWRLFfqxU5cOhApsLnZjzifUHYcYzdg/esrOjusA+RC 0YQlJ27tOujRAAqLguLIvD9kkLwtLeTkCv9D036W3rDgtLQUFW/rUvh0z7qhIcVUiXAr TalQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286412; x=1751891212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2yrJ7+zNwg2D6vAfFLNchzDXhode7EqZT1q8y5yCAB0=; b=RFC9cPkQrJOyOgW9qKrTt+IdetxOyDIGM8g5R98EQTY+mKORmecXSoBg2yOCXBSx4S N9bAdJ2FN4Zj38uKwvYZwwVINvpqgseIgS+GzDmPRnTTVL8+OKPOo8OD0xatrkN6KVYq kygdvXxKrHI6zDn6WbUX9ldyp9Q+PgxmCEYWDU03M5DQlGzapMIsE2S8P6M+gTbUWI+M +38CUaPuedTuuAkRSsKnQt2Qf5MMToOeJEMugt14vhyYQfF55w70YWTe4E++yG1ZuAU6 CydhNizkYPYy1qOSMa+70sH53K61UOg4pGkg1X1Dx6CoJ0sJq74/aeu5kFw1KJs7N+bI 2sWg== X-Forwarded-Encrypted: i=1; AJvYcCVok/ozLk6FixhUu3jsWj+PzMDzwjQaAoEAxBnXF4w6DSTvgH/O0EFDjQAtp69cXgAIz5kgDcY=@dpdk.org X-Gm-Message-State: AOJu0YxPWUgNEp4QWQrESxS1jTxU6VHETn/vEy3Bs4qeJlg9xPFlSQVm MptGJzkTX59NqHYWMaoC0jr9SSIuKJG6k+6GuRElMZ8Y5eXJChfXf8UB X-Gm-Gg: ASbGncuL3To0fgewsuz3UrqgHN6CJMVO3vd6Ddpr8I0e1nAtqT8gibaYlxqdKZomXs/ u8G9FbHNEj+V06gvHueiwI2+2hfGgvsJpHGgMzWOcU0Lg0cp1j6WP1gf0q/1eqKpTUr4F4n0jAJ BhVjG8ai955ToGtQn0jtLOB9fRf2UykW3avtvA7Mmyvo2eVxiL4VkUvJcfNrdR32nQjRkeBICGI 6uL+RbEwFQjQkJ7tEprOEcTEJHKwWxqkTrW8RSpiuHvWIJTjRqBpYH7zNOUzvfGwRZnEV7Q12Eq IhTjasq3o12eI15UKBMaVMlVOWAHs1PHtfmBgUS+Bwg9OtoPPQJHmhLq33CFgLysDtw= X-Google-Smtp-Source: AGHT+IHvaQ+Vd91AcVAEpUyWDyKgXIgGXvntSGJTmtd9eKUGL4SqWqrGzSDS2vUFO8xLOQJRYjdq+w== X-Received: by 2002:a05:6000:645:b0:3a4:d83a:eb4c with SMTP id ffacd0b85a97d-3a91874c19fmr10031648f8f.57.1751286411421; Mon, 30 Jun 2025 05:26:51 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a892e52b9esm10398299f8f.61.2025.06.30.05.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:26:50 -0700 (PDT) From: luca.boccassi@gmail.com To: Pravin Pathak Cc: Tirthendu Sarkar , dpdk stable Subject: patch 'event/dlb2: fix dequeue with CQ depth <= 16' has been queued to stable release 22.11.9 Date: Mon, 30 Jun 2025 13:25:49 +0100 Message-ID: <20250630122556.1133654-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250630122556.1133654-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> <20250630122556.1133654-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/02/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/2501056ccb39f18238a86287dddb8389dfaf1e3a Thanks. Luca Boccassi --- >From 2501056ccb39f18238a86287dddb8389dfaf1e3a Mon Sep 17 00:00:00 2001 From: Pravin Pathak Date: Wed, 18 Jun 2025 23:03:10 -0500 Subject: [PATCH] event/dlb2: fix dequeue with CQ depth <= 16 [ upstream commit 0b92203cdae06dee0626e46e62b9c34450e776d8 ] When application configures a DIR port with CQ depth less than 8, DLB PMD sets port's cq_depth as 8 and token reservation is used to make the effective cq_depth smaller. However, while setting port's cq_depth_mask application configured CQ depth was used resulting in reading incorrect cachelines while dequeuing. Use PMD calculated CQ depth for cq_depth_mask calculation. Fixes: 3a6d0c04e7fb3e ("event/dlb2: add port setup") Signed-off-by: Pravin Pathak Signed-off-by: Tirthendu Sarkar --- drivers/event/dlb2/dlb2.c | 4 ++-- drivers/event/dlb2/pf/dlb2_pf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index d5981afa6a..50b88802c6 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -1887,9 +1887,9 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2, qm_port->cq_idx_unmasked = 0; if (dlb2->poll_mode == DLB2_CQ_POLL_MODE_SPARSE) - qm_port->cq_depth_mask = (cfg.cq_depth * 4) - 1; + qm_port->cq_depth_mask = (qm_port->cq_depth * 4) - 1; else - qm_port->cq_depth_mask = cfg.cq_depth - 1; + qm_port->cq_depth_mask = qm_port->cq_depth - 1; qm_port->gen_bit_shift = __builtin_popcount(qm_port->cq_depth_mask); /* starting value of gen bit - it toggles at wrap time */ diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c index 3d15250e11..e585861254 100644 --- a/drivers/event/dlb2/pf/dlb2_pf.c +++ b/drivers/event/dlb2/pf/dlb2_pf.c @@ -400,7 +400,7 @@ dlb2_pf_dir_port_create(struct dlb2_hw_dev *handle, /* Calculate the port memory required, and round up to the nearest * cache line. */ - alloc_sz = cfg->cq_depth * qe_sz; + alloc_sz = RTE_MAX(cfg->cq_depth, DLB2_MIN_HARDWARE_CQ_DEPTH) * qe_sz; alloc_sz = RTE_CACHE_LINE_ROUNDUP(alloc_sz); port_base = dlb2_alloc_coherent_aligned(&mz, &cq_base, alloc_sz, -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:22.478218049 +0100 +++ 0019-event-dlb2-fix-dequeue-with-CQ-depth-16.patch 2025-06-30 13:21:21.763057717 +0100 @@ -1 +1 @@ -From 0b92203cdae06dee0626e46e62b9c34450e776d8 Mon Sep 17 00:00:00 2001 +From 2501056ccb39f18238a86287dddb8389dfaf1e3a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0b92203cdae06dee0626e46e62b9c34450e776d8 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 08291b10b8..bec1e88074 100644 +index d5981afa6a..50b88802c6 100644 @@ -27 +28 @@ -@@ -1951,9 +1951,9 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2, +@@ -1887,9 +1887,9 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2, @@ -37 +38 @@ - qm_port->gen_bit_shift = rte_popcount32(qm_port->cq_depth_mask); + qm_port->gen_bit_shift = __builtin_popcount(qm_port->cq_depth_mask); @@ -40 +41 @@ -index ac432b81ad..cd2788c035 100644 +index 3d15250e11..e585861254 100644 @@ -43 +44 @@ -@@ -427,7 +427,7 @@ dlb2_pf_dir_port_create(struct dlb2_hw_dev *handle, +@@ -400,7 +400,7 @@ dlb2_pf_dir_port_create(struct dlb2_hw_dev *handle,