IB/core: Enhance ib_map_mr_sg()
The SRP initiator allows to set max_sectors to a value that exceeds the largest amount of data that can be mapped at once with an mlx4 HCA using fast registration and a page size of 4 KB. Hence modify ib_map_mr_sg() such that it can map partial sg-elements. If an sg-element has been mapped partially, let the caller know which fraction has been mapped by adjusting *sg_offset. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com>
Este cometimento está contido em:

cometido por
Doug Ledford

ascendente
f83b2561a6
cometimento
9aa8b3217e
@@ -3082,7 +3082,7 @@ static int ocrdma_set_page(struct ib_mr *ibmr, u64 addr)
|
||||
}
|
||||
|
||||
int ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
|
||||
unsigned int sg_offset)
|
||||
unsigned int *sg_offset)
|
||||
{
|
||||
struct ocrdma_mr *mr = get_ocrdma_mr(ibmr);
|
||||
|
||||
|
@@ -123,6 +123,6 @@ struct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd,
|
||||
enum ib_mr_type mr_type,
|
||||
u32 max_num_sg);
|
||||
int ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
|
||||
unsigned sg_offset);
|
||||
unsigned int *sg_offset);
|
||||
|
||||
#endif /* __OCRDMA_VERBS_H__ */
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador