[dpdk-dev] net/ifcvf: fix last used idx read

Message ID 20180423174821.18066-1-xiao.w.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xiao Wang April 23, 2018, 5:48 p.m. UTC
  Fixes: 7b0c17368af2 ("net/ifcvf: add ifcvf vdpa driver")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/ifc/base/ifcvf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit April 23, 2018, 10:55 a.m. UTC | #1
On 4/23/2018 6:48 PM, Xiao Wang wrote:
> Fixes: 7b0c17368af2 ("net/ifcvf: add ifcvf vdpa driver")
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>

Squashed into relevant commit in next-net, thanks.
  

Patch

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);
 	}
 }