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 291194317D; Mon, 16 Oct 2023 13:24:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F08EC40269; Mon, 16 Oct 2023 13:24:18 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2057.outbound.protection.outlook.com [40.107.94.57]) by mails.dpdk.org (Postfix) with ESMTP id AE5714021D for ; Mon, 16 Oct 2023 13:24:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/xsx77FIxep3M864jHfWdC21fYVasdPFFSWi/CbX/COwO+f6BCwmaU5BuZYvRVbEfoF7SHiPUZQbjd6rMd/fXB5T7xnNlj3KQdcsgEIowpbTdfIcJOeJClwn83P1mWxW/zgNsOpQcgnB8HQ98Rx6zkZzS5GgZ6ZRiOLEnRJi2ymCN2a4ERg0MDtWVE2I6TimG45YQefmvoXzPS5RQQaU10sQJr4+5adHN3zJWKEKtmu8G/DcjrF4Inwyci1K6tSycjXdRsXlHzv0VO2PtgSGLcR2HNxy2i1crvz4DQyD9dDxqh+yS4vm5sJjqKper2dKvme5NCC/lMbuOu+1AkpkQ== 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=IjaPYmb15hwV3t5BQ5kaqtZr80Qw4+W8K4370Mi+nf4=; b=CtKE1lY3gYc0oO4Wtyqrz5QuhyNcrkYqNxxSrOoBdZIMkgjZhhyiyFst47BzFcRsHhuVc/wt5if7Sx0w+eQQ5zPD3+PMI0Q2ADQb/IQs+N1BTZMDXrPcqBuqXR71YcakmBjrU9sf3cI8A8aoJi3z4wOn9c+DmAPPhan3YGX6EsEpCgReK2kRLQ7GZMCEaHqU6NFg7k4nN8ZxrJxxyQdJX+Q2Vuv3wBQoFamzW7lEa+6H3OxkZ9JqrzFQsRjEQ56DavDRgC6jqfIhSDLg7vE5VdMlc4Jn72ono34CYpsPBx5GM3eovBzl0azUrWBuwNGQ9hGPPNesksqdyvIOPXu+0Q== 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=IjaPYmb15hwV3t5BQ5kaqtZr80Qw4+W8K4370Mi+nf4=; b=O4PsJ93vRX4MIqWQl+4nMRsJhK4hikUkVI97pLPKne2QggJwFt1TpQ6mv3eqqAtBUZRd5eLWTafVU8GGTgysk5FdqoYBLWQF3gRUC4+EXWooCOH2BWZ/5eoE9t/THcYJeFTxXVQtCSSAHW749FSN8DiL8Rl25bKvCLgOhP2ZfAo= 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 MN0PR12MB6200.namprd12.prod.outlook.com (2603:10b6:208:3c3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35; Mon, 16 Oct 2023 11:24:15 +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.6863.032; Mon, 16 Oct 2023 11:24:14 +0000 Message-ID: <73b92c31-3e61-4233-acb4-2992d25122b2@amd.com> Date: Mon, 16 Oct 2023 12:23:56 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/8] lib/ethdev: update Rx and Tx queue status Content-Language: en-US To: Jie Hai , "dev@dpdk.org" , Thomas Monjalon , Andrew Rybchenko Cc: "lihuisong (C)" , David Marchand References: <20230908112901.1169869-1-haijie1@huawei.com> <20230928074305.2991100-1-haijie1@huawei.com> <20230928074305.2991100-2-haijie1@huawei.com> <0e4b8a39-9c57-b645-4fc3-f80451481f7f@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 aXQgPGZlcnJ1aC55aWdpdEBh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SG+CSyycKkco6UI9ZeUrXFwnoUJqIJY9wTJo5gD9EgGIbItv3qWTq29dihLYpzd6dqB708k7 4RBz9051oLaFVGkguFw/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <0e4b8a39-9c57-b645-4fc3-f80451481f7f@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR1P264CA0102.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cf::14) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MN0PR12MB6200:EE_ X-MS-Office365-Filtering-Correlation-Id: add834aa-5f85-46f6-fca9-08dbce3a6da4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vzujhHM6v5NRcrY+dj1liKWEJR+EbICPn3WWCzom5D+EInA4I8Xjc79lNUVAvNLlT8Tvp9MxietisWKDQ/wYAPMVPOs9jED/FB+azP6U4FMewo8JFTkVRH0+YbVnw7tLemHbHM5ICAQB7jWwCBn0fn6HUINmL4acU49xUFN8qT2aWspC3pZk5ncrr+g8wux1tu16177bxxC4DIVUz3Row7DpIDh9moVsS2mOXbsd98h2KPESBl0HrSyqDZG34W3zgqA9fpiAErqX5ecv2m5DcUNb3oXl30fhqbX3cKLE8Pafvxf9N8iMtH+1ARUyJGMbJoyq7Y6bP1Gm8A5xv5wgolLoOVGJq9UftoB3dZajX+48X8W/Bi+fmRyfd8W5Wa92BsucEk3ogEvALmpiYKoNidbbK8cqTuhHhcQk5h+A61H8Sw7WyiFBzn4evuBGpYzxqNWZsLr3iTxdtrCtvT6pZKKxWIcmNmHylWQQ7N2EaeLxA943FeN65K2WId0nW8MKor1BUzcpSFGSUNl1CVlTFX7jTEndB8Oeop3klrJ8bm10EuFohmi38LcX4mgi4ewmEeYHxqnQaakAgvDfcqaJdg2mtsHfKl6+4Pj0yrCyCNhM4tkInI67JeH4PtQlo8BEirJNmI81EFB8tGvqE4nr/w== 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)(39860400002)(396003)(366004)(376002)(136003)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(6486002)(2616005)(478600001)(66476007)(54906003)(66556008)(66946007)(316002)(110136005)(26005)(53546011)(6512007)(6506007)(5660300002)(8676002)(8936002)(4326008)(44832011)(2906002)(41300700001)(31696002)(86362001)(15650500001)(6666004)(36756003)(38100700002)(83380400001)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZkdDZzNFVHMzVU5VMnRxYnlHU2lEWGVUdFBGTnQvTXhtUW5zRm1RVXRBbGsr?= =?utf-8?B?eEhDbmJqemZ6SGZKcFgvKzBjN2ZUUUhBTUs4bXltMGlZcWZnMG1kS3NERURv?= =?utf-8?B?bGZ6aTR0MVdrRUVaVDVtai9jU2lXSSt3MitodHEvWHRNWDY0VU1MWUtWQ3hN?= =?utf-8?B?WlBDandoWG5GZ1lScG5MenpYRk5DTTlTVGRhNmV3b3M3OWNJRTI4QVJhOFJo?= =?utf-8?B?dW9ubDNVQU9HK3A3WDE0Qml0Vy9XWC9sYWgxRjNBQ3ZiNFdvUXAvbkFuVk9P?= =?utf-8?B?Sy9XK1cxZ1VZc0pNc2NNWUVScys2cTRhd2UrZkZreVBXckl5SjFIYzczbTdK?= =?utf-8?B?SWV1Z1VyUnFKVHFmdVhFOEFUaUgvWFpEOSt3c0tlWWs2NVlSYlVkNElVY21w?= =?utf-8?B?Y2lpTG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Jo?= =?utf-8?B?N2FpNXdtQytaUnBYTk8vYzJwYTN1cENXVlBRN1RzRWJGU0E5MVZFNTNhQVd2?= =?utf-8?B?YmZXL2xXUm5wNTZBTGt1NDI1L1RZTStDM1FIM1kxZEFwRlFPU29ObjVlYm1M?= =?utf-8?B?MXVvSFNJN3BMMmU4MHFVSnBYZWorTXdKZDVDMEZyV0RJVU5YajNJREV4U3h2?= =?utf-8?B?NjF4SkNjZEFjbkc2T1UxVUtlQ2IrOFlVanBnMHRYSXlIaUQ5SUJLZnBORHNO?= =?utf-8?B?RlZoTEx2NWRZclZyRE1sWXFJVXhZMUhUN2xuMzQ0bVJZaWhWTTVuZ0lHRllq?= =?utf-8?B?LzdSTUoySEY0UU4xQVdjMnNWVW1PZWRYWnd4NTI5dG9aclpTZm93a0E3S1BX?= =?utf-8?B?UVp0K01qVFVvSUc2cElFVXlnaENST3lyZldSVDhEWllxanU1SVNERWpmcHJY?= =?utf-8?B?UTd1YXcwYlJpTlhGOCtNVjdGbkZaMGQ3cDRpSnRHakhPcmRwUVQ4S1M4ampt?= =?utf-8?B?eFhnRXFPSFVvQVM5K3VaandJU0NYM3ppTzkrTzUrTktVQ1I5Y29pcWZiaVlP?= =?utf-8?B?RmhOeWl3Rkd3WkpaRUlOUDhlRmJTSDh3V1ptaTdRRGNscHp2VFpuNGErQzFn?= =?utf-8?B?ek42eEpmL3V3dGl4a0Y0WHN3NkI5cUlzSFc2SHdPRktraXlnY2FHWWlFMXc3?= =?utf-8?B?R0QvNlhIQnhaZ3BLSWorREdSTlUyN2NyMncxanVHOUdDM3lOZEJDYVFrVDZh?= =?utf-8?B?QXUzR2ZKd1luSHpzMlRMYXFXVXNxRVR6UTZieXVnNXhKbE1kYkFGVE0xbkRa?= =?utf-8?Q?CRREVGnJCYMOnImCGAjPcTIEp?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: add834aa-5f85-46f6-fca9-08dbce3a6da4 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 11:24:14.9294 (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: 1D99pRumIQz899GLdxJShbmTFIXnRNEP/Y5H6lf0UgFu8uUs8A9RUzJlLLaBCkMk X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6200 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 10/7/2023 9:36 AM, Jie Hai wrote: > On 2023/9/28 21:15, Ferruh Yigit wrote: >> On 9/28/2023 8:42 AM, Jie Hai wrote: >>> The DPDK framework reports the queue status, which is stored in >>> 'dev->data->tx_queue_state' and 'dev->data->rx_queue_state'.The >>> state is currently maintained by the drivers. Users may determine >>> whether a queue participates in packet forwarding based on the >>> state. However, not all drivers correctly report the queue status. >>> This may cause forwarding problems. >>> >>> Since it is difficult to modify the queue status of all drivers, >>> we consider updating the queue status at the framework level. >>> Some drivers support queues for hairpin, leaving status updating >>> for such queues to the drivers. Some drivers support >>> 'deferred_start'. Assume that all drivers that support >>> 'deferred_start' can obtain the configuration through >>> 'rte_eth_tx_queue_info_get' and 'rte_eth_rx_queue_info_get'. So >>> we can directly update the queue status in 'rte_eth_dev_start' >>> and 'rte_eth_dev_stop'. >>> >>> Signed-off-by: Jie Hai >>> --- >>>   lib/ethdev/rte_ethdev.c | 40 ++++++++++++++++++++++++++++++++++++++++ >>>   1 file changed, 40 insertions(+) >>> >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >>> index 0840d2b5942a..e3aaa71eba9e 100644 >>> --- a/lib/ethdev/rte_ethdev.c >>> +++ b/lib/ethdev/rte_ethdev.c >>> @@ -1641,6 +1641,9 @@ rte_eth_dev_start(uint16_t port_id) >>>       struct rte_eth_dev_info dev_info; >>>       int diag; >>>       int ret, ret_stop; >>> +    uint16_t i; >>> +    struct rte_eth_rxq_info rxq_info; >>> +    struct rte_eth_txq_info txq_info; >>>         RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>>       dev = &rte_eth_devices[port_id]; >>> @@ -1697,6 +1700,30 @@ rte_eth_dev_start(uint16_t port_id) >>>           (*dev->dev_ops->link_update)(dev, 0); >>>       } >>>   +    for (i = 0; i < dev->data->nb_rx_queues; i++) { >>> +        if (rte_eth_dev_is_rx_hairpin_queue(dev, i)) >>> +            continue; >>> + >>> +        memset(&rxq_info, 0, sizeof(rxq_info)); >>> +        ret = rte_eth_rx_queue_info_get(port_id, i, &rxq_info); >>> +        if (ret == 0 && rxq_info.conf.rx_deferred_start != 0) >>> +            dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; >>> +        else >>> +            dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; >>> +    } >>> + >>> +    for (i = 0; i < dev->data->nb_tx_queues; i++) { >>> +        if (rte_eth_dev_is_tx_hairpin_queue(dev, i)) >>> +            continue; >>> + >>> +        memset(&txq_info, 0, sizeof(txq_info)); >>> +        ret = rte_eth_tx_queue_info_get(port_id, i, &txq_info); >>> +        if (ret == 0 && txq_info.conf.tx_deferred_start != 0) >>> +            dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; >>> +        else >>> +            dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; >>> +    } >>> + >> >> Hi Jie, >> >> I am not sure about adding queue_info_get() calls a dependency to >> start(), since start() is a mandatory API, I am concerned about possible >> side affects. >> Like if rte_eth_rx_queue_info_get() fails,Yes, unless we let >> rte_eth_rx|tx_queue_info_get a mandatory API. >> Or event though deferred_start is set, can application first call >> rx_queue_start(), later start(), like: >>   start() >>   rx_queue_start() >>   stop() >>   rx_queue_start() >>   start() >    start()  --> deferred_start is confugured, the queue is stopped >    rx_queue_start() --> the queue is started >    stop() --> all queues are stopped >    rx_queue_start() --> not supported, port should starts first >    start() > > If we change the order as: >    start() >    rx_queue_start() >    stop() >    start() > > The last status of the queue for different drivers may be different. > Most drivers starts all queues except the queue setting deferred_start. > For sfc driver, all queues are started and the status of  the queue > setting deferred_start will be reported as stopped, which is not correct. > That's the point, drivers have their own private processing for > different sequences of deferred_start, start|stop and queue_start|stop. > >> Or even applications sets deferred_start, PMD be ignoring without >> reflecting that to conf.rx_deferred_start, etc... > > Supppose the app sets the deferred_start, > whether the driver verifies the support the configuration or not, > whether the driver issues the configuration to the hardware or not, > whether the driver saves and reports the configuration or not, > Different driver implementations vary. > > For the above three cases,  pay attention to the following: > > 1) Y-Y-Y That's what we need. > 2) Y-Y-N That's what we should add. > 3) N-N-Y This will lead to wrong information(e.g.ice_rxtx.c mlx5_txq.c > mlx5_rxq.c) > 4) N-N-N That's what we need, too. >> >> >> Anyway, intention was to move common task, setting queue state, to the >> ethdev layer, but because of the deferred_start, in rte_eth_dev_start() >> we don't really know the queue state. >> >> We can try to move deferred state information to the ethdev, but that is >> similar to setting queue state in the driver, that is why perhaps better >> to leave setting state to drivers, as done in the first version of the >> set. >> @Jie, @David, what do you think? >> > I support V1. Whoever changes the queue status is responsible for > reporting the queue status. > That will maintains the specificity of the drive treatment. > Agreed, thanks Jie, let me switch back to v1. >> >> And, @Jie, can you also check the rx_queue_start() & tx_queue_start() >> dev_ops of the drivers sets the queue state? >> If missing on some drivers, that needs to be added too. >> > I have checked already, all drivers support rx_queue_start() & > tx_queue_start() set the queue state. >> >>>       /* expose selection of PMD fast-path functions */ >>>       eth_dev_fp_ops_setup(rte_eth_fp_ops + port_id, dev); >>>   @@ -1708,6 +1735,7 @@ int >>>   rte_eth_dev_stop(uint16_t port_id) >>>   { >>>       struct rte_eth_dev *dev; >>> +    uint16_t i; >>>       int ret; >>>         RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>> @@ -1731,6 +1759,18 @@ rte_eth_dev_stop(uint16_t port_id) >>>           dev->data->dev_started = 0; >>>       rte_ethdev_trace_stop(port_id, ret); >>>   +    for (i = 0; i < dev->data->nb_rx_queues; i++) { >>> +        if (rte_eth_dev_is_rx_hairpin_queue(dev, i)) >>> +            continue; >>> +        dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; >>> +    } >>> + >>> +    for (i = 0; i < dev->data->nb_tx_queues; i++) { >>> +        if (rte_eth_dev_is_tx_hairpin_queue(dev, i)) >>> +            continue; >>> +        dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; >>> +    } >>> + >>>       return ret; >>>   } >>>   >>