diff options
author | Dotan Barak <dotanb@dev.mellanox.co.il> | 2007-08-08 16:27:08 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-08-13 08:54:29 -0700 |
commit | 831308e0eebda1097a8eddeb20625281fa0f88cf (patch) | |
tree | 60e326b03f7c47cee066b8ad446b835cc6c1f4ac | |
parent | 67a2703ed831328fc79ed7c4766163cb7200c081 (diff) |
Initialize reserved attributes in modify QP commandstable-1.0
Initialize the reserved attributes in modify QP command to eliminate
valgrind warnings like:
==23549== Syscall param write(buf) points to uninitialised byte(s)
==23549== at 0x316B1B933F: (within /lib64/tls/libc-2.3.4.so)
==23549== by 0x4A33AF7: ibv_cmd_modify_qp (cmd.c:782)
==23549== by 0x4F860D8: mlx4_modify_qp (verbs.c:480)
==23549== by 0x4A37A53: ibv_modify_qp@@IBVERBS_1.1 (verbs.c:441)
==23549== by 0x40972E: qp_reset_to_rtr (mr_test_fun.c:1189)
==23549== by 0x403AFC: mr_test_connect_qp (mr_test.c:232)
==23549== by 0x404956: do_test (mr_test.c:85)
==23549== by 0x402DF8: main (main.c:448)
==23549== Address 0x7FEFFF2AE is on thread 1's stack
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
(cherry picked from commit d5052fa0bf8180be9edf1c4c1c014dde01f8a4dd)
-rw-r--r-- | src/cmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -747,6 +747,7 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, memcpy(cmd->dest.dgid, attr->ah_attr.grh.dgid.raw, 16); cmd->dest.flow_label = attr->ah_attr.grh.flow_label; cmd->dest.dlid = attr->ah_attr.dlid; + cmd->dest.reserved = 0; cmd->dest.sgid_index = attr->ah_attr.grh.sgid_index; cmd->dest.hop_limit = attr->ah_attr.grh.hop_limit; cmd->dest.traffic_class = attr->ah_attr.grh.traffic_class; @@ -759,6 +760,7 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, memcpy(cmd->alt_dest.dgid, attr->alt_ah_attr.grh.dgid.raw, 16); cmd->alt_dest.flow_label = attr->alt_ah_attr.grh.flow_label; cmd->alt_dest.dlid = attr->alt_ah_attr.dlid; + cmd->alt_dest.reserved = 0; cmd->alt_dest.sgid_index = attr->alt_ah_attr.grh.sgid_index; cmd->alt_dest.hop_limit = attr->alt_ah_attr.grh.hop_limit; cmd->alt_dest.traffic_class = attr->alt_ah_attr.grh.traffic_class; |