• Moni Shoua's avatar
    IB/uverbs: Add support to advise_mr · ad8a4496
    Moni Shoua authored
    Add new ioctl method for the MR object - ADVISE_MR.
    
    This command can be used by users to give an advice or directions to the
    kernel about an address range that belongs to memory regions.
    
    A new ib_device callback, advise_mr(), is introduced here to suupport the
    new command. This command takes the following arguments:
    
    - pd:		The protection domain to which all memory regions belong
    - advice: 	The type of the advice
    	  	* IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH - Pre-fetch a range of
    		an on-demand paging MR
    	  	* IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE - Pre-fetch a range
    		of an on-demand paging MR with write intention
    - flags:	The properties of the advice
    		* IB_UVERBS_ADVISE_MR_FLAG_FLUSH - Operation must end before
    		return to the caller
    - sg_list:	The list of memory ranges
    - num_sge:	The number of memory ranges in the list
    - attrs:	More attributes to be parsed by the provider
    Signed-off-by: default avatarMoni Shoua <monis@mellanox.com>
    Reviewed-by: default avatarGuy Levi <guyle@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    ad8a4496
ib_user_ioctl_verbs.h 5.36 KB