diff mbox

libibmad/src/rpc.c: Remove superfluous packet dump

Message ID 1420848359.21271.198.camel@auk59.llnl.gov (mailing list archive)
State Accepted, archived
Delegated to: Ira Weiny
Headers show

Commit Message

Al Chu Jan. 10, 2015, 12:05 a.m. UTC
When idebug is >= 1, mad_rpc and mad_rpc_rmpp output only
the mad data response in debug output.  It does not output
the request mad data.  This is confusing since it's not clear
if it's request or response output.

When idebug > 1, full mad send and receive buffers are
output, which makes the mad data output with idebug == 1
superfluous.  Remove this output to remove confusion.

Signed-off-by: Albert Chu <chu11@llnl.gov>
---
 src/rpc.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

Comments

Ira Weiny Jan. 10, 2015, 1 a.m. UTC | #1
> 
> When idebug is >= 1, mad_rpc and mad_rpc_rmpp output only the mad data
> response in debug output.  It does not output the request mad data.  This is
> confusing since it's not clear if it's request or response output.
> 
> When idebug > 1, full mad send and receive buffers are output, which makes
> the mad data output with idebug == 1 superfluous.  Remove this output to
> remove confusion.
> 
> Signed-off-by: Albert Chu <chu11@llnl.gov>

Thanks applied.

Ira


> ---
>  src/rpc.c |   11 -----------
>  1 files changed, 0 insertions(+), 11 deletions(-)
> 
> diff --git a/src/rpc.c b/src/rpc.c
> index 8d961f2..f286af7 100644
> --- a/src/rpc.c
> +++ b/src/rpc.c
> @@ -272,11 +272,6 @@ void *mad_rpc(const struct ibmad_port *port,
> ib_rpc_t * rpc,
>  		return NULL;
>  	}
> 
> -	if (ibdebug) {
> -		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
> -		xdump(stderr, "mad data\n", mad + rpc->dataoffs, rpc-
> >datasz);
> -	}
> -
>  	if (rcvdata)
>  		memcpy(rcvdata, mad + rpc->dataoffs, rpc->datasz);
> 
> @@ -322,12 +317,6 @@ void *mad_rpc_rmpp(const struct ibmad_port *port,
> ib_rpc_t * rpc,
>  		return NULL;
>  	}
> 
> -	if (ibdebug) {
> -		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
> -		xdump(stderr, "rmpp mad data\n", mad + rpc->dataoffs,
> -		      rpc->datasz);
> -	}
> -
>  	if (rmpp) {
>  		rmpp->flags = mad_get_field(mad, 0, IB_SA_RMPP_FLAGS_F);
>  		if ((rmpp->flags & 0x3) &&
> --
> 1.7.1
> 
> 
> 
> --
> 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
--
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 mbox

Patch

diff --git a/src/rpc.c b/src/rpc.c
index 8d961f2..f286af7 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -272,11 +272,6 @@  void *mad_rpc(const struct ibmad_port *port, ib_rpc_t * rpc,
 		return NULL;
 	}
 
-	if (ibdebug) {
-		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
-		xdump(stderr, "mad data\n", mad + rpc->dataoffs, rpc->datasz);
-	}
-
 	if (rcvdata)
 		memcpy(rcvdata, mad + rpc->dataoffs, rpc->datasz);
 
@@ -322,12 +317,6 @@  void *mad_rpc_rmpp(const struct ibmad_port *port, ib_rpc_t * rpc,
 		return NULL;
 	}
 
-	if (ibdebug) {
-		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
-		xdump(stderr, "rmpp mad data\n", mad + rpc->dataoffs,
-		      rpc->datasz);
-	}
-
 	if (rmpp) {
 		rmpp->flags = mad_get_field(mad, 0, IB_SA_RMPP_FLAGS_F);
 		if ((rmpp->flags & 0x3) &&