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 22C1241D52 for ; Thu, 23 Feb 2023 16:08:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D89E432AE; Thu, 23 Feb 2023 16:08:26 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3CA61432AA for ; Thu, 23 Feb 2023 16:08:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iF9ftUapYFlmhZVxeh2VK+RIrUuB1IJGewwAiKwT2C8=; b=OD+F1JHGAPZMT6W+lTd1CnbaVCpajn/HmSLkKbeItSyL4achL324HMprJuRxW06k+WHHiO oRcpFzH6iQ5pwXpXaKRyWxetikmUaNYKiRBx+fJ03Oatwket9SbfOONdxEg79gcKn+TMmS UVmi+h9P2Z+GPTHoJqJXT0qYc2raJRE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-166-Sqqla6-HMR6XBMMabcDkiQ-1; Thu, 23 Feb 2023 10:08:21 -0500 X-MC-Unique: Sqqla6-HMR6XBMMabcDkiQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 49DE43C0E456; Thu, 23 Feb 2023 15:08:21 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6983F2166B2B; Thu, 23 Feb 2023 15:08:20 +0000 (UTC) From: Kevin Traynor To: Mike Pattrick Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: add lock for VF commands' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:06:09 +0000 Message-Id: <20230223150631.723699-78-ktraynor@redhat.com> In-Reply-To: <20230223150631.723699-1-ktraynor@redhat.com> References: <20230223150631.723699-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/28/23. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/22ffbcffdfb7a3b64815857cfeda5a07eb8f1069 Thanks. Kevin --- >From 22ffbcffdfb7a3b64815857cfeda5a07eb8f1069 Mon Sep 17 00:00:00 2001 From: Mike Pattrick Date: Wed, 28 Dec 2022 18:00:25 -0500 Subject: [PATCH] net/iavf: add lock for VF commands [ upstream commit 91bf37d250aacfc9512a33ce9ec6d4783766804e ] iavf admin queue commands aren't thread-safe. Bugs surrounding this issue can manifest in a variety of ways but frequently pend_cmd is over written. Simultaneously executing commands can result in a misconfigured device or DPDK sleeping in a thread for 2 second. Despite this limitation, vf commands may be executed from both iavf_dev_alarm_handler() in a control thread and the applications main thread. This is trivial to simulate in the testpmd application by creating a bond of vf's in active backup mode, and then turning the bond off and then on again repeatedly. Previously [1] was proposed as a potential solution, but this commit did not resolve all potential issues concerning the admin queue and has been reverted from the stable branch. I propose adding locks until a more complete solution is available. [1] commit cb5c1b91f76f ("net/iavf: add thread for event callbacks") Fixes: 48de41ca11f0 ("net/avf: enable link status update") Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message") Signed-off-by: Mike Pattrick Acked-by: Qi Zhang --- drivers/net/iavf/iavf.h | 1 + drivers/net/iavf/iavf_vchnl.c | 92 +++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 37 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index 29692e3994..58c3afe567 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -243,4 +243,5 @@ struct iavf_info { struct iavf_flow_list flow_list; rte_spinlock_t flow_ops_lock; + rte_spinlock_t aq_lock; struct iavf_parser_list rss_parser_list; struct iavf_parser_list dist_parser_list; diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 1bd3559ec2..930a67f517 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -256,4 +256,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args, } +static int +iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter, + struct iavf_cmd_info *args, int async) +{ + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); + int ret; + + rte_spinlock_lock(&vf->aq_lock); + ret = iavf_execute_vf_cmd(adapter, args, async); + rte_spinlock_unlock(&vf->aq_lock); + + return ret; +} + static void iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, @@ -404,5 +418,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) PMD_DRV_LOG(ERR, "Failed to execute command of" @@ -425,5 +439,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) PMD_DRV_LOG(ERR, "Failed to execute command of" @@ -454,5 +468,5 @@ iavf_check_api_version(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_INIT_LOG(ERR, "Fail to execute command of OP_VERSION"); @@ -513,5 +527,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.in_args_size = sizeof(caps); - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { @@ -558,5 +572,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) { PMD_DRV_LOG(ERR, @@ -602,5 +616,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -642,5 +656,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -685,5 +699,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -706,5 +720,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - ret = iavf_execute_vf_cmd(adapter, &args, 0); + ret = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (ret) { PMD_DRV_LOG(ERR, @@ -737,5 +751,5 @@ iavf_enable_queues(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, @@ -765,5 +779,5 @@ iavf_disable_queues(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, @@ -801,5 +815,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "Failed to execute command of %s", @@ -843,5 +857,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -887,5 +901,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -933,5 +947,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid, args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "Failed to execute command of %s", @@ -965,5 +979,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -997,5 +1011,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -1089,5 +1103,5 @@ iavf_configure_queues(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "Failed to execute command of" @@ -1130,5 +1144,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command OP_CONFIG_IRQ_MAP"); @@ -1171,5 +1185,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num, args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command OP_MAP_QUEUE_VECTOR"); @@ -1231,5 +1245,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -1261,5 +1275,5 @@ iavf_query_stats(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS"); @@ -1299,5 +1313,5 @@ iavf_config_promisc(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { @@ -1342,5 +1356,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr, args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -1369,5 +1383,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "fail to execute command %s", @@ -1396,5 +1410,5 @@ iavf_fdir_add(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_FDIR_FILTER"); @@ -1456,5 +1470,5 @@ iavf_fdir_del(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_FDIR_FILTER"); @@ -1503,5 +1517,5 @@ iavf_fdir_check(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, "fail to check flow director rule"); @@ -1544,5 +1558,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -1567,5 +1581,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, @@ -1593,5 +1607,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, @@ -1614,5 +1628,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { @@ -1647,5 +1661,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) PMD_DRV_LOG(ERR, "Failed to execute command of" @@ -1692,5 +1706,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter, args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { @@ -1736,11 +1750,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num) /* disable interrupt to avoid the admin queue message to be read * before iavf_read_msg_from_pf. + * + * don't disable interrupt handler until ready to execute vf cmd. */ + rte_spinlock_lock(&vf->aq_lock); rte_intr_disable(pci_dev->intr_handle); err = iavf_execute_vf_cmd(adapter, &args, 0); rte_intr_enable(pci_dev->intr_handle); + rte_spinlock_unlock(&vf->aq_lock); } else { rte_eal_alarm_cancel(iavf_dev_alarm_handler, dev); - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); rte_eal_alarm_set(IAVF_ALARM_INTERVAL, iavf_dev_alarm_handler, dev); @@ -1781,5 +1799,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter) args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 0); + err = iavf_execute_vf_cmd_safe(adapter, &args, 0); if (err) { PMD_DRV_LOG(ERR, "Failed to execute command of VIRTCHNL_OP_GET_MAX_RSS_QREGION"); @@ -1812,5 +1830,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter, args.out_size = IAVF_AQ_BUF_SZ; - err = iavf_execute_vf_cmd(adapter, &args, 1); + err = iavf_execute_vf_cmd_safe(adapter, &args, 1); if (err) { PMD_DRV_LOG(ERR, "fail to execute command %s", -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:25.693129939 +0000 +++ 0078-net-iavf-add-lock-for-VF-commands.patch 2023-02-23 14:46:23.858236273 +0000 @@ -1 +1 @@ -From 91bf37d250aacfc9512a33ce9ec6d4783766804e Mon Sep 17 00:00:00 2001 +From 22ffbcffdfb7a3b64815857cfeda5a07eb8f1069 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 91bf37d250aacfc9512a33ce9ec6d4783766804e ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -31,3 +32,3 @@ - drivers/net/iavf/iavf.h | 1 + - drivers/net/iavf/iavf_vchnl.c | 106 ++++++++++++++++++++-------------- - 2 files changed, 63 insertions(+), 44 deletions(-) + drivers/net/iavf/iavf.h | 1 + + drivers/net/iavf/iavf_vchnl.c | 92 +++++++++++++++++++++-------------- + 2 files changed, 56 insertions(+), 37 deletions(-) @@ -36 +37 @@ -index 1edebab8dc..aa18650ffa 100644 +index 29692e3994..58c3afe567 100644 @@ -39 +40 @@ -@@ -263,4 +263,5 @@ struct iavf_info { +@@ -243,4 +243,5 @@ struct iavf_info { @@ -46 +47 @@ -index f92daf97f2..9adaadb173 100644 +index 1bd3559ec2..930a67f517 100644 @@ -49 +50 @@ -@@ -398,4 +398,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args, +@@ -256,4 +256,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args, @@ -68 +69 @@ -@@ -555,5 +569,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter) +@@ -404,5 +418,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter) @@ -75 +76 @@ -@@ -576,5 +590,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter) +@@ -425,5 +439,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter) @@ -82 +83 @@ -@@ -605,5 +619,5 @@ iavf_check_api_version(struct iavf_adapter *adapter) +@@ -454,5 +468,5 @@ iavf_check_api_version(struct iavf_adapter *adapter) @@ -89 +90 @@ -@@ -666,5 +680,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) +@@ -513,5 +527,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) @@ -96 +97 @@ -@@ -711,5 +725,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter) +@@ -558,5 +572,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter) @@ -103 +104 @@ -@@ -755,5 +769,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable) +@@ -602,5 +616,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable) @@ -110 +111 @@ -@@ -795,5 +809,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable) +@@ -642,5 +656,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable) @@ -117 +118 @@ -@@ -838,5 +852,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add) +@@ -685,5 +699,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add) @@ -124 +125 @@ -@@ -859,5 +873,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter) +@@ -706,5 +720,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter) @@ -131 +132 @@ -@@ -890,5 +904,5 @@ iavf_enable_queues(struct iavf_adapter *adapter) +@@ -737,5 +751,5 @@ iavf_enable_queues(struct iavf_adapter *adapter) @@ -138 +139 @@ -@@ -918,5 +932,5 @@ iavf_disable_queues(struct iavf_adapter *adapter) +@@ -765,5 +779,5 @@ iavf_disable_queues(struct iavf_adapter *adapter) @@ -145 +146 @@ -@@ -954,5 +968,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, +@@ -801,5 +815,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, @@ -152 +153 @@ -@@ -996,5 +1010,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter) +@@ -843,5 +857,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter) @@ -159 +160 @@ -@@ -1040,5 +1054,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter) +@@ -887,5 +901,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter) @@ -166 +167 @@ -@@ -1086,5 +1100,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid, +@@ -933,5 +947,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid, @@ -173 +174 @@ -@@ -1118,5 +1132,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter) +@@ -965,5 +979,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter) @@ -180 +181 @@ -@@ -1150,5 +1164,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter) +@@ -997,5 +1011,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter) @@ -187 +188 @@ -@@ -1248,5 +1262,5 @@ iavf_configure_queues(struct iavf_adapter *adapter, +@@ -1089,5 +1103,5 @@ iavf_configure_queues(struct iavf_adapter *adapter, @@ -194 +195 @@ -@@ -1289,5 +1303,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter) +@@ -1130,5 +1144,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter) @@ -201 +202 @@ -@@ -1330,5 +1344,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num, +@@ -1171,5 +1185,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num, @@ -208 +209 @@ -@@ -1390,5 +1404,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add) +@@ -1231,5 +1245,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add) @@ -215 +216 @@ -@@ -1420,5 +1434,5 @@ iavf_query_stats(struct iavf_adapter *adapter, +@@ -1261,5 +1275,5 @@ iavf_query_stats(struct iavf_adapter *adapter, @@ -222 +223 @@ -@@ -1458,5 +1472,5 @@ iavf_config_promisc(struct iavf_adapter *adapter, +@@ -1299,5 +1313,5 @@ iavf_config_promisc(struct iavf_adapter *adapter, @@ -229 +230 @@ -@@ -1501,5 +1515,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr, +@@ -1342,5 +1356,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr, @@ -236 +237 @@ -@@ -1528,5 +1542,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add) +@@ -1369,5 +1383,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add) @@ -243 +244 @@ -@@ -1555,5 +1569,5 @@ iavf_fdir_add(struct iavf_adapter *adapter, +@@ -1396,5 +1410,5 @@ iavf_fdir_add(struct iavf_adapter *adapter, @@ -250 +251 @@ -@@ -1615,5 +1629,5 @@ iavf_fdir_del(struct iavf_adapter *adapter, +@@ -1456,5 +1470,5 @@ iavf_fdir_del(struct iavf_adapter *adapter, @@ -257 +258 @@ -@@ -1662,5 +1676,5 @@ iavf_fdir_check(struct iavf_adapter *adapter, +@@ -1503,5 +1517,5 @@ iavf_fdir_check(struct iavf_adapter *adapter, @@ -264,22 +265 @@ -@@ -1705,5 +1719,5 @@ iavf_flow_sub(struct iavf_adapter *adapter, struct iavf_fsub_conf *filter) - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR, "Failed to execute command of " -@@ -1756,5 +1770,5 @@ iavf_flow_unsub(struct iavf_adapter *adapter, struct iavf_fsub_conf *filter) - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR, "Failed to execute command of " -@@ -1799,5 +1813,5 @@ iavf_flow_sub_check(struct iavf_adapter *adapter, - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR, "Failed to check flow subscription rule"); -@@ -1839,5 +1853,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter, +@@ -1544,5 +1558,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter, @@ -292 +272 @@ -@@ -1862,5 +1876,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps) +@@ -1567,5 +1581,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps) @@ -299 +279 @@ -@@ -1888,5 +1902,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena) +@@ -1593,5 +1607,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena) @@ -306 +286 @@ -@@ -1909,5 +1923,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter) +@@ -1614,5 +1628,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter) @@ -313,8 +293 @@ -@@ -1942,5 +1956,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev, - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) - PMD_DRV_LOG(ERR, "Failed to execute command of" -@@ -1965,5 +1979,5 @@ int iavf_set_q_bw(struct rte_eth_dev *dev, +@@ -1647,5 +1661,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev, @@ -327 +300 @@ -@@ -2010,5 +2024,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter, +@@ -1692,5 +1706,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter, @@ -334 +307 @@ -@@ -2054,11 +2068,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num) +@@ -1736,11 +1750,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num) @@ -351 +324 @@ -@@ -2099,5 +2117,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter) +@@ -1781,5 +1799,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter) @@ -358 +331 @@ -@@ -2130,5 +2148,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter, +@@ -1812,5 +1830,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter, @@ -365,21 +337,0 @@ -@@ -2164,5 +2182,5 @@ iavf_set_vf_quanta_size(struct iavf_adapter *adapter, u16 start_queue_id, u16 nu - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR, "Failed to execute command VIRTCHNL_OP_CONFIG_QUANTA"); -@@ -2190,5 +2208,5 @@ iavf_get_ptp_cap(struct iavf_adapter *adapter) - args.out_size = IAVF_AQ_BUF_SZ; - -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR, -@@ -2218,5 +2236,5 @@ iavf_get_phc_time(struct iavf_rx_queue *rxq) - - rte_spinlock_lock(&vf->phc_time_aq_lock); -- err = iavf_execute_vf_cmd(adapter, &args, 0); -+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0); - if (err) { - PMD_DRV_LOG(ERR,