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 909D242813 for ; Thu, 23 Mar 2023 16:39:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88908427E9; Thu, 23 Mar 2023 16:39:29 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 775BE4021E; Thu, 23 Mar 2023 16:39:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ed1kj5Nq8guRgLhI2+4XgfL5oTNq10EP/U7zPZT/mqOeoD+9r8srBWwaA04IO8QuyW1rxkKKeKdYj7Y+FKQwoQnL9KehBNO09OD08WJiGztqo81nZ2MRaEUYqvCloSjtrH1GoYeQ/RqR5696EQL0m6fP5lDVnHfjoGoF5/oDH+cMpd76Qk1eFey0H3VcHvGMFb17G3U2IOw1Bj6VKqlqyvzB1sYXcZmgmw3mPXDlyOlzbJxUwPg2I/B7Xrp25qF0a1UgKH/9qH94BKPVdXp8eJf4jOQfV1nOCbY5WuknPvo3oPdcU4o8YWBD071LgdIS2BEJIxWXVt25GOxP54PiiQ== 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=HVRZ+5tPLVrWNtnLLjBfdckgn6uLpjo87aZv+FFoSBc=; b=NhFaWHWA9EJo4eoerVPZ0C5KpzzJzOFqsQzpJX3Pjtsq0kppXnv0QEg+Anby1DjtCUi9UcSjBUuzOsXqwDvL4rqu7o0swyE81KCjRVBVLhHxEnrYcGnYEVhGgR+BE7BP7LmWjjPZ3AhvD4ewCRGkzDy0SBie34bMdlY3H5F01sUP+jKQW2GUdGrkevzEU+ulKGokmsQFeUwc4bnEWHmkB8RLHutzd3bD9jWgajd4foWUaDdrTB8LTgXcckFmAX4Po7Byl6H/0kcVuBwFwgOxCG6hhyrRjfSdPwWOjxjtTbplL1bw/DrzHsJ+yKzwmTeMmgoKjz4okg4AQLMFE2Mfcg== 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=HVRZ+5tPLVrWNtnLLjBfdckgn6uLpjo87aZv+FFoSBc=; b=Fy6t/gQBXdqSdeIdHNE78Nz1TYsPRXjeRZDTsR6GotX1XCgCEIOrWPf1OoGhqOxAWoG64chrNPAxJ7H/iqvyAGaw6YOUVbta59KbmPRI+7kq/2UA1f84f0RRlPqtYuiLpP45AU9MRA4Me7MR8nX1nLRpscRCvzlL8ez52yM1Hes= 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 IA1PR12MB8190.namprd12.prod.outlook.com (2603:10b6:208:3f2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Thu, 23 Mar 2023 15:39:24 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 15:39:24 +0000 Message-ID: <0f1ae3b9-f378-9a75-65f7-fcd6e2630414@amd.com> Date: Thu, 23 Mar 2023 15:39:16 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: Kaiwen Deng , dev@dpdk.org Cc: stable@dpdk.org, qiming.yang@intel.com, yidingx.zhou@intel.com, Chas Williams , "Min Hu (Connor)" , Jingjing Wu , Beilei Xing , Mike Pattrick , Qi Zhang , Declan Doherty , Daniel Mrzyglod , Dapeng Yu References: <20230307025533.1950861-1-kaiwenx.deng@intel.com> <20230322072615.179196-1-kaiwenx.deng@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v3] net/iavf: fix iavf query stats in intr thread In-Reply-To: <20230322072615.179196-1-kaiwenx.deng@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0273.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::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_|IA1PR12MB8190:EE_ X-MS-Office365-Filtering-Correlation-Id: e243db26-03c6-4bf8-2bf5-08db2bb4c73b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +A2Q1ZtKb3ZcIdCI4at6VQGZbi2vCLCQeP4u61Dp2aojBl4ziTS5n2w/blucTjGBY/shLBHsWuPiCKmLP0DaOQK9chAtCkGt+96jk03BadmS5sDodvLWZl2gD4mormFCSIE0S0tCS4jCyRur+khM6vr4CM1gE1r6GjUO/LHsVOMHuHKFkefkbAeUAbsMNRrjkDkcyZZcH9uH+huOrQMaRQ4mnh4KTY0Am9AFf50SkaAmRyoubA21BKkPcGgTG65vNAaOhEDYLKmFQqGQ7dSiBuUyWVobB952+RA2oahWLaBVsc3JoZANIfZRFwMVjR2bCURbZZ4Zz3AryMqI34o749mayXEfMN8NG4hlTPJdRT0uruJyzIylQBV5IxQ5kaSKmIQ5nloxOZxZJesIqJtG7l0ATS+hpDJC/px7e6KNua1hLiDc6RDs6avKi4b3i7ss3rCoujOqYPtQaP8g89wFwfTiO555rJC9hozEyWoQ1qY8aKoHLm2HiY6z4mpV04AJYRpYSDKRZWM9sf+gPIFElkriAE297IIsbLOcT1elrgorYOMP8F27RKCEOKdR81rfE5tD3aDffHjghV9Tw0cVEOGu6dcRuIZPGisDzVkVEDwiQpr+yldY8BmJDCqD3hrqj5rq/+I/xQi94cOL9K5NqRjS6UjcRzt9X1tVnZhaG3ohysXmEVPBARx+mjW6k6w7swYK8T9q0qFTJoc9kkLIObQWeeEEEk49jeywmG8mpNs= 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:(13230025)(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(451199018)(66476007)(4326008)(66946007)(66556008)(8676002)(316002)(54906003)(8936002)(7416002)(44832011)(5660300002)(41300700001)(53546011)(6512007)(6506007)(26005)(6666004)(186003)(2616005)(83380400001)(478600001)(6486002)(86362001)(31696002)(36756003)(38100700002)(2906002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NkZXVWQrK1JPbTdaTnpVMHFTNWZrR25LY3M4MnpGUjlkWVM0TEprRVRmOW8v?= =?utf-8?B?cXZlUlNUdUFTaUgwL0VYVTd4RC9BY3lSVXBnWEpXSkk5cE84OGpOQnlaMU96?= =?utf-8?B?RCtuSXlCY1JEaTMwK0xob1VnMElkSXdMdkVpU0QzUlRJN1hOcjI4Rkw4MVBK?= =?utf-8?B?T21lUU9GMXgzRCtWS3J5dU5NODlFOGxrNDVN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XlNTFczRDhJTlUySkdTVzBpMlZSMm5QYnpXN3ZHMmhyY0FJ?= =?utf-8?B?MHVDQ2NlNU0zVjFvVE5wbUtlSDlWdi8yMldmcXZaUGJoWVA4MlZHaGVxODhn?= =?utf-8?Q?5+FmUwtEi6TIkOlP76ba+/2tc?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e243db26-03c6-4bf8-2bf5-08db2bb4c73b X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 15:39:24.2208 (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: XqGq/jhgLnolJKqmsd1d39oP5y6gMMNo4nKL1F0TWnGGCvuIi3KSpApmbOE5PqZ1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8190 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 On 3/22/2023 7:26 AM, Kaiwen Deng wrote: > When iavf send query-stats command in eal-intr-thread through > virtual channel, there will be no response received from > iavf_dev_virtchnl_handler for this command during block and wait. > Because iavf_dev_virtchnl_handler is also registered in eal-intr-thread. > > When vf device is bonded as BONDING_MODE_TLB mode, the slave device > update callback will registered in alarm and called by eal-intr-thread, > it would also raise the above issue. > > This commit add to poll the response for VIRTCHNL_OP_GET_STATS > when it is called by eal-intr-thread to fix this issue. > > Fixes: 91bf37d250aa ("net/iavf: add lock for VF commands") > Fixes: 22b123a36d07 ("net/avf: initialize PMD") > Fixes: 7c76a747e68c ("bond: add mode 5") > Fixes: 435d523112cc ("net/iavf: fix multi-process shared data") > Fixes: cb5c1b91f76f ("net/iavf: add thread for event callbacks") Hi Kaiwen, Above commit already seems trying to address same issue, it creates "iavf-event-thread" control thread to asyncroniously handle the interrupts, in non-interrupt context, why it is not working? Instead of adding 'rte_thread_is_intr()' checks, can't you make sure all interrupts handled in control tread? And can you please provide a stack trace in commit log, to describe the issue better? > Cc: stable@dpdk.org > > Signed-off-by: Kaiwen Deng > --- > Changes since v2: > - Add to poll the response for VIRTCHNL_OP_GET_STATS. > > Changes since v1: > - Add lock to avoid race condition. > --- > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 7 ++- > drivers/net/iavf/iavf_ethdev.c | 5 +- > drivers/net/iavf/iavf_vchnl.c | 71 ++++++++++++++++++-------- > 3 files changed, 58 insertions(+), 25 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index f0c4f7d26b..edce621496 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -894,6 +894,7 @@ bond_ethdev_update_tlb_slave_cb(void *arg) > uint8_t update_stats = 0; > uint16_t slave_id; > uint16_t i; > + int ret; > > internals->slave_update_idx++; > > @@ -903,7 +904,10 @@ bond_ethdev_update_tlb_slave_cb(void *arg) > > for (i = 0; i < internals->active_slave_count; i++) { > slave_id = internals->active_slaves[i]; > - rte_eth_stats_get(slave_id, &slave_stats); > + ret = rte_eth_stats_get(slave_id, &slave_stats); > + if (ret) > + goto OUT; > + > tx_bytes = slave_stats.obytes - tlb_last_obytets[slave_id]; > bandwidth_left(slave_id, tx_bytes, > internals->slave_update_idx, &bwg_array[i]); > @@ -922,6 +926,7 @@ bond_ethdev_update_tlb_slave_cb(void *arg) > for (i = 0; i < slave_count; i++) > internals->tlb_slaves_order[i] = bwg_array[i].slave; > > +OUT: > rte_eal_alarm_set(REORDER_PERIOD_MS * 1000, bond_ethdev_update_tlb_slave_cb, > (struct bond_dev_private *)internals); > } > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c > index 3196210f2c..d6e1f1a7f4 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -2607,6 +2607,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) > adapter->dev_data = eth_dev->data; > adapter->stopped = 1; > > + if (iavf_dev_event_handler_init()) > + goto init_vf_err; > + > if (iavf_init_vf(eth_dev) != 0) { > PMD_INIT_LOG(ERR, "Init vf failed"); > return -1; > @@ -2634,8 +2637,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) > rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr, > ð_dev->data->mac_addrs[0]); > > - if (iavf_dev_event_handler_init()) > - goto init_vf_err; > > if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) { > /* register callback func to eal lib */ > diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c > index 9adaadb173..aeffb07cca 100644 > --- a/drivers/net/iavf/iavf_vchnl.c > +++ b/drivers/net/iavf/iavf_vchnl.c > @@ -256,6 +256,7 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len, > vf->link_speed = iavf_convert_link_speed(speed); > } > iavf_dev_link_update(vf->eth_dev, 0); > + iavf_dev_event_post(vf->eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL, 0); > PMD_DRV_LOG(INFO, "Link status update:%s", > vf->link_up ? "up" : "down"); > break; > @@ -368,28 +369,48 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args, > _clear_cmd(vf); > break; > default: > - /* For other virtchnl ops in running time, > - * wait for the cmd done flag. > - */ > - do { > - if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN) > - break; > - iavf_msec_delay(ASQ_DELAY_MS); > - /* If don't read msg or read sys event, continue */ > - } while (i++ < MAX_TRY_TIMES); > - > - if (i >= MAX_TRY_TIMES) { > - PMD_DRV_LOG(ERR, "No response for cmd %d", args->ops); > + if (rte_thread_is_intr()) { > + /* For virtchnl ops were executed in eal_intr_thread, > + * need to poll the response. > + */ > + do { > + result = iavf_read_msg_from_pf(adapter, args->out_size, > + args->out_buffer); > + if (result == IAVF_MSG_CMD) > + break; > + iavf_msec_delay(ASQ_DELAY_MS); > + } while (i++ < MAX_TRY_TIMES); > + if (i >= MAX_TRY_TIMES || > + vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) { > + err = -1; > + PMD_DRV_LOG(ERR, "No response or return failure (%d)" > + " for cmd %d", vf->cmd_retval, args->ops); > + } > _clear_cmd(vf); > - err = -EIO; > - } else if (vf->cmd_retval == > - VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) { > - PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops); > - err = -ENOTSUP; > - } else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) { > - PMD_DRV_LOG(ERR, "Return failure %d for cmd %d", > - vf->cmd_retval, args->ops); > - err = -EINVAL; > + } else { > + /* For other virtchnl ops in running time, > + * wait for the cmd done flag. > + */ > + do { > + if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN) > + break; > + iavf_msec_delay(ASQ_DELAY_MS); > + /* If don't read msg or read sys event, continue */ > + } while (i++ < MAX_TRY_TIMES); > + > + if (i >= MAX_TRY_TIMES) { > + PMD_DRV_LOG(ERR, "No response for cmd %d", args->ops); > + _clear_cmd(vf); > + err = -EIO; > + } else if (vf->cmd_retval == > + VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) { > + PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops); > + err = -ENOTSUP; > + } else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) { > + PMD_DRV_LOG(ERR, "Return failure %d for cmd %d", > + vf->cmd_retval, args->ops); > + err = -EINVAL; > + } > } > break; > } > @@ -403,8 +424,14 @@ iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter, > { > struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); > int ret; > + int is_intr_thread = rte_thread_is_intr(); > > - rte_spinlock_lock(&vf->aq_lock); > + if (is_intr_thread) { > + if (!rte_spinlock_trylock(&vf->aq_lock)) > + return -EIO; > + } else { > + rte_spinlock_lock(&vf->aq_lock); > + } > ret = iavf_execute_vf_cmd(adapter, args, async); > rte_spinlock_unlock(&vf->aq_lock); >