diff options
author | Bob Pearson <rpearsonhpe@gmail.com> | 2021-10-07 15:40:51 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-12 13:25:26 -0300 |
commit | e2fe06c9080694f2c28894f14ef8ebfd923ac94d (patch) | |
tree | e0d5c26f9af0eac76c94e2d0657f704fb8b3a4a2 /drivers/infiniband/sw/rxe/rxe_req.c | |
parent | RDMA/rxe: Replace ah->pd by ah->ibah.pd (diff) | |
download | linux-dev-e2fe06c9080694f2c28894f14ef8ebfd923ac94d.tar.xz linux-dev-e2fe06c9080694f2c28894f14ef8ebfd923ac94d.zip |
RDMA/rxe: Lookup kernel AH from ah index in UD WQEs
Add code to rxe_get_av in rxe_av.c to use the AH index in UD send WQEs to
lookup the kernel AH. For old user providers continue to use the AV passed
in WQEs. Move setting pkt->rxe to before the call to rxe_get_av() to get
access to the AH pool.
Link: https://lore.kernel.org/r/20211007204051.10086-6-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_req.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_req.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index fe275fcaffbd..0c9d2af15f3d 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -379,9 +379,8 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, /* length from start of bth to end of icrc */ paylen = rxe_opcode[opcode].length + payload + pad + RXE_ICRC_SIZE; - /* pkt->hdr, rxe, port_num and mask are initialized in ifc - * layer - */ + /* pkt->hdr, port_num and mask are initialized in ifc layer */ + pkt->rxe = rxe; pkt->opcode = opcode; pkt->qp = qp; pkt->psn = qp->req.psn; @@ -391,6 +390,9 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, /* init skb */ av = rxe_get_av(pkt); + if (!av) + return NULL; + skb = rxe_init_packet(rxe, av, paylen, pkt); if (unlikely(!skb)) return NULL; |