Skip to content

Commit dcf315b

Browse files
Rafi Wienerigor-ivanov
authored andcommitted
issue: 1718617 Update valgrind suppression file
This commit updates the ignore file and adds macros to remove false positive errors when running vma with debug log verbosity. Signed-off-by: Rafi Wiener <[email protected]>
1 parent 4728cde commit dcf315b

File tree

6 files changed

+45
-8
lines changed

6 files changed

+45
-8
lines changed

contrib/valgrind/valgrind_vma.supp

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,22 @@
101101
...
102102
fun:rdma_destroy_id
103103
}
104-
104+
{
105+
rdma_create_event_channel
106+
Memcheck:Cond
107+
obj:/*librdmacm.so*
108+
...
109+
fun:rdma_create_event_channel
110+
fun:_ZN15neigh_table_mgrC1Ev
111+
}
112+
{
113+
rdma_create_event_channel
114+
Memcheck:Value8
115+
obj:/*librdmacm.so*
116+
...
117+
fun:rdma_create_event_channel
118+
fun:_ZN15neigh_table_mgrC1Ev
119+
}
105120
# false positive verbs
106121
{
107122
libibverbs Param ibv_exp_cmd_create_qp
@@ -297,6 +312,25 @@
297312
...
298313
fun:*release_ringEP21ring_alloc_logic_attr*
299314
}
315+
{
316+
query mlx5 device
317+
Memcheck:Cond
318+
fun:ibv_exp_cmd_query_device
319+
fun:mlx5_exp_query_device
320+
}
321+
{
322+
mlx5_lock_cqs
323+
Memcheck:Cond
324+
fun:mlx5_lock_cqs
325+
fun:mlx5_destroy_qp
326+
}
327+
{
328+
mlx5_unlock_cqs
329+
Memcheck:Cond
330+
fun:mlx5_unlock_cqs
331+
fun:mlx5_destroy_qp
332+
}
333+
300334
###########################################################
301335
##### libmlx4 only
302336
{

src/vma/dev/cq_mgr_mlx5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ void cq_mgr_mlx5::set_qp_rq(qp_mgr* qp)
781781
if (0 != vma_ib_mlx5_get_cq(m_p_ibv_cq, &m_mlx5_cq)) {
782782
cq_logpanic("vma_ib_mlx5_get_cq failed (errno=%d %m)", errno);
783783
}
784-
784+
VALGRIND_MAKE_MEM_DEFINED(&m_mlx5_cq, sizeof(m_mlx5_cq));
785785
cq_logfunc("qp_mgr=%p m_mlx5_cq.dbrec=%p m_mlx5_cq.cq_buf=%p", m_qp, m_mlx5_cq.dbrec, m_mlx5_cq.cq_buf);
786786
}
787787

src/vma/dev/ib_ctx_handler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ bool ib_ctx_handler::is_active(int port_num)
350350
ibch_logdbg("ibv_query_port failed on ibv device %p, port %d "
351351
"(errno=%d)", m_p_ibv_context, port_num, errno);
352352
}ENDIF_VERBS_FAILURE;
353+
VALGRIND_MAKE_MEM_DEFINED(&port_attr.state, sizeof(port_attr.state));
353354
return port_attr.state == IBV_PORT_ACTIVE;
354355
}
355356

src/vma/dev/qp_mgr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "buffer_pool.h"
4040
#include "cq_mgr.h"
4141
#include "ring_simple.h"
42+
#include "util/valgrind.h"
4243

4344
#undef MODULE_NAME
4445
#define MODULE_NAME "qpm"
@@ -621,6 +622,7 @@ int qp_mgr_eth::prepare_ibv_qp(vma_ibv_qp_init_attr& qp_init_attr)
621622
qp_logerr("ibv_query_qp failed (errno=%d %m)", errno);
622623
return -1;
623624
} ENDIF_VERBS_FAILURE;
625+
VALGRIND_MAKE_MEM_DEFINED(&tmp_ibv_qp_attr, sizeof(tmp_ibv_qp_attr));
624626
uint32_t tx_max_inline = safe_mce_sys().tx_max_inline;
625627
m_max_inline_data = min(tmp_ibv_qp_attr.cap.max_inline_data, tx_max_inline);
626628
qp_logdbg("requested max inline = %d QP, actual max inline = %d, "

src/vma/ib/mlx5/ib_mlx5.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#ifdef HAVE_CONFIG_H
3434
#include "config.h"
3535
#endif
36-
36+
#include "util/valgrind.h"
3737
#if defined(DEFINED_DIRECT_VERBS)
3838

3939
#include "vma/util/valgrind.h"
@@ -59,7 +59,7 @@ int vma_ib_mlx5_get_qp(struct ibv_qp *qp, vma_ib_mlx5_qp_t *mlx5_qp, uint32_t fl
5959
if (ret != 0) {
6060
goto out;
6161
}
62-
62+
VALGRIND_MAKE_MEM_DEFINED(&dqp, sizeof(dqp));
6363
mlx5_qp->qp = qp;
6464
mlx5_qp->qpn = qp->qp_num;
6565
mlx5_qp->flags = flags;
@@ -120,7 +120,7 @@ int vma_ib_mlx5_get_cq(struct ibv_cq *cq, vma_ib_mlx5_cq_t *mlx5_cq)
120120
if (ret != 0) {
121121
return ret;
122122
}
123-
123+
VALGRIND_MAKE_MEM_DEFINED(&dcq, sizeof(dcq));
124124
mlx5_cq->cq = cq;
125125
mlx5_cq->cq_num = dcq.cqn;
126126
mlx5_cq->cq_ci = 0;

src/vma/ib/mlx5/ib_mlx5_hw.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#ifdef HAVE_CONFIG_H
3434
#include "config.h"
3535
#endif
36-
36+
#include "util/valgrind.h"
3737
#if defined(DEFINED_DIRECT_VERBS) && (DEFINED_DIRECT_VERBS == 2)
3838

3939
#include "vma/ib/mlx5/ib_mlx5.h"
@@ -67,7 +67,7 @@ static int vma_ib_mlx5dv_get_qp(struct ibv_qp *qp, struct mlx5dv_qp *mlx5_qp)
6767
if (ret != 0) {
6868
return ret;
6969
}
70-
70+
VALGRIND_MAKE_MEM_DEFINED(&ibv_qp_info, sizeof(ibv_qp_info));
7171
mlx5_qp->dbrec = ibv_qp_info.dbrec;
7272
mlx5_qp->sq.buf = (mqp->sq_buf_size ?
7373
(void *)((uintptr_t)mqp->sq_buf.buf) : /* IBV_QPT_RAW_PACKET or Underly QP */
@@ -92,7 +92,7 @@ static int vma_ib_mlx5dv_get_cq(struct ibv_cq *cq, struct mlx5dv_cq *mlx5_cq)
9292
if (ret != 0) {
9393
return ret;
9494
}
95-
95+
VALGRIND_MAKE_MEM_DEFINED(&ibv_cq_info, sizeof(ibv_cq_info));
9696
mlx5_cq->buf = ibv_cq_info.buf;
9797
mlx5_cq->dbrec = ibv_cq_info.dbrec;
9898
mlx5_cq->cqe_cnt = ibv_cq_info.cqe_cnt;

0 commit comments

Comments
 (0)