OSDN Git Service

xprtrdma: Plant XID in on-the-wire RDMA offset (FRWR)
authorChuck Lever <chuck.lever@oracle.com>
Wed, 19 Dec 2018 15:59:07 +0000 (10:59 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 2 Jan 2019 17:05:17 +0000 (12:05 -0500)
commit0a93fbcb16e6b1f36780f9a20d6427f26cec761d
treecb665350bc1ed9073b010ab8ef99910a7c4f1323
parent5f62412be3ff738c9575b28c1f4a9b010ac22316
xprtrdma: Plant XID in on-the-wire RDMA offset (FRWR)

Place the associated RPC transaction's XID in the upper 32 bits of
each RDMA segment's rdma_offset field. There are two reasons to do
this:

- The R_key only has 8 bits that are different from registration to
  registration. The XID adds more uniqueness to each RDMA segment to
  reduce the likelihood of a software bug on the server reading from
  or writing into memory it's not supposed to.

- On-the-wire RDMA Read and Write requests do not otherwise carry
  any identifier that matches them up to an RPC. The XID in the
  upper 32 bits will act as an eye-catcher in network captures.

Suggested-by: Tom Talpey <ttalpey@microsoft.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/xprt_rdma.h