Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76ca70fa authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: [Debug] change verbosity of some prints



There are some debug prints (mostly iov/statistics related) which clobber
system logs whenever their verbosity level is set for an interface.
This patch puts harsher verbosity requirements for such debug prints to be
printed.

Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8bed1285
Loading
Loading
Loading
Loading
+13 −4
Original line number Original line Diff line number Diff line
@@ -75,13 +75,22 @@ enum bnx2x_int_mode {
#define BNX2X_MSG_DCB			0x8000000
#define BNX2X_MSG_DCB			0x8000000


/* regular debug print */
/* regular debug print */
#define DP(__mask, fmt, ...)					\
#define DP_INNER(fmt, ...)					\
do {								\
	if (unlikely(bp->msg_enable & (__mask)))		\
	pr_notice("[%s:%d(%s)]" fmt,				\
	pr_notice("[%s:%d(%s)]" fmt,				\
		  __func__, __LINE__,				\
		  __func__, __LINE__,				\
		  bp->dev ? (bp->dev->name) : "?",		\
		  bp->dev ? (bp->dev->name) : "?",		\
			  ##__VA_ARGS__);			\
		  ##__VA_ARGS__);

#define DP(__mask, fmt, ...)					\
do {								\
	if (unlikely(bp->msg_enable & (__mask)))		\
		DP_INNER(fmt, ##__VA_ARGS__);			\
} while (0)

#define DP_AND(__mask, fmt, ...)				\
do {								\
	if (unlikely((bp->msg_enable & (__mask)) == __mask))	\
		DP_INNER(fmt, ##__VA_ARGS__);			\
} while (0)
} while (0)


#define DP_CONT(__mask, fmt, ...)				\
#define DP_CONT(__mask, fmt, ...)				\
+3 −3
Original line number Original line Diff line number Diff line
@@ -5221,7 +5221,7 @@ static void bnx2x_eq_int(struct bnx2x *bp)
			continue;
			continue;


		case EVENT_RING_OPCODE_STAT_QUERY:
		case EVENT_RING_OPCODE_STAT_QUERY:
			DP(BNX2X_MSG_SP | BNX2X_MSG_STATS,
			DP_AND((BNX2X_MSG_SP | BNX2X_MSG_STATS),
			       "got statistics comp event %d\n",
			       "got statistics comp event %d\n",
			       bp->stats_comp++);
			       bp->stats_comp++);
			/* nothing to do with stats comp */
			/* nothing to do with stats comp */
+9 −8
Original line number Original line Diff line number Diff line
@@ -2527,7 +2527,7 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
	first_queue_query_index = BNX2X_FIRST_QUEUE_QUERY_IDX -
	first_queue_query_index = BNX2X_FIRST_QUEUE_QUERY_IDX -
		(is_fcoe ? 0 : 1);
		(is_fcoe ? 0 : 1);


	DP(BNX2X_MSG_IOV,
	DP_AND((BNX2X_MSG_IOV | BNX2X_MSG_STATS),
	       "BNX2X_NUM_ETH_QUEUES %d, is_fcoe %d, first_queue_query_index %d => determined the last non virtual statistics query index is %d. Will add queries on top of that\n",
	       "BNX2X_NUM_ETH_QUEUES %d, is_fcoe %d, first_queue_query_index %d => determined the last non virtual statistics query index is %d. Will add queries on top of that\n",
	       BNX2X_NUM_ETH_QUEUES(bp), is_fcoe, first_queue_query_index,
	       BNX2X_NUM_ETH_QUEUES(bp), is_fcoe, first_queue_query_index,
	       first_queue_query_index + num_queues_req);
	       first_queue_query_index + num_queues_req);
@@ -2544,7 +2544,7 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
		struct bnx2x_virtf *vf = BP_VF(bp, i);
		struct bnx2x_virtf *vf = BP_VF(bp, i);


		if (vf->state != VF_ENABLED) {
		if (vf->state != VF_ENABLED) {
			DP(BNX2X_MSG_IOV,
			DP_AND((BNX2X_MSG_IOV | BNX2X_MSG_STATS),
			       "vf %d not enabled so no stats for it\n",
			       "vf %d not enabled so no stats for it\n",
			       vf->abs_vfid);
			       vf->abs_vfid);
			continue;
			continue;
@@ -2597,7 +2597,8 @@ void bnx2x_iov_sp_task(struct bnx2x *bp)
	/* Iterate over all VFs and invoke state transition for VFs with
	/* Iterate over all VFs and invoke state transition for VFs with
	 * 'in-progress' slow-path operations
	 * 'in-progress' slow-path operations
	 */
	 */
	DP(BNX2X_MSG_IOV, "searching for pending vf operations\n");
	DP_AND((BNX2X_MSG_IOV | BNX2X_MSG_SP),
	       "searching for pending vf operations\n");
	for_each_vf(bp, i) {
	for_each_vf(bp, i) {
		struct bnx2x_virtf *vf = BP_VF(bp, i);
		struct bnx2x_virtf *vf = BP_VF(bp, i);