From patchwork Sat Jul 7 21:42:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1169021 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8E30240135 for ; Sat, 7 Jul 2012 21:48:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673Ab2GGVm0 (ORCPT ); Sat, 7 Jul 2012 17:42:26 -0400 Received: from nspiron-1.llnl.gov ([128.115.41.81]:54816 "EHLO nspiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970Ab2GGVm0 (ORCPT ); Sat, 7 Jul 2012 17:42:26 -0400 X-Attachments: Received: from eris.llnl.gov (HELO trebuchet.chaos) ([128.115.7.7]) by nspiron-1.llnl.gov with SMTP; 07 Jul 2012 14:42:25 -0700 Date: Sat, 7 Jul 2012 14:42:25 -0700 From: Ira Weiny To: Alex Netes Cc: "linux-rdma@vger.kernel.org" Subject: [PATCH V3] libibumad: update umad_recv man page. Message-Id: <20120707144225.675ef25eca4b65abd2617f32@llnl.gov> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.18.9; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Document the umad_recv length parameter better. Changes since V1: add comments from Hal Changes since V2: Change "should" to "must" Signed-off-by: Ira Weiny --- 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..e4d52fd 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 a pointer to the length of the +.B data +portion of the umad buffer. This means that +.I umad +must point to a buffer at least umad_size() + +.I *length +bytes long. + +.B Note also +that +.I *length\fR +must be >= 256 bytes. + .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 is less than the minimum supported -EIO receive operation failed -EWOULDBLOCK non blocking read can't be fulfilled .SH "SEE ALSO"