netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RDS v1] rds: debug messages are enabled by default
@ 2016-10-27  9:46 shamir.rabinovitch
  2016-10-27 15:42 ` Santosh Shilimkar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: shamir.rabinovitch @ 2016-10-27  9:46 UTC (permalink / raw)
  To: netdev; +Cc: shamir.rabinovitch, santosh.shilimkar, davem

From: shamir rabinovitch <shamir.rabinovitch@oracle.com>

rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
This option cause the rds Makefile to add -DDEBUG to the rds gcc command
line.

When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
include/linux/dynamic_debug.h to decide if dynamic debug prints should
be sent by default to the kernel log.

rds should not enable this macro for production builds. rds dynamic
debug work as expected follow this fix.

Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
---
 net/rds/Makefile |    2 +-
 net/rds/rds.h    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/rds/Makefile b/net/rds/Makefile
index 0e72bec..56c7d27 100644
--- a/net/rds/Makefile
+++ b/net/rds/Makefile
@@ -13,5 +13,5 @@ obj-$(CONFIG_RDS_TCP) += rds_tcp.o
 rds_tcp-y :=		tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
 			tcp_send.o tcp_stats.o
 
-ccflags-$(CONFIG_RDS_DEBUG)	:=	-DDEBUG
+ccflags-$(CONFIG_RDS_DEBUG)	:=	-DRDS_DEBUG
 
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 25532a4..4121e18 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -33,7 +33,7 @@
 #define KERNEL_HAS_ATOMIC64
 #endif
 
-#ifdef DEBUG
+#ifdef RDS_DEBUG
 #define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)
 #else
 /* sigh, pr_debug() causes unused variable warnings */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RDS v1] rds: debug messages are enabled by default
  2016-10-27  9:46 [PATCH RDS v1] rds: debug messages are enabled by default shamir.rabinovitch
@ 2016-10-27 15:42 ` Santosh Shilimkar
  2016-10-27 16:01 ` Wengang
  2016-10-29 19:56 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2016-10-27 15:42 UTC (permalink / raw)
  To: shamir.rabinovitch, netdev; +Cc: davem

On 10/27/2016 2:46 AM, shamir.rabinovitch@oracle.com wrote:
> From: shamir rabinovitch <shamir.rabinovitch@oracle.com>
>
> rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
> This option cause the rds Makefile to add -DDEBUG to the rds gcc command
> line.
>
> When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
> include/linux/dynamic_debug.h to decide if dynamic debug prints should
> be sent by default to the kernel log.
>
> rds should not enable this macro for production builds. rds dynamic
> debug work as expected follow this fix.
>
> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RDS v1] rds: debug messages are enabled by default
  2016-10-27  9:46 [PATCH RDS v1] rds: debug messages are enabled by default shamir.rabinovitch
  2016-10-27 15:42 ` Santosh Shilimkar
@ 2016-10-27 16:01 ` Wengang
  2016-10-29 19:56 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Wengang @ 2016-10-27 16:01 UTC (permalink / raw)
  To: shamir.rabinovitch, netdev; +Cc: santosh.shilimkar, davem

Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com>

thanks,

wengang


On 10/27/2016 2:46 AM, shamir.rabinovitch@oracle.com wrote:
> From: shamir rabinovitch <shamir.rabinovitch@oracle.com>
>
> rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
> This option cause the rds Makefile to add -DDEBUG to the rds gcc command
> line.
>
> When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
> include/linux/dynamic_debug.h to decide if dynamic debug prints should
> be sent by default to the kernel log.
>
> rds should not enable this macro for production builds. rds dynamic
> debug work as expected follow this fix.
>
> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
> ---
>   net/rds/Makefile |    2 +-
>   net/rds/rds.h    |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/rds/Makefile b/net/rds/Makefile
> index 0e72bec..56c7d27 100644
> --- a/net/rds/Makefile
> +++ b/net/rds/Makefile
> @@ -13,5 +13,5 @@ obj-$(CONFIG_RDS_TCP) += rds_tcp.o
>   rds_tcp-y :=		tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
>   			tcp_send.o tcp_stats.o
>   
> -ccflags-$(CONFIG_RDS_DEBUG)	:=	-DDEBUG
> +ccflags-$(CONFIG_RDS_DEBUG)	:=	-DRDS_DEBUG
>   
> diff --git a/net/rds/rds.h b/net/rds/rds.h
> index 25532a4..4121e18 100644
> --- a/net/rds/rds.h
> +++ b/net/rds/rds.h
> @@ -33,7 +33,7 @@
>   #define KERNEL_HAS_ATOMIC64
>   #endif
>   
> -#ifdef DEBUG
> +#ifdef RDS_DEBUG
>   #define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)
>   #else
>   /* sigh, pr_debug() causes unused variable warnings */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RDS v1] rds: debug messages are enabled by default
  2016-10-27  9:46 [PATCH RDS v1] rds: debug messages are enabled by default shamir.rabinovitch
  2016-10-27 15:42 ` Santosh Shilimkar
  2016-10-27 16:01 ` Wengang
@ 2016-10-29 19:56 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-10-29 19:56 UTC (permalink / raw)
  To: shamir.rabinovitch; +Cc: netdev, santosh.shilimkar

From: shamir.rabinovitch@oracle.com
Date: Thu, 27 Oct 2016 05:46:38 -0400

> From: shamir rabinovitch <shamir.rabinovitch@oracle.com>
> 
> rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
> This option cause the rds Makefile to add -DDEBUG to the rds gcc command
> line.
> 
> When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
> include/linux/dynamic_debug.h to decide if dynamic debug prints should
> be sent by default to the kernel log.
> 
> rds should not enable this macro for production builds. rds dynamic
> debug work as expected follow this fix.
> 
> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-29 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27  9:46 [PATCH RDS v1] rds: debug messages are enabled by default shamir.rabinovitch
2016-10-27 15:42 ` Santosh Shilimkar
2016-10-27 16:01 ` Wengang
2016-10-29 19:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).