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 EDDC2425DC; Mon, 18 Sep 2023 18:54:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9B18402DA; Mon, 18 Sep 2023 18:54:42 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2083.outbound.protection.outlook.com [40.107.94.83]) by mails.dpdk.org (Postfix) with ESMTP id 574134025D for ; Mon, 18 Sep 2023 18:54:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6fQypoYRqmXU9kcLrK2FjtOHsUoyKMnIeE+/7In5qtsy6BnRawq1NXTRfGs+c3keBi4jzZUWqxyrvlFtgnQ3MvagxgqOzbn70jOd1geN7T+FW8lvNQLasp0LhvjmIks/tRDrSwFDm5PRkk2rONbQMJstox0B48Jlc/e4VvIzYPZZi4LsyFPTe4tOUDZbDjuq/g9gWKSln6JKoJ8GPI5BkrHV4GOtrxupZLbyBBGJdnSbh9B1zYmPChheOlXVxCODVOwwfzQl7+jTY7yXSm9bNuPv5d6FuwhqJ9QNKVzg4lstNkvhxKjF6ICdYCArKNkw6oN1PzR3YG5DE/lyQi7bA== 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=Avn0IW/MC5h3v8aFP1KrUT3vNI2VVARU/O6a7R4Sxlk=; b=JykG6ASdtjLBRWei8agGY+VQXnl7ajN29CUWubm6DPSPWLighQcrnzoQd09VDV4rIK3iVBi9Bbn+v5aSyNYKSH9TE/vwZpLGlnh4FaqtevmYdn768FIqmB3y/QT98J6RwCDbq1JJJk0/Vcg+2SVVQ0PICSrszVZx2jKRKoHAMydoWQuaxE2NDtYImfZWm5fUz5Chc4u7JmuSScXwSnWSPHyfpiJF4F4kePYHgGw3sW9VCTk9wJg1bAloECmvPHakoafEE9udwwgUse/8TRzZ7EzDNfPkCI+/9EFTcDzckm1QEW/VEMatx/PieeSy5SGHoSKaA0EGyi6t2aARn0JlUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Avn0IW/MC5h3v8aFP1KrUT3vNI2VVARU/O6a7R4Sxlk=; b=N6m+ffcACmdUGA9N3Q66POCOPsujlaUuHTKIGn77UKcRb0S1yRa+wNyOqw3Zms7USeAL08nCKWGNQC6kx353GZlKvzqvpgH2qGzbQ7MbtPZ6cEH/ssfGnenkusdDRsSI46S/vJMmBIAmXF85dT39THtwDcb1Vp3Xdglw6yZ18Rw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH8PR12MB8606.namprd12.prod.outlook.com (2603:10b6:510:1ce::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Mon, 18 Sep 2023 16:54:37 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6792.026; Mon, 18 Sep 2023 16:54:37 +0000 Message-ID: <6c030892-5e27-4537-9262-c733914d95df@amd.com> Date: Mon, 18 Sep 2023 17:54:30 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/36] fix Rx and Tx queue state Content-Language: en-US To: David Marchand , Jie Hai Cc: dev@dpdk.org, lihuisong@huawei.com, Thomas Monjalon References: <20230908112901.1169869-1-haijie1@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJjb9DJBQkC+3/YAAoJEFRTPtCK Km/6d94P/irGq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rqPW6Ku 3FQ= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0678.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:351::18) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH8PR12MB8606:EE_ X-MS-Office365-Filtering-Correlation-Id: 0608f90b-83d6-4ef7-b3d4-08dbb867f128 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gbn5FACk4bA0kYHDylDVEsZ5zsq5xNi4zzut97UZ1yDyUri7D0Z6ydjOFlB23hI7fjEnMpOWunV37tJdko5XCyX1X7WIAh8y61MYozvV96vx3Ysqgl+9G5R7SssJCAiAlxtH+6wTlMYnMorwuHcCdWNnqLvCwGtmwaxNo8btPRGJ3uO+Sut+BSA/7Lq0pw5qOj4U77Hj2x3pQpzQ4qg/ro5UFiI9tx0gaT7enii9P/HHjCmh+teOmG2jQuNpCBAPKEos6irMyR2w7MhsK492mNbbhKKejq3z4dEA+R1VCA4dQAIDRTqUB34/5jYvZWCXADTl7AqFgFCpwAiRtvIUG5VewYRyOc/Rf67V/0k4W0AYeNUK9vWAJx14V7FNLesSHTt8Z/cJq+OsRXcftFi1eh0lIOCL6WtYBD3KWvh0P89J3cbqD6LqT6U3wcXEUBsLN+8YQEDW6sV8WEtWind/09RhvnOjotFHzuMqEheqcTstxvHjuwM/oV7OiqID624JdnIjhLYDF7m7Mui3fOCGgWweI/JjbI3+1Wk/ekbonXpvy3TGYjuNtj9E7ZkpmNRMGnvaB362nuheyil7F9Ckuo1erMLsp49ZbHdKKLIX/ve0GSt1U8J4Ml79eJ7UIhC4d2TAp2WstJ2fbJArHbkUmA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(366004)(376002)(39860400002)(346002)(186009)(1800799009)(451199024)(83380400001)(6512007)(2616005)(26005)(316002)(41300700001)(110136005)(44832011)(66476007)(66946007)(66556008)(4326008)(8676002)(8936002)(6666004)(5660300002)(53546011)(6486002)(6506007)(2906002)(478600001)(966005)(86362001)(31696002)(36756003)(38100700002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bTN1OGJoVGtQaHh0ZEhML3VUMkpnTmRGZEZXa3BRZEtQQnQ0MytuemlOS0ta?= =?utf-8?B?d2hpdS9jZkFwaDNkUzVRb2k4cjA3Vkx4VXlTU0FBbTY2WGJQamVJNTZnNHBQ?= =?utf-8?B?bm85a1Rlb1luUHZQRnZDcXFCbmtwaWNFVGhxWXpydGFZb3E1Z1MxdFFCVkpS?= =?utf-8?B?UXFOdTFsUC9VaEJoZ2Y3Q1MzRzNqWlpkcXhrNDk3aCtXQ2RGaGZkUzRtRlRJ?= =?utf-8?B?eVUzcVFldjV0SERIQTFlaVZSaitpSEx3U2ZZNWpuM1E1TGd2c2V5WWRMSldK?= =?utf-8?B?WklNaWI5dVRNOWt2VFpwOGZFc0pLRGZLR3pFR3hkRnJJYmsrRWY0VlNSRDc1?= =?utf-8?B?UkdoTWRwT0E2UXJlS3RJaVZEYkkwSXdKY0RsaWxuUUtOdHBTV3dHdmg1cG0r?= =?utf-8?B?VUJaSEk5bVNpNWVlM1V2aGwwVE04Y0d5bFdwOGh3VERQN1REQkNaKzYwOVR6?= =?utf-8?B?QkV0bGI1alVmY0FYdG9yZW16NU1vaHBIN3F2cGoza0wwZCtxaUg0dlZHbGQ2?= =?utf-8?B?TmtvcjdOa1Y3b2wzQXIrWUk2bGFWaXNr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0c0MEo1aGhiOVl1emltYWVibHZrQXllTm90RjRL?= =?utf-8?B?R2tmQVplVDdpNnVKU0lRRGF0U2RJazh1ZG1kZ3lCYS9iaTYvMnp3Tm9TQUdF?= =?utf-8?B?QjZuRjRtM3VIQmZmQm1NSDFveHl0enhsWnRtWlp0TFhDV2thaGU5cnNITjgr?= =?utf-8?B?c0gvRUpxd2NSSnM2NEk2RWN3L2hlc2p4WWxPMVNka1I2WmNlSzlrQTh1WUN2?= =?utf-8?B?VmFETkZ1QXVaK3FQQlI0Y1Y4Umx6NTdoR1FLTnFDbThOck9vQmNWaFZiMkZZ?= =?utf-8?B?K3JFcFl4THFtSzVpOWhNc1J0OHpGMVNkUHpPVWRRRU1pa20rK3lHN1hnbFhh?= =?utf-8?B?dGJiWTJMb1Z4YS82QjBXeHIzTGpnSjNzN1lJTFRmc1lXVW52Tk9aaDVwaSsx?= =?utf-8?B?QkpXZHVyaG9lNE5Bdy9HdFVqNFgvTG54RmdSRU5qSFpBWVZ0NXMzTlhFejNl?= =?utf-8?B?S3BTRnRlcmZzRUJOR1JENUZPb1RocGo3TVRFMllhZ1V1YzNkeHNaZVRqV0F5?= =?utf-8?B?RTJlOU9OMVAzS3g1b2JmT0dzV212M01TZk5XR0QybnlTTGtHM1hjL29XVGlk?= =?utf-8?B?b0U3Z1Y4RFpxcVB6amVlbVBjOXZJS3Q2UTB0TnljVTlyNzYycjVGQ0I2WTJt?= =?utf-8?Q?Lh8NmuoNiL7NEPjFqwUSwzHxy?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0608f90b-83d6-4ef7-b3d4-08dbb867f128 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 16:54:37.2455 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /gJSNui+xtVTIarT9Esqsu/KQUW/jpYbaXcAk4205g3TPVAUa48HUeiNwwTwrJUg X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB8606 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 9/8/2023 12:50 PM, David Marchand wrote: > On Fri, Sep 8, 2023 at 1:32 PM Jie Hai wrote: >> >> The DPDK framework reports the queue state, which is stored in >> dev->data->tx_queue_state and dev->data->rx_queue_state. The >> state is maintained by the driver. Users may determine whether >> a queue participates in packet forwarding based on the state, >> for example, > > The driver is maintaining this state in dev_start / dev_stop and per > queue start/stop handlers. > >> >> [1] 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding" >> [2] 141a520b35f7 ("app/testpmd: fix primary process not polling all queues") >> >> Therefore, the drivers need to modify the queue state in time >> according to the actual situation, especially when dev_start >> and dev_stop are called. see [3] for more information. >> >> [3] https://inbox.dpdk.org/dev/20230721160422.3848154-1-ferruh.yigit@amd.com/ >> >> This patchset also resubmit the patch [2] and makes some fixes on the patch. > > I just had a quick look at some patches and I wonder if a better fix > would be at the ethdev level, rather than fixing all drivers. > > I came here to make the same comment, Jie, I forgot if we discuss this already but, does it work if we update queue state in 'rte_eth_dev_start()' & 'rte_eth_dev_stop()' when 'dev_start' & 'dev_stop' dev_ops succeeds? This solves the case driver forgets to update the queue state.