Thread (10 messages) 10 messages, 3 authors, 2017-09-01

Re: [PATCH 1/2] iwlwifi: fix long debug print

From: Luca Coelho <hidden>
Date: 2017-09-01 05:37:25

On Thu, 2017-08-31 at 14:57 -0700, Joe Perches wrote:
On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
quoted
From: Liad Kaufman <redacted>

There is a debug print that sometimes reaches over
110 chars, thus generating a warning in those cases.
What emits a warning here?
We have a WARN_ON in iwl-devtrace-msg.h:

#define MAX_MSG_LEN	110

DECLARE_EVENT_CLASS(iwlwifi_msg_event,
	TP_PROTO(struct va_format *vaf),
	TP_ARGS(vaf),
	TP_STRUCT__entry(
		__dynamic_array(char, msg, MAX_MSG_LEN)
	),
	TP_fast_assign(
		WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
				       MAX_MSG_LEN, vaf->fmt,
				       *vaf->va) >= MAX_MSG_LEN);
	),
	TP_printk("%s", __get_str(msg))
);

We limit all our tracing messages to 110 bytes.  Anything longer than
that starts getting annoying to read.  In mac80211 we limit it even
further, to 100 bytes, so this is not unique to the iwlwifi driver.

--
Cheers,
Luca.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help