[67/69] net/i40e/base: change GET/SET_RSS_LUT valid_len check
diff mbox series

Message ID 20191202074935.97629-68-xiaolong.ye@intel.com
State New
Delegated to: xiaolong ye
Headers show
Series
  • update for i40e base code
Related show

Checks

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

Commit Message

Ye Xiaolong Dec. 2, 2019, 7:49 a.m. UTC
Each lut entry is a u16, so fix the valid_len check using sizeof(u16)

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Reviewed-by: Shanmugam Jayaprakash <jayaprakash.shanmugam@intel.com>
Reviewed-by: Burra Phani R <phani.r.burra@intel.com>
Reviewed-by: Kirsher Jeffrey T <jeffrey.t.kirsher@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/base/virtchnl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 13cd0e5ab..bc9043dde 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -1583,7 +1583,7 @@  virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
 				break;
 			}
 
-			valid_len += vrl->lut_entries - 1;
+			valid_len += (vrl->lut_entries - 1) * sizeof(u16);
 		}
 		break;
 	case VIRTCHNL_OP_GET_RSS_HASH: