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 704FD41D4F for ; Thu, 23 Feb 2023 10:40:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C83A43158; Thu, 23 Feb 2023 10:40:48 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id D60F643158 for ; Thu, 23 Feb 2023 10:40:46 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso2257333wmp.4 for ; Thu, 23 Feb 2023 01:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=mg6Vzw0IDx2BL2rCPF85phoLfWX58tqlCegR0fxAaPQ=; b=mT1F1LGOQSfnG3hHgHOF/KoMWKzv0/L3bTkt0p0CeKtKNMSwKwGKW8dmdg9cKRflYs 1xZUzNbv53M16hSWdpz2C9EW13ewKi3XOC4j2lsaoP7aTsbf3ZSt/gbBcxC14edWgV0W C+3rHWq+yPk3k2fhUWyToyP709VVIttmcYZSaMOBTZh8tDLvxkuupEqWl3f3/qSW0EXH te6S0LIfXArGzWVu/wMx5XGxJBrqWt4XQOKExgcnd3rSaJzvh9blR1R2W9xOOHATM/3w JNXQERn/OGfnEsFfQajQVSAkECOPxCD1Y6YOLengjIt5zLCvGi3zkry8z6fRgkv2dUJM E5xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=mg6Vzw0IDx2BL2rCPF85phoLfWX58tqlCegR0fxAaPQ=; b=QfxJnOOTWai1mL62aitVkbJZTZXQgQ2uSG89CaswBqrlZ1ZR4ZXGd+KbQZgGX37VyS 9dZ1qxfdlR7Fjl+IUWTfX+CBg7+DtdIROOfjpFNMyjOKe6dEkNFTRwYgc2Q4egyFmDWc cIAlcZVGydD+Zp+Gb/CpWLV8eAREfHeIB01unvbYsAKap34MzN7GkZ593vRcmZ51dEJp XUN1yKxSASEVNc+Fkbyvw3lwWXMa6b1CWSX16bSLu5W/phv6taxlKzdqom8cI974/fvu Fz7FEHIZDdbI7oANdLTm2Z3lji1HW2bcwU0tF7vS4QO+qD24JBlVzhWRXPrkifbmQkeT MFEg== X-Gm-Message-State: AO0yUKUlxDlGqf/7I69jRtGlPmBlUvKh7Nyhbvefi3U6+ffGHPEXQz3i uoKwWzNn8gcHls/eWrhsjMmXoqj2V5CGug== X-Google-Smtp-Source: AK7set/kS4Hc8v8J0J2ZJAfTDYO+T5Gh2+DyIMQX7M6PqNeGcpKExRFyYpd/v7FOSWB+bpXlUoVKdQ== X-Received: by 2002:a05:600c:92a:b0:3dc:55d9:ec8 with SMTP id m42-20020a05600c092a00b003dc55d90ec8mr7963287wmp.41.1677145246492; Thu, 23 Feb 2023 01:40:46 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id p15-20020a1c544f000000b003dc4a47605fsm10720269wmi.8.2023.02.23.01.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:40:46 -0800 (PST) From: luca.boccassi@gmail.com To: Volodymyr Fialko Cc: Stephen Hemminger , dpdk stable Subject: patch 'reorder: invalidate buffer from ready queue in drain' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:37:10 +0000 Message-Id: <20230223093715.3926893-66-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-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 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. 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/59e1f7e8f3143fe3e90d1a1dd359c198230287f8 Thanks. Luca Boccassi --- >From 59e1f7e8f3143fe3e90d1a1dd359c198230287f8 Mon Sep 17 00:00:00 2001 From: Volodymyr Fialko Date: Sat, 7 Jan 2023 16:19:38 +0100 Subject: [PATCH] reorder: invalidate buffer from ready queue in drain [ upstream commit af12092f927d0d230b4dc051529dae88902fba1c ] Set drained buffers from ready queue to NULL, since their ownership returned to user. Otherwise it's possible that both user and library will attempt to free the packet. Fixes: b70b56032bff ("reorder: new library") Signed-off-by: Volodymyr Fialko Acked-by: Stephen Hemminger --- lib/librte_reorder/rte_reorder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c index 9445853b79..a5b9663aa5 100644 --- a/lib/librte_reorder/rte_reorder.c +++ b/lib/librte_reorder/rte_reorder.c @@ -392,6 +392,7 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs, /* Try to fetch requested number of mbufs from ready buffer */ while ((drain_cnt < max_mbufs) && (ready_buf->tail != ready_buf->head)) { mbufs[drain_cnt++] = ready_buf->entries[ready_buf->tail]; + ready_buf->entries[ready_buf->tail] = NULL; ready_buf->tail = (ready_buf->tail + 1) & ready_buf->mask; } -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:30.932780291 +0000 +++ 0066-reorder-invalidate-buffer-from-ready-queue-in-drain.patch 2023-02-23 09:36:28.350172224 +0000 @@ -1 +1 @@ -From af12092f927d0d230b4dc051529dae88902fba1c Mon Sep 17 00:00:00 2001 +From 59e1f7e8f3143fe3e90d1a1dd359c198230287f8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit af12092f927d0d230b4dc051529dae88902fba1c ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/reorder/rte_reorder.c | 1 + + lib/librte_reorder/rte_reorder.c | 1 + @@ -19,5 +20,5 @@ -diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c -index 385ee479da..b38e71f460 100644 ---- a/lib/reorder/rte_reorder.c -+++ b/lib/reorder/rte_reorder.c -@@ -389,6 +389,7 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs, +diff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c +index 9445853b79..a5b9663aa5 100644 +--- a/lib/librte_reorder/rte_reorder.c ++++ b/lib/librte_reorder/rte_reorder.c +@@ -392,6 +392,7 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,