RDMA/uverbs: Add a simple iterator interface for reading the command
authorJason Gunthorpe <jgg@mellanox.com>
Sun, 25 Nov 2018 18:58:42 +0000 (20:58 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 3 Dec 2018 17:01:58 +0000 (12:01 -0500)
commit335708c751c1462b674892212e965fdde4c9b0d9
treeb1b45198edfe15db4a5172a2ea2b81ac7b4be81a
parent7eebced1bae034e11a86c454383b24715eb087b6
RDMA/uverbs: Add a simple iterator interface for reading the command

Several methods have a command with a trailing flex array, and they
all open code some extraction scheme. Centralize this into a simple
iterator API.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c