[ofa-general] [PATCH 3/7][v1.2] dapl: add opcode to string function to report opcode during failures.

Patrick Marchand Latifi patrick.latifi at qlogic.com
Mon Jun 23 16:17:31 PDT 2008


minor nit below:

On Fri, Jun 20, 2008 at 11:48:18AM -0700, Davis, Arlin R wrote:
> @@ -485,6 +489,19 @@ bail:
>      return dat_status;
>  }
>  
> +STATIC _INLINE_ char * DAPL_GET_DTO_OP_STR(int op)
> +{
> +    static char *dto_ops[] =
> +    {
> +        "OP_SEND",
> +        "OP_RECEIVE",
> +        "OP_RDMA_WRITE",
> +        "OP_RDMA_READ",
> +        0
> +    };
> +    return ((op < 0 || op > 3) ? "Invalid DTO OP?" : dto_ops[op]);
> +}
> +

the terminating 0 is superfluous here -- if you are out of bounds, you
will return the string "Invalid DTO OP?".  Affects both uDAPL v1 and
v2.

-pat



More information about the general mailing list