Messages in this thread | | | Date | Tue, 4 Jan 2022 11:40:21 -0500 | Subject | Re: [RFC PATCH rdma-next 08/10] RDMA/rxe: Implement flush execution in responder side | From | Tom Talpey <> |
| |
On 12/28/2021 3:07 AM, Li Zhijian wrote:
> +static enum resp_states process_flush(struct rxe_qp *qp, > + struct rxe_pkt_info *pkt) > +{ > + u64 length = 0, start = qp->resp.va; > + u32 sel = feth_sel(pkt); > + u32 plt = feth_plt(pkt); > + struct rxe_mr *mr = qp->resp.mr; > + > + if (sel == IB_EXT_SEL_MR_RANGE) > + length = qp->resp.length; > + else if (sel == IB_EXT_SEL_MR_WHOLE) > + length = mr->cur_map_set->length;
I noticed another issue in this. When the "Memory Region" flag is set, the RETH:VA field in the request is ignored, in addition to the RETH:DMALEN. Therefore, both the start and length must be set from the map.
Is the mr->cur_map_set[0]->addr field a virtual address, or a physical? I can't find the cur_map_set in any patch. The virtual (mapped) address will be needed, to pass to arch_wb_cache_pmem().
Something like this?
if (sel == IB_EXT_SEL_MR_WHOLE) { length = mr->cur_map_set->length; start = mr->cur_map_set[0]->addr; }
(in addition to my other review suggestions about 0-length, etc...)
Tom.
| |