From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Wang Subject: [PATCH] net/ifcvf: fix last used idx read Date: Tue, 24 Apr 2018 01:48:21 +0800 Message-ID: <20180423174821.18066-1-xiao.w.wang@intel.com> Cc: dev@dpdk.org, Xiao Wang To: ferruh.yigit@intel.com Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id ABD5C1DB9 for ; Mon, 23 Apr 2018 11:18:07 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 7b0c17368af2 ("net/ifcvf: add ifcvf vdpa driver") Signed-off-by: Xiao Wang --- drivers/net/ifc/base/ifcvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ifc/base/ifcvf.c b/drivers/net/ifc/base/ifcvf.c index d312ad99f..bbeed30e8 100644 --- a/drivers/net/ifc/base/ifcvf.c +++ b/drivers/net/ifc/base/ifcvf.c @@ -250,7 +250,7 @@ ifcvf_hw_disable(struct ifcvf_hw *hw) ring_state = *(u32 *)(hw->lm_cfg + IFCVF_LM_RING_STATE_OFFSET + (i / 2) * IFCVF_LM_CFG_SIZE + (i % 2) * 4); hw->vring[i].last_avail_idx = (u16)ring_state; - hw->vring[i].last_used_idx = (u16)ring_state >> 16; + hw->vring[i].last_used_idx = (u16)(ring_state >> 16); } } -- 2.15.1