linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Cc: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] libibumad: update umad_recv man page.
Date: Fri, 29 Jun 2012 10:10:42 -0400	[thread overview]
Message-ID: <4FEDB762.8090603@dev.mellanox.co.il> (raw)
In-Reply-To: <20120628181343.7f931c33.weiny2-i2BcT+NCU+M@public.gmane.org>

On 6/28/2012 9:13 PM, Ira Weiny wrote:
> Document the umad and length parameters better.
> 
> Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
> ---
>  man/umad_recv.3 |   18 +++++++++++++++++-
>  1 files changed, 17 insertions(+), 1 deletions(-)
> 
> diff --git a/man/umad_recv.3 b/man/umad_recv.3
> index e1b2985..3c93c4a 100644
> --- a/man/umad_recv.3
> +++ b/man/umad_recv.3
> @@ -27,10 +27,26 @@ A negative
>  makes the function block until a packet is received. A
>  .I timeout_ms\fR
>  parameter of zero indicates a non blocking read.
> +
> +.B Note
> +.I length
> +is the length of the

is a pointer to the length of the

> +.B data
> +portion of the umad buffer.  This means that
> +.I umad
> +should point to a buffer at least umad_size() +
> +.I length
> +bytes long.
> +
> +.B Note also
> +that
> +.I length\fR
> +must be >= 256 bytes.

I think that this should say "should" rather than "must".

> +
>  .SH "RETURN VALUE"
>  .B umad_recv()
>  returns non negative receiving agentid on success, and a negative value on error as follows:
> - -EINVAL      invalid port handle or agentid
> + -EINVAL      invalid port handle or agentid or length too short

Shouldn't this just be length (pointer) NULL/not supplied (and not
length too short) ?

Length handling is already described in the man page:
"The packet  is  copied  to the  umad buffer if there is sufficient room
and the received length is indicated.  If the buffer is not large
enough, the  size  of  the  umad buffer  needed  is returned in length."

-- Hal

>   -EIO         receive operation failed
>   -EWOULDBLOCK non blocking read can't be fulfilled
>  .SH "SEE ALSO"

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-06-29 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29  1:13 [PATCH] libibumad: update umad_recv man page Ira Weiny
     [not found] ` <20120628181343.7f931c33.weiny2-i2BcT+NCU+M@public.gmane.org>
2012-06-29 14:10   ` Hal Rosenstock [this message]
     [not found]     ` <4FEDB762.8090603-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-06-29 16:23       ` Ira Weiny
     [not found]         ` <20120629092343.6119ad47.weiny2-i2BcT+NCU+M@public.gmane.org>
2012-06-29 22:22           ` Hal Rosenstock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FEDB762.8090603@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).