hinic: fix bug of wq out of bound access
If wq has only one page, we need to check wqe rolling over page by
compare end_idx and curr_idx, and then copy wqe to shadow wqe to
avoid out of bound access.
This work has been done in hinic_get_wqe, but missed for hinic_read_wqe.
This patch fixes it, and removes unnecessary MASKED_WQE_IDX().
Fixes: 7dd29ee12865 ("hinic: add sriov feature support")
Signed-off-by: Qiao Ma <email@example.com>
Reviewed-by: Xunlei Pang <firstname.lastname@example.org>
Signed-off-by: Jakub Kicinski <email@example.com>
1 file changed