Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/rxe: Initialize ib_ah_attr during query_ah

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>

authored by

Dasaratharaman Chandramouli and committed by
Doug Ledford
eca7ddf9 4ba66093

+2
+1
drivers/infiniband/sw/rxe/rxe_av.c
··· 69 69 struct ib_ah_attr *attr) 70 70 { 71 71 memcpy(&attr->grh, &av->grh, sizeof(av->grh)); 72 + attr->ah_flags = IB_AH_GRH; 72 73 attr->port_num = av->port_num; 73 74 return 0; 74 75 }
+1
drivers/infiniband/sw/rxe/rxe_verbs.c
··· 378 378 struct rxe_dev *rxe = to_rdev(ibah->device); 379 379 struct rxe_ah *ah = to_rah(ibah); 380 380 381 + memset(attr, 0, sizeof(*attr)); 381 382 rxe_av_to_attr(rxe, &ah->av, attr); 382 383 return 0; 383 384 }