On Thu, Aug 17, 2023 at 06:21:50PM +0800, Cheng Xu wrote: > Currently our MTT only support inline mtt entries (0 level MTT) and > indirect MTT entries (1 level mtt), which will limit the maximum length > of MRs. In order to implement a multi-level MTT, we refactor the > structure of MTT first. > > Signed-off-by: Cheng Xu <chengyou@xxxxxxxxxxxxxxxxx> > --- > drivers/infiniband/hw/erdma/erdma_hw.h | 4 +- > drivers/infiniband/hw/erdma/erdma_qp.c | 2 +- > drivers/infiniband/hw/erdma/erdma_verbs.c | 214 +++++++++++++--------- > drivers/infiniband/hw/erdma/erdma_verbs.h | 26 ++- > 4 files changed, 152 insertions(+), 94 deletions(-) <...> > +/* Hierarchical storage structure for MTT entries */ > +struct erdma_mtt { > + u64 *buf; > + size_t size; > + > + bool continuous; > + union { > + dma_addr_t buf_dma; > + struct { > + struct scatterlist *sglist; > + u32 nsg; > + u32 level; > + }; > + }; > + > + struct erdma_mtt *low_level; This variable is used in third patch only, but please don't resubmit yet. Thanks