]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Remove imul instructions from rpcrdma_convert_iovs()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 14 Aug 2017 19:38:22 +0000 (15:38 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 15 Aug 2017 17:37:38 +0000 (13:37 -0400)
commit431b7d4879fc1fe806465a5895d2ae4b00290a4e
tree4c3cd398afec30b3e6fdeb249d0f5bd2f9db509a
parent890dee4328bd0aaac40bdfabe348bef6b2626fd4
xprtrdma: Remove imul instructions from rpcrdma_convert_iovs()

Re-arrange the pointer arithmetic in rpcrdma_convert_iovs() to
eliminate several integer multiplication instructions during
Transport Header encoding.

Also, array overflow does not occur outside development
environments, so replace overflow checking with one spot check
at the end. This reduces the number of conditional branches in
the common case.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c