From: Xiaolong Ye Date: Wed, 22 Jan 2020 03:58:10 +0000 (+0800) Subject: net/i40e/base: skip further adminq init for VF X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=707911f98227c39321ef5ad8cfdea44f71283f46;p=dpdk.git net/i40e/base: skip further adminq init for VF Since VF has no need of firmware, we can skip further adminq init which involves firmware operation, this patch fixes the testpmd segfault issue when starting with i40e VF. Fixes: d5e1a149362e ("net/i40e/base: check MAC type") Signed-off-by: Xiaolong Ye Acked-by: Beilei Xing --- diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 221c327d12..659b971e5c 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -673,6 +673,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; + /* VF has no need of firmware */ + if (i40e_is_vf(hw)) + goto init_adminq_exit; + /* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call.