Message ID | 1474495729-17604-5-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On 9/22/2016 1:08 AM, Jason Gunthorpe wrote: > Simply enable -D flags when building. > > Use as: > $ cmake -DMLX5_DEBUG=TRUE -DMLX5_MW_DEBUG=TRUE The patch works fine for those symbols, thanks. Need to consider whether there are other symbols in the original repositories that require similar patch. (e.g. valgrind, resolve-neigh, etc.) > Reported-by: Yishai Hadas <yishaih@dev.mellanox.co.il> > Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> > --- > libmlx5/src/CMakeLists.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/libmlx5/src/CMakeLists.txt b/libmlx5/src/CMakeLists.txt > index a34a8063eeb2..44df83b47d96 100644 > --- a/libmlx5/src/CMakeLists.txt > +++ b/libmlx5/src/CMakeLists.txt > @@ -1,3 +1,15 @@ > +set(MLX5_DEBUG "FALSE" CACHE BOOL > + "Enable expensive runtime logging options for the mlx5 verbs provider") > +if (MLX5_DEBUG) > + add_definitions("-DMLX5_DEBUG") > +endif() > + > +set(MLX5_MW_DEBUG "FALSE" CACHE BOOL > + "Enable extra validation of memory windows for the mlx5 verbs provider") > +if (MLX5_MW_DEBUG) > + add_definitions("-DMW_DEBUG") > +endif() > + > rdma_provider(mlx5 > buf.c > cq.c > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> Need to consider whether there are other symbols in the original > repositories that require similar patch. (e.g. valgrind, resolve-neigh, > etc.) Those two are taken care of already. However, I'm of the opinion we should drop !resolve-neigh and nl1 as a compile time option. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/libmlx5/src/CMakeLists.txt b/libmlx5/src/CMakeLists.txt index a34a8063eeb2..44df83b47d96 100644 --- a/libmlx5/src/CMakeLists.txt +++ b/libmlx5/src/CMakeLists.txt @@ -1,3 +1,15 @@ +set(MLX5_DEBUG "FALSE" CACHE BOOL + "Enable expensive runtime logging options for the mlx5 verbs provider") +if (MLX5_DEBUG) + add_definitions("-DMLX5_DEBUG") +endif() + +set(MLX5_MW_DEBUG "FALSE" CACHE BOOL + "Enable extra validation of memory windows for the mlx5 verbs provider") +if (MLX5_MW_DEBUG) + add_definitions("-DMW_DEBUG") +endif() + rdma_provider(mlx5 buf.c cq.c
Simply enable -D flags when building. Use as: $ cmake -DMLX5_DEBUG=TRUE -DMLX5_MW_DEBUG=TRUE Reported-by: Yishai Hadas <yishaih@dev.mellanox.co.il> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- libmlx5/src/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)