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 F357642C40; Tue, 6 Jun 2023 18:27:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8120B4067B; Tue, 6 Jun 2023 18:27:03 +0200 (CEST) Received: from outbound.mail.protection.outlook.com (mail-bn1nam02on2047.outbound.protection.outlook.com [40.107.212.47]) by mails.dpdk.org (Postfix) with ESMTP id 413A540223 for ; Tue, 6 Jun 2023 18:27:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H5bZ+s/Fj1Sn9wrIPXsILNWqkVh8HVx81G5mleTkzjZU9mwzRxMF/pooeEFndeT29Abd+MrEYyWXKfiSY7HxLSZUvUXsE+ykl7lchNf2jwinHP8RLZlR7QtFVyarzH+k6KcI/IVNwg048BGFAHgYbb9Xqf4BjWx1G8+Di7Nry9MOIKhN5jx80014lfRUavPAu9P4cwb7cfxrzk84AaKBPhilI3dBoHkAzpaq9G/AQ6ZMCWyiNMYkMdoNjAlZjRZQjHd0Z9GRmdOWArlxHMInyORxe2OANrlghDHqP+R3JZJAh1nixxtb50XuqpTJ0rNGOyc7FVczBDIr8aQe7khR3A== 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=CCklxLVz/ZD2KTMuz0CdJDy9wAqVh4MfTqvAkGDp+LA=; b=Vd12iYso9IDFPFBggiTBeI/uXJkCeeHR6ZEIMT9PJfR3l66V7yAuhMt7HmgfDeI0YESW1qKNUQS4CgoAdnsvyi0Y0ip7EndO2Y3JGBQ69nfiltykJlgg6+JO2jT/q8x+RR4rLCOCTFtTlFMMgOKaIfleRP7euuugblAbhkX8UJ1IonkHX0honC3oIO6vDYZwkSbyTYL5+tf1W+zRNeHO4aSS0h3EpYi57JZ8cwgZBvE+F9tNvwdj4M/L7XO2nKnQ7h3DOkPKHvdrA0cRSMDTK5HQjJ+G/E7LLbR7QOrOhGKvyaKlM+nc940PQFDArSHFPpWeNa5q/jwdcsWwjGUHGA== 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=CCklxLVz/ZD2KTMuz0CdJDy9wAqVh4MfTqvAkGDp+LA=; b=Is20XGteu6pXV0pSPuEYBAHk494jPa0ui1a9R9LlJihcoe8fcEROSXEb2GkJ7N0SDxI5aiyNG2/fiK3azkJ47Gr2aTJBNbh0YKGEYCuA6mbZJ10ZZtOA5fdq+doBlmLdf26IYs5ZwgHwMYVTUtdt5AiM7WUwdkcpL4oCQ9YvVHY= 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 SJ0PR12MB8168.namprd12.prod.outlook.com (2603:10b6:a03:4e7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19; Tue, 6 Jun 2023 16:26:54 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 16:26:53 +0000 Message-ID: Date: Tue, 6 Jun 2023 17:26:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Content-Language: en-US To: Huisong Li , dev@dpdk.org Cc: thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, liudongdong3@huawei.com, liuyonglong@huawei.com, fengchengwen@huawei.com References: <20220825024425.10534-1-lihuisong@huawei.com> <20230527021121.31647-1-lihuisong@huawei.com> From: Ferruh Yigit Subject: Re: [PATCH V6 0/5] app/testpmd: support multiple process attach and detach port In-Reply-To: <20230527021121.31647-1-lihuisong@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0070.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:153::21) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB8168:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d7ca1cd-2adf-4bac-7e2a-08db66aad64e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZfAXhFENjFBxFTqSCz0lI3snokduz/ZsHtFdn7JyL6Nee72yaQ+2gMiP/bHRkOpX+DNa29H9HaS5EjDL8RXcYpRX9TnsfpoCCNavbNb32PS4N4oJvk/ufJjaLxwTd562UVCpsN2tUaljmMGts6N0ZizN0/0WFWZHJMO98ei1Cpej7/GdcRS+JLV3GwYCLQg2EbQtHpmdNENjEoQGaQ9k5gY/jcmbspBuGRMa64fT5FttJ5+8a1yt+NeM/6OiXrqDZn96aZbJ1bVv266fH/ShkmAb10k19TvwLarfcQmyJWQnxxr4NTvIABtonF7tCfxXzPbDoJmskC1VrN841LoI0kIGy3e3HU/rH/l94tO/v4HUoBVeLrVYwd2Z2jwryiuFRansCODvypN1bJg8zv0x15H7kX5VqLBhz7eAWS9sNGHxkNgBYetoAIWAbc8rvgK6gGds9zk7o/VeYopih0UCjymdbupZXhsV6Ll9qYup+wToGCZP27NwTzHNRQi60Sm1ON3jwRPVP9xn+8rgyMVIZa/TjwgB10lbxJYw8CSL+GM8McKX2Ij+PEmH51PrMe8kUBRQeq6K6aBJhgXroSoCqjR2vwQKPr4CUYTOGN+tm56sTe7nhcdPLcs1TitN+dFFoGeAWDGRl2CwedPwx1r2+g== 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:(13230028)(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(451199021)(86362001)(2906002)(41300700001)(38100700002)(8676002)(8936002)(5660300002)(36756003)(44832011)(316002)(4326008)(66476007)(66556008)(66946007)(6486002)(6666004)(478600001)(31696002)(186003)(83380400001)(31686004)(2616005)(53546011)(6506007)(6512007)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YUFmd1lrNy9kVklpa0IvWnlwRS9aWEpUKzVIODVOMW5pczR6MU9rWUFoV0pj?= =?utf-8?B?cFhCeDVSenkyWDVZWUhMb3p2ZGFpTVhITlF3RGxlclFYdEZlekcxckhvNXRD?= =?utf-8?B?ZUZNTHQwc3Y5bFEyaXc3Lzl1dzJQSUVoUk9KK3BzOEkvUHBJS3ZtVnlJNDE2?= =?utf-8?B?MmZXL053TWFpWTRkdW9QMVBhbWczTDlFZ0Z2N1F6eHZDbWxJajZTWDZCM2Zu?= =?utf-8?B?SDAySkpDMERibFo4NGtKeXZNS1laZXNqdUl1SnIzSUVTZFVrcU9VeXUwcjRY?= =?utf-8?B?VGxvQ1pXTUtPQU5qTEVDK3RSMWNENWZHNkZXWlJmYWh6U1RLWm8rcjZVUFY0?= =?utf-8?B?dkxlR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MS-Exchange-CrossTenant-Network-Message-Id: 0d7ca1cd-2adf-4bac-7e2a-08db66aad64e X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 16:26:53.2735 (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: zl9NCxF2nySYZ9WlvcJ7CYUNKp9XFIBmUOUYybjCO6floxVgatycyLnWOinc5fS4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB8168 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 5/27/2023 3:11 AM, Huisong Li wrote: > This patchset fix some bugs and support attaching and detaching port > in primary and secondary. > Hi Huisong, As commented on v4, I have some concerns on this set. The set does multiple ethdev/testpmd change, but the main target of the patch is not described clearly/simply. It looks like intention is to be able to register NEW event callback in the secondary process and be able to setup device in secondary when primary attaches a device, but my question is why not multi-process communication socket can't be used for this? MP socket/communication/thread is developed for this reason, I am not convinced why it can't be used to sync primary and secondary for device attach/detach. > --- > -v6: adjust rte_eth_dev_is_used position based on alphabetical order > in version.map > -v5: move 'ALLOCATED' state to the back of 'REMOVED' to avoid abi break. > -v4: fix a misspelling. > -v3: > #1 merge patch 1/6 and patch 2/6 into patch 1/5, and add modification > for other bus type. > #2 add a RTE_ETH_DEV_ALLOCATED state in rte_eth_dev_state to resolve > the probelm in patch 2/5. > -v2: resend due to CI unexplained failure. > > Huisong Li (5): > drivers/bus: restore driver assignment at front of probing > ethdev: fix skip valid port in probing callback > app/testpmd: check the validity of the port > app/testpmd: add attach and detach port for multiple process > app/testpmd: stop forwarding in new or destroy event > > app/test-pmd/testpmd.c | 47 +++++++++++++++--------- > app/test-pmd/testpmd.h | 1 - > drivers/bus/auxiliary/auxiliary_common.c | 9 ++++- > drivers/bus/dpaa/dpaa_bus.c | 9 ++++- > drivers/bus/fslmc/fslmc_bus.c | 8 +++- > drivers/bus/ifpga/ifpga_bus.c | 12 ++++-- > drivers/bus/pci/pci_common.c | 9 ++++- > drivers/bus/vdev/vdev.c | 10 ++++- > drivers/bus/vmbus/vmbus_common.c | 9 ++++- > drivers/net/bnxt/bnxt_ethdev.c | 3 +- > drivers/net/bonding/bonding_testpmd.c | 1 - > drivers/net/mlx5/mlx5.c | 2 +- > lib/ethdev/ethdev_driver.c | 13 +++++-- > lib/ethdev/ethdev_driver.h | 12 ++++++ > lib/ethdev/ethdev_pci.h | 2 +- > lib/ethdev/rte_class_eth.c | 2 +- > lib/ethdev/rte_ethdev.c | 4 +- > lib/ethdev/rte_ethdev.h | 4 +- > lib/ethdev/version.map | 1 + > 19 files changed, 114 insertions(+), 44 deletions(-) >