From: Beilei Xing Date: Mon, 17 Jul 2017 07:33:09 +0000 (+0800) Subject: net/i40e: fix virtchnl message response timeout X-Git-Tag: spdx-start~2443 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5b1324145c80e6dcfbc61bb7fd5fe2269a320342;p=dpdk.git net/i40e: fix virtchnl message response timeout PF driver and VF driver communicated with each other by virtual channel message. When VF sends message to PF to enable some offload capability, PF should response if it is successful or not. VIRTCHNL_OP_ENABLE_VLAN_STRIPPING is a new added message and the old PF driver doesn’t support that. So no response is received by DPDK VF. Then VF is blocked on this message and cannot roll back. This patch clears pending command on VF side when the waiting duration expires to avoid blocking following communication. Fixes: 5f0b95d59a98 ("net/i40e: support VLAN stripping for VF") Cc: stable@dpdk.org Signed-off-by: Beilei Xing --- diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index dc6c79449d..62dea59f4b 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -391,6 +391,11 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args) rte_delay_ms(ASQ_DELAY_MS); /* If don't read msg or read sys event, continue */ } while (i++ < MAX_TRY_TIMES); + /* If there's no response is received, clear command */ + if (i >= MAX_TRY_TIMES) { + PMD_DRV_LOG(WARNING, "No response for %d", args->ops); + _clear_cmd(vf); + } break; }