IB/rxe: Add support for zero-byte operations
authorAndrew Boyer <andrew.boyer@dell.com>
Wed, 23 Nov 2016 17:39:21 +0000 (12:39 -0500)
committerDoug Ledford <dledford@redhat.com>
Mon, 12 Dec 2016 21:31:45 +0000 (16:31 -0500)
commitd4fb59256ac03d84f68e36c430b58d6fc76dd651
tree439d45878decc2d4ea3eed161be54dffb034d87f
parentd38eb801aa145aedf4b97e8e0bb2e65763aa6149
IB/rxe: Add support for zero-byte operations

The last_psn algorithm fails in the zero-byte case: it calculates
first_psn = N, last_psn = N-1. This makes the operation unretryable since
the res structure will fail the (first_psn <= psn <= last_psn) test in
find_resource().

While here, use BTH_PSN_MASK to mask the calculated last_psn.

Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_resp.c