mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
More RDMA work and some op-structure constification from Chuck Lever,
and a small cleanup to our xdr encoding. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJZst0LAAoJECebzXlCjuG+o30QALbchoIvs7BiDrUxYMfJ2nCa 7UW69STwX79B3NZTg7RrScFTLPEFW9DMpb/Og7AYTH3/wdgGYQNM1UxGUYe7IxSN xemH7BSmQzJ7ryaxouO/jskUw5nvNRXhY0PMxJApjrCs837vTjduIVw9zUa8EDeH 9toxpTM4k3z/1myj60PuHnuQF9EyLDL6W581loDF04nQB3pVRbAZOh1lUeqMgLUd 7IF+CDECFcjL7oZSA3wDGpsVySLdZ+GYxloFIDO/d8kHEsZD3OaN2MdfRki8EOSQ qibTYO0284VeyNLUOIHjspqbDh0Lr2F7VolMmlM5GF1IuApih0/QYidqsH6/As3U JIAK53vgqZfK2qI0ud7dGGFEnT/vlE7pQiXiza36xI8YZu4Xz6uGbM41p38RU8jO 3fr38xdPqqO7YE6F7ZUHYyrmW81Vi0lFdQkw1DBEipHV8UquuCmdtAeR9xgDsdQ/ LsMVevM1mF+19krOIGbBnENq1GX78ecfHEYGxlTjf/MeO4JYl+8/x7Ow2e/ZbwSa 7hpUeCiVuVmy1hqOEtraBl5caAG0hCE8PeGRrdr5dA6ZS9YTm0ANgtxndKabwDh2 CjXF3gRnQNUGdFGCi/fmvfb89tVNj1tL52pbQqfgOb/VFrrL328vyNNg/1p2VY4Q qzmKtxZhi/XBewQjaSQl =E3UQ -----END PGP SIGNATURE----- Merge tag 'nfsd-4.14' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "More RDMA work and some op-structure constification from Chuck Lever, and a small cleanup to our xdr encoding" * tag 'nfsd-4.14' of git://linux-nfs.org/~bfields/linux: svcrdma: Estimate Send Queue depth properly rdma core: Add rdma_rw_mr_payload() svcrdma: Limit RQ depth svcrdma: Populate tail iovec when receiving nfsd: Incoming xdr_bufs may have content in tail buffer svcrdma: Clean up svc_rdma_build_read_chunk() sunrpc: Const-ify struct sv_serv_ops nfsd: Const-ify NFSv4 encoding and decoding ops arrays sunrpc: Const-ify instances of struct svc_xprt_ops nfsd4: individual encoders no longer see error cases nfsd4: skip encoder in trivial error cases nfsd4: define ->op_release for compound ops nfsd4: opdesc will be useful outside nfs4proc.c nfsd4: move some nfsd4 op definitions to xdr4.h
This commit is contained in:
commit
ad9a19d003
14 changed files with 323 additions and 401 deletions
|
|
@ -643,6 +643,30 @@ void rdma_rw_ctx_destroy_signature(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
|
|||
}
|
||||
EXPORT_SYMBOL(rdma_rw_ctx_destroy_signature);
|
||||
|
||||
/**
|
||||
* rdma_rw_mr_factor - return number of MRs required for a payload
|
||||
* @device: device handling the connection
|
||||
* @port_num: port num to which the connection is bound
|
||||
* @maxpages: maximum payload pages per rdma_rw_ctx
|
||||
*
|
||||
* Returns the number of MRs the device requires to move @maxpayload
|
||||
* bytes. The returned value is used during transport creation to
|
||||
* compute max_rdma_ctxts and the size of the transport's Send and
|
||||
* Send Completion Queues.
|
||||
*/
|
||||
unsigned int rdma_rw_mr_factor(struct ib_device *device, u8 port_num,
|
||||
unsigned int maxpages)
|
||||
{
|
||||
unsigned int mr_pages;
|
||||
|
||||
if (rdma_rw_can_use_mr(device, port_num))
|
||||
mr_pages = rdma_rw_fr_page_list_len(device);
|
||||
else
|
||||
mr_pages = device->attrs.max_sge_rd;
|
||||
return DIV_ROUND_UP(maxpages, mr_pages);
|
||||
}
|
||||
EXPORT_SYMBOL(rdma_rw_mr_factor);
|
||||
|
||||
void rdma_rw_init_qp(struct ib_device *dev, struct ib_qp_init_attr *attr)
|
||||
{
|
||||
u32 factor;
|
||||
|
|
|
|||
Loading…
Reference in a new issue