[Openib-windows] some more debug information for WSD

Fabian Tillier ftillier at silverstorm.com
Thu May 25 10:21:11 PDT 2006


Hi Tzachi,

On 5/25/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
>
> Hi Fab
>
> While debugging an issue in WSD I have noticed that it is important to know
> if all packets sent by one side were indeed received by the other side.
>
> The following debug variables (in the patch) help in getting this
> information.

I have really minor nits about the patch that I will put inline below,
but the stuff below didn't preserve the spacing properly, so the
comments really are relative to the attachment.

Please correct and then apply.

Thanks,

- Fab

> Index: ibsp_iblow.c
> ===================================================================
> --- ibsp_iblow.c (revision 356)
> +++ ibsp_iblow.c (working copy)
> @@ -109,6 +109,9 @@
>     InterlockedExchangeAdd64( &g_pm_stat.pdata[BYTES_RECV],
>      lpOverlapped->InternalHigh );
>  #endif
> +#ifdef _DEBUG_
> +  cl_atomic_inc(&g_ibsp.total_recv_compleated);

watch the indentation here, please.  cl_atomic_inc should be tabbed in
one more tab (for a total of 3).

> +#endif
>     break;
>  #ifdef PERFMON_ENABLED
>
> Index: ibspdll.c
> ===================================================================
> --- ibspdll.c (revision 356)
> +++ ibspdll.c (working copy)
> @@ -185,6 +185,12 @@
>
>     IBSP_ERROR( ("  send_count = %d\n", g_ibsp.send_count) );
>
> +   IBSP_ERROR( ("  total_send_count = %d\n", g_ibsp.total_send_count) );
> +
> +   IBSP_ERROR( ("  total_recv_count = %d\n", g_ibsp.total_recv_count) );
> +
> +   IBSP_ERROR( ("  total_recv_compleated = %d\n",
> g_ibsp.total_recv_compleated) );
> +
>     IBSP_ERROR(
>        ("  number of QPs left = %d\n", g_ibsp.qp_num) );
>     IBSP_ERROR(
> @@ -1590,6 +1596,7 @@
>   }
>
>   cl_atomic_inc( &g_ibsp.recv_count );
> + cl_atomic_inc( &g_ibsp.total_recv_count );

Watch for whitespace at the end of the line.  There's an extra tab
that shouldn't be there.

>
>   fzprint(("%s():%d:0x%x:0x%x: ov=0x%p h0=%d h1=%d h1_c=%d send=%d
> recv=%d\n",
>      __FUNCTION__, __LINE__, GetCurrentProcessId(),
> @@ -1825,6 +1832,7 @@
>   }
>
>   cl_atomic_inc( &g_ibsp.send_count );
> + cl_atomic_inc( &g_ibsp.total_send_count );
>
>   fzprint(("%s():%d:0x%x:0x%x: ov=0x%p h0=%d h1=%d h1_c=%d send=%d
> recv=%d\n",
>      __FUNCTION__, __LINE__, GetCurrentProcessId(),
> Index: ibspstruct.h
> ===================================================================
> --- ibspstruct.h (revision 356)
> +++ ibspstruct.h (working copy)
> @@ -464,6 +464,9 @@
>   atomic32_t max_comp_count;
>   atomic32_t send_count;
>   atomic32_t recv_count;
> + atomic32_t total_send_count;
> + atomic32_t total_recv_count;
> + atomic32_t total_recv_compleated;

Watch the trailing whitespace, again a tab at the end of the line.

>   atomic32_t CloseSocket_count;
>  #endif
>  };



More information about the ofw mailing list