Message ID | 1492212538-32459-6-git-send-email-dasaratharaman.chandramouli@intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Fri, Apr 14, 2017 at 07:28:45PM -0400, Dasaratharaman Chandramouli wrote: > Zero out ib_ah_attr before calling query_ah. Set ah_flags > appropriately. > > Reviewed-by: Ira Weiny <ira.weiny@intel.com> > Reviewed-by: Don Hiatt <don.hiatt@intel.com> > Reviewed-by: Sean Hefty <sean.hefty@intel.com> > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> > --- > drivers/infiniband/sw/rxe/rxe_av.c | 1 + > drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + > 2 files changed, 2 insertions(+) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c index 604f6fe..88a4a7f 100644 --- a/drivers/infiniband/sw/rxe/rxe_av.c +++ b/drivers/infiniband/sw/rxe/rxe_av.c @@ -69,6 +69,7 @@ int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av, struct ib_ah_attr *attr) { memcpy(&attr->grh, &av->grh, sizeof(av->grh)); + attr->ah_flags = IB_AH_GRH; attr->port_num = av->port_num; return 0; } diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 5113e50..379899f 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -376,6 +376,7 @@ static int rxe_query_ah(struct ib_ah *ibah, struct ib_ah_attr *attr) struct rxe_dev *rxe = to_rdev(ibah->device); struct rxe_ah *ah = to_rah(ibah); + memset(attr, 0, sizeof(*attr)); rxe_av_to_attr(rxe, &ah->av, attr); return 0; }