Skip to content

Commit

Permalink
IB/rxe: Initialize ib_ah_attr during query_ah
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Dasaratharaman Chandramouli authored and Doug Ledford committed May 1, 2017
1 parent 4ba6609 commit eca7ddf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/sw/rxe/rxe_av.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/infiniband/sw/rxe/rxe_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,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;
}
Expand Down

0 comments on commit eca7ddf

Please sign in to comment.