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 C6E15A0543 for ; Tue, 21 Jun 2022 10:10:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59EE842BBE; Tue, 21 Jun 2022 10:10:02 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2071.outbound.protection.outlook.com [40.107.94.71]) by mails.dpdk.org (Postfix) with ESMTP id 08AED42BBE for ; Tue, 21 Jun 2022 10:10:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OdBsvIdMYSsp/4Nb+Yi5jnKyMwC56zeB5qB/sZFtS9Xz49lVy9K5dnhk0BYc5eS7H0FHAAJFIeQmeSN05bMnEcavNiN7i5/jvNH+SutHMCD+F4oOuhaqVrPu34DWmRMlo1ZV1eCx3i8V6FO/Fdah/g3/ybWsvs09QaX/1FUjRYUqZjEtDR3ujWufPL9fdrYuXnO7vzahpdDivA0cIU3iUByJjCB8FNBvseToW8SMUvDz0KMr651tFV9P6RyKY6fe2G0Ftl+dWmLNNMxoqFPCpr/Rjg8KpNJuPcSPu8Z3yYVt4XlJW1Zlp7zKmnLiKM05VTwN4i757gWaL/KM0N5UQA== 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=o6xb4wkxRhOqLLFs9St3Qj+83zu7uPOuexKGhFxs0xc=; b=EwYo6DksESc7L4WtF+JeN+SVzQgBw+8bvsnqMAiHVvh9oA23DeOAx2RGFQm9Yr3CZBCo4lg8gmg1IseoUyVlf6vj7BayvgniFhpIX5yuctmn8DDrqY93dfLsgQBTMbZfKrQR7FHZ86PXoXdmpfAN1a9vLNM4ieS6CIb54Ep08D9AmzyLSxoufCcomYd8PFID0Swzp3zvF7yATh4f2XsmMJ/qNwVKr/YTiLUYAWhhCJq/jZ7DDcPRMb5CaWXqRfVTauO8fMTfMvdGPvTbJfwN3EMDL9tSDLWP9UR+AG84dbyRjAcxW99ku1Vst3tqDBllzszxQBidc8GSTtLPBR1eOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org 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=o6xb4wkxRhOqLLFs9St3Qj+83zu7uPOuexKGhFxs0xc=; b=dFpG9ZI7kNy6xhTYelBi3L5XI3e7kzAJKxwFRIYZ6n3hYo8YwcyqN38IZBfqrCXNm1J18Tza6YqUZAn/vDpV3cwrNWvcGGdhg0vt2BhCoP4kETKtBmgLmQlGcw3KX85Jmrrz3Gu+WJAq1Leja+7d9V97yVlrA8SEZA3ORPOy/GSPqUBYBvOKMPNbHI+hM27XvPX2db/2T8ZIsyXRIKmdbpNqT8+LUnZfs/Jy2elGVkEKLgfSvh4yiKvRp0IgPnh4cqmARKyuc52dhPoYWR83fgZiLn2Ci5T9AG/rH+/cVnJXywGimc0A/Q6o1ZJX4/OZKFWDJ/yH5wPjYYNayZGSbA== Received: from MW4PR04CA0353.namprd04.prod.outlook.com (2603:10b6:303:8a::28) by BL3PR12MB6546.namprd12.prod.outlook.com (2603:10b6:208:38d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22; Tue, 21 Jun 2022 08:09:59 +0000 Received: from CO1NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8a:cafe::8f) by MW4PR04CA0353.outlook.office365.com (2603:10b6:303:8a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16 via Frontend Transport; Tue, 21 Jun 2022 08:09:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT020.mail.protection.outlook.com (10.13.174.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:09:58 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:09:57 +0000 Received: from nvidia.com (10.126.230.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.22; Tue, 21 Jun 2022 01:09:55 -0700 From: Xueming Li To: Dmitry Kozlyuk CC: Tyler Retzlaff , dpdk stable Subject: patch 'ethdev: prohibit polling stopped queue' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:25 +0300 Message-ID: <20220621080301.2315720-80-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed298aa0-4ab2-46b3-11d5-08da535d6f0f X-MS-TrafficTypeDiagnostic: BL3PR12MB6546:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QhB2pvP4F7hcL+0ewvsu2cgYNBWidZkogbhQFhBpEYzk6MsnTCMWG8cd3GmP+5BnLkC4yzzcERsdcQigC69V2EXk0nxwSLyb/5yJA7dGuoEbudqipV/lq2KKy07eZ3TgElBY4ngJnETlsd2xL2yrIvgFsysPdKStZjtSHkTy+4a8CDaCiP+VJxzjKVN/7zK/RNTQ2WuBzoW60ZN2aKB8it917zd3mTC2FO1rfiqveGzCxua0eAzPiwXMyvqTG5aC1g2E8njkHJ29bwvtmfLUwY2NNaf9dg0JQBql3Crfv+sSVwVsLQurAlcfWNKayVDNr3LfmrNE9HUW025lQlMqsKTPBZ1cl88yrZN2ePd1Llc+Utji2yoT0JLbVP8hMGh/MiWLDeXtIm4q5GQmJBedI6vKNBBF0wbJEBoFnm4LDACwH44r+vYpt09aF+Ncwb8aYGJUVloiJ4IEXUKFQlzNdpgrnI1kOfS/LCycriQ1oUQBDYVYEBROBLA/rgcU+nHFddD2xLwpnmyQk8Ta4YYc5t0MJO11zBjnu9i3BZJjy8LUDz+ecYxBk1XIEUEAt6xTr5ptER8v7+LWNzk/xTiNnYsdyafTehISVIyCbHpBYB+zcSSBomMqK4aumydMVkoEoUsNjLK+k4yPNRMyr/79HPnylrWYTJ8So15vPMYfqBmAEix7n5y7a5GadIQAoSutY9qR8V7ER1He1QZkmw+abKMIvVJ/5GLWCrx+0u2Oy2u+loRUj4fkEMMtFzGAAZZYR1BWFZ2z3S9acp9vt29byhEtYeZJwpzqONZmn5zqZiwJLW0N6qqZqUd8aWRSLy29fuiF2TTvaxNmdtiLpyjpxt+0l0upym/fT4QgS1epBIs= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(376002)(396003)(346002)(39860400002)(36840700001)(40470700004)(46966006)(81166007)(82740400003)(1076003)(47076005)(186003)(356005)(83380400001)(16526019)(426003)(336012)(2616005)(4326008)(8936002)(2906002)(6862004)(5660300002)(40480700001)(55016003)(36756003)(7696005)(316002)(82310400005)(54906003)(37006003)(478600001)(70586007)(8676002)(41300700001)(6666004)(70206006)(53546011)(26005)(966005)(6286002)(40460700003)(36860700001)(86362001)(6636002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:09:58.5575 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed298aa0-4ab2-46b3-11d5-08da535d6f0f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6546 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/f6060b16895290b11386d024c2bd72bee18aab56 Thanks. Xueming Li --- >From f6060b16895290b11386d024c2bd72bee18aab56 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Mon, 11 Apr 2022 00:35:50 +0300 Subject: [PATCH] ethdev: prohibit polling stopped queue Cc: Xueming Li [ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ] Whether it is allowed to call Rx/Tx functions for a stopped queue was undocumented. Some PMDs make this behavior a no-op either by explicitly checking the queue state or by the way how their routines are implemented or HW works. No-op behavior may be convenient for application developers. But it also means that pollers of stopped queues would go all the way down to PMD Rx/Tx routines, wasting cycles. Some PMDs would do a check for the queue state on data path, even though it may never be needed for a particular application. Also, use cases for stopping queues or starting them deferred do not logically require polling stopped queues. Use case 1: a secondary that was polling the queue has crashed, the primary is doing a recovery to free all mbufs. By definition the queue to be restarted is not polled. Use case 2: deferred queue start or queue reconfiguration. The polling thread must be synchronized anyway, because queue start and stop are non-atomic. Prohibit calling Rx/Tx functions on stopped queues. Fixes: 0748be2cf9a2 ("ethdev: queue start and stop") Signed-off-by: Dmitry Kozlyuk Acked-by: Tyler Retzlaff --- lib/librte_ethdev/rte_ethdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 7da58d3fd1..dd7eef908d 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -74,7 +74,7 @@ * rte_eth_rx_queue_setup()), it must call rte_eth_dev_stop() first to stop the * device and then do the reconfiguration before calling rte_eth_dev_start() * again. The transmit and receive functions should not be invoked when the - * device is stopped. + * device or the queue is stopped. * * Please note that some configuration is not stored between calls to * rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration will -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:52.829284863 +0800 +++ 0079-ethdev-prohibit-polling-stopped-queue.patch 2022-06-21 15:37:49.134451595 +0800 @@ -1 +1 @@ -From b77d3318d6a3ca266751031ff04520b7ad485529 Mon Sep 17 00:00:00 2001 +From f6060b16895290b11386d024c2bd72bee18aab56 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ] @@ -30 +32,0 @@ -Cc: stable@dpdk.org @@ -35 +37 @@ - lib/ethdev/rte_ethdev.h | 2 +- + lib/librte_ethdev/rte_ethdev.h | 2 +- @@ -38,4 +40,4 @@ -diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h -index 04225bba4d..02df65d923 100644 ---- a/lib/ethdev/rte_ethdev.h -+++ b/lib/ethdev/rte_ethdev.h +diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h +index 7da58d3fd1..dd7eef908d 100644 +--- a/lib/librte_ethdev/rte_ethdev.h ++++ b/lib/librte_ethdev/rte_ethdev.h