From patchwork Mon Jul 17 07:33:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 26974 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D147F3253; Mon, 17 Jul 2017 09:32:32 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D12412FDD; Mon, 17 Jul 2017 09:32:30 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2017 00:32:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,374,1496127600"; d="scan'208";a="108813529" Received: from dpdk9.sh.intel.com ([10.67.118.189]) by orsmga004.jf.intel.com with ESMTP; 17 Jul 2017 00:32:27 -0700 From: Beilei Xing To: jingjing.wu@intel.com Cc: dev@dpdk.org, stable@dpdk.org Date: Mon, 17 Jul 2017 15:33:09 +0800 Message-Id: <1500276789-90626-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/i40e: fix virtchnl message response timeout X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/i40e/i40e_ethdev_vf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index bab09f8..cdeb6ce 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -392,6 +392,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; }