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 99413431D5 for ; Sun, 22 Oct 2023 16:28:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F3C440689; Sun, 22 Oct 2023 16:28:44 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2076.outbound.protection.outlook.com [40.107.223.76]) by mails.dpdk.org (Postfix) with ESMTP id EC795402E2 for ; Sun, 22 Oct 2023 16:28:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TVvVKSi0xY82AlmKm70/LcdcVAWqtGw9qgGn3pTp0scHX0d715ggDi4NiB/xcUjqIJ89VuYzqTc5QLSDBi/0Qsy08xZdN4UtCWFYzm2N5HtiINzDBv4tt+Zu0r6A0LUMRCYxLDB7l1r6w1LXvrRzWjqKRtsIeHFgtWiGgw+7HXTxBuE1nbicw6wnf+RUop/ve7DNJnh2bGsYH7j4hVJ3FXLojkZ5pFCBrF2z8IjDII9/lFcb/JCBeVXz5mDstfvx3fbaNYB3xEe5WO/iyJRvJPG6eVew0bogQA9wkwGUsmRjbfW/4tESxv+yJ6Je9Gcg2KdK7zZPmJgBaZLb7rCIlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nhaO1/9rQeInqHfFGWzmFPq61rB5cnMJbNFpwbnCgQQ=; b=WU9OeOWFtxFrFUE4SPktkWSKKXnqIeCd5IZhuEOuBU5jKpF4+SHWl7//GFmUq4PD+Co0Uj4jtxBxcHmwEll/BKlLGPPBSip7ez748gAecEYG8Z6V7Vl9u9NNPCjD5TSU1zR9TKDb1hOkXwo3cihjpwoJBVDKiTK4wLrbAssRsYrWjzOMUfWLMMoBFKXv91P1iXrKPLCFa5m9zjCkmQ8LOxFDbA3UBdCgMW5t1H8rUv/J0zULyac4CEsVlQP/xOmZ3ABmZhj3xGZ/pF0cXBWSgsh8N7OHxev0BZa3jsjIH+/1YW8UfTJ+emiI79UioAT1CVVfa0dRgiQGPyKAsC7Dgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nhaO1/9rQeInqHfFGWzmFPq61rB5cnMJbNFpwbnCgQQ=; b=A/3Sl6Vfk1oikWLyrfOlob9Ru9NfLSDmIFGae/CppEDnJqF7/fzXQsxHYZecXx0bLzcFY2sWRniTbHH1HVGpP/Q+UTEz9yiMsTKz7RxBkVfdczvlgaSIWtinvTckflnMnDGIEFNVEPZsdXBffVc8NaQU+4OecFDURPL15NoMrNFDqiNkKth7QKiIREp3CI9mX+9PLqYPt0W/U6dcFdF+Qdo19iG3qB+8cQKskawKSWWz/Dba6aZRK5gompE3x9SNuCbmnN1P7+k2U7k5/X5MkSC1uzjGzyrghZ8GwCa4+WXlyfgGzKiY1220PsdFn7BsTZsoUj0ywI4rdgzz8mTnAQ== Received: from DS7PR05CA0082.namprd05.prod.outlook.com (2603:10b6:8:57::23) by DS0PR12MB7511.namprd12.prod.outlook.com (2603:10b6:8:139::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Sun, 22 Oct 2023 14:28:40 +0000 Received: from DS1PEPF0001708F.namprd03.prod.outlook.com (2603:10b6:8:57:cafe::12) by DS7PR05CA0082.outlook.office365.com (2603:10b6:8:57::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:28:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001708F.mail.protection.outlook.com (10.167.17.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:28:40 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:28:27 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:28:25 -0700 From: Xueming Li To: Harry van Haaren CC: Bruce Richardson , dpdk stable Subject: patch 'event/sw: fix ordering corruption with op release' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:21:31 +0800 Message-ID: <20231022142250.10324-63-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708F:EE_|DS0PR12MB7511:EE_ X-MS-Office365-Filtering-Correlation-Id: 4dfdf01a-4f6c-4e19-5190-08dbd30b2fec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0RuBXSA1qxj5nJsDZzWTJ/F5OcqFceNsfHUGgeorW06HYjTfeLYB22Ci+wZzGLyjiqBK/Uz9h/SzGmO9COlXv16Ic3QTeu8N+K27BeuQ5/XDI9ABaLVYhrgXYLJilecwCeF4SfXnLSRgm9QPd0lU4xOVE+e14HLERXEpfh6qCv2MZV/XnKbXyYymPhaXMrGuYblsWEtm8r22pdG1a4n8mtoNaWNyu42XehmClF454nggblPfmE06Uh1A77YpZGNA7g81lqpk11zCewPCk6YNdVPyjqsSO5xoxIUS1RpDgwGh2O3Ci0iGqv7BNIB8idtFNINS0JEg3G23+JS3xqagf5nPz0/5EMx83WQq3GvsFx6MaX5N6KIoRMjxUldd966qYwAKjWGvXuUCtNtbY+9l539KiboUd1/mS8uApphuCYq19FfxWTn9gYVO+QUmniFOk9+1W2VAeeBJxqRB6gY8ad2NC4QHUe0/EuHsoTYLYpmO5RRC7vthd/sKWWyVxEsBpfaCLDnHzEtAJeHM9CK04qaZBRzTCza4VmrMUSpkOxWd+UupFAzz7+hwhZbogRfwR+5PDrbk3AbvEa+NTrSmb5EiIMdyqOoxK4i1++wFU076Zs+RfjAYlEo0c0OXNjBSzsK+YSTpwsbqLoQpM3fmrzy2ZIlRahK3EYrscaLIl0wA32KffgbwhUB9x9bIEd4vahgZYO3TC52XTOALbvrlNen1XXmQvJz+qyD4r4w72CKJ9juPpGZqpvAlxeLXOZEgYWY5exDtV3mnUdCplscMNjS1NDtVxVOfPl9XmQwilRE= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(346002)(376002)(396003)(136003)(230922051799003)(82310400011)(186009)(451199024)(64100799003)(1800799009)(46966006)(36840700001)(40470700004)(4001150100001)(26005)(2906002)(36860700001)(41300700001)(40460700003)(86362001)(5660300002)(36756003)(8676002)(8936002)(4326008)(2616005)(356005)(478600001)(7696005)(16526019)(6286002)(7636003)(1076003)(82740400003)(54906003)(316002)(6916009)(70206006)(70586007)(83380400001)(966005)(6666004)(53546011)(426003)(336012)(40480700001)(47076005)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:28:40.3612 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4dfdf01a-4f6c-4e19-5190-08dbd30b2fec X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7511 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/15/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1b7fb134d97b1a890af0380d733c0e48e7ae61b4 Thanks. Xueming Li --- >From 1b7fb134d97b1a890af0380d733c0e48e7ae61b4 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Mon, 2 Oct 2023 11:58:35 +0100 Subject: [PATCH] event/sw: fix ordering corruption with op release Cc: Xueming Li [ upstream commit 5078a8f37d82f3b54cf373389b6754e2bafd584f ] This commit changes the logic in the scheduler to always reset reorder-buffer (and QID/FID) entries when writing them. This avoids stale ROB/QID/FID data re-use, which previously caused ordering issues. Before this commit, release events left the history-list in an inconsistent state, and future events with op type of forward could be incorrectly reordered. There was a partial fix previously committed which is now being resolved for all cases in a more general way, hence the two fixlines here. Fixes: 2e516d18dc01 ("event/sw: fix events mis-identified as needing reorder") Fixes: 617995dfc5b2 ("event/sw: add scheduling logic") Suggested-by: Bruce Richardson Signed-off-by: Harry van Haaren Acked-by: Bruce Richardson --- drivers/event/sw/sw_evdev_scheduler.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c index 7de1c39dc0..25f97c4ffb 100644 --- a/drivers/event/sw/sw_evdev_scheduler.c +++ b/drivers/event/sw/sw_evdev_scheduler.c @@ -90,8 +90,10 @@ sw_schedule_atomic_to_cq(struct sw_evdev *sw, struct sw_qid * const qid, sw->cq_ring_space[cq]--; int head = (p->hist_head++ & (SW_PORT_HIST_LIST-1)); - p->hist_list[head].fid = flow_id; - p->hist_list[head].qid = qid_id; + p->hist_list[head] = (struct sw_hist_list_entry) { + .qid = qid_id, + .fid = flow_id, + }; p->stats.tx_pkts++; qid->stats.tx_pkts++; @@ -162,8 +164,10 @@ sw_schedule_parallel_to_cq(struct sw_evdev *sw, struct sw_qid * const qid, qid->stats.tx_pkts++; const int head = (p->hist_head & (SW_PORT_HIST_LIST-1)); - p->hist_list[head].fid = SW_HASH_FLOWID(qe->flow_id); - p->hist_list[head].qid = qid_id; + p->hist_list[head] = (struct sw_hist_list_entry) { + .qid = qid_id, + .fid = SW_HASH_FLOWID(qe->flow_id), + }; if (keep_order) rob_ring_dequeue(qid->reorder_buffer_freelist, @@ -413,7 +417,6 @@ __pull_port_lb(struct sw_evdev *sw, uint32_t port_id, int allow_reorder) struct reorder_buffer_entry *rob_entry = hist_entry->rob_entry; - hist_entry->rob_entry = NULL; /* Although fragmentation not currently * supported by eventdev API, we support it * here. Open: How do we alert the user that -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:36.672379100 +0800 +++ 0062-event-sw-fix-ordering-corruption-with-op-release.patch 2023-10-22 22:17:34.286723700 +0800 @@ -1 +1 @@ -From 5078a8f37d82f3b54cf373389b6754e2bafd584f Mon Sep 17 00:00:00 2001 +From 1b7fb134d97b1a890af0380d733c0e48e7ae61b4 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5078a8f37d82f3b54cf373389b6754e2bafd584f ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index 17953fde0e..a5fdcf301b 100644 +index 7de1c39dc0..25f97c4ffb 100644