From patchwork Fri Feb 22 16:48:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 2176491 X-Patchwork-Delegate: hal@mellanox.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 BAFFD3FCFC for ; Fri, 22 Feb 2013 16:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758050Ab3BVQsU (ORCPT ); Fri, 22 Feb 2013 11:48:20 -0500 Received: from prdiron-3.llnl.gov ([128.15.143.173]:14497 "EHLO prdiron-3.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757921Ab3BVQsU (ORCPT ); Fri, 22 Feb 2013 11:48:20 -0500 X-Attachments: Received: from eris.llnl.gov (HELO trebuchet.chaos) ([128.115.7.7]) by prdiron-3.llnl.gov with SMTP; 22 Feb 2013 08:48:19 -0800 Date: Fri, 22 Feb 2013 08:48:19 -0800 From: Ira Weiny To: Hal Rosenstock Cc: "linux-rdma@vger.kernel.org" Subject: [PATCH] libibumad: update umad_[send|recv] man pages to document how rmpp is handled Message-Id: <20130222084819.ce49c620e5b46aa829395241@llnl.gov> X-Mailer: Sylpheed 3.3.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 Signed-off-by: Ira Weiny --- man/umad_recv.3 | 17 ++++++++++++++--- man/umad_send.3 | 8 ++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/man/umad_recv.3 b/man/umad_recv.3 index e4d52fd..e233411 100644 --- a/man/umad_recv.3 +++ b/man/umad_recv.3 @@ -13,9 +13,18 @@ umad_recv \- receive umad .B umad_recv() waits up to .I timeout_ms\fR -milliseconds for a packet to be received from the port specified by +milliseconds for an incoming MAD message to be received from the port specified by .I portid\fR. -The packet is copied to the + +A MAD "message" consists of a single MAD packet +.I or +a coalesced multipacket RMPP transmission. In the RMPP case the header of the +first RMPP packet is returned as the header of the buffer and the buffer data +contains the coalesced data section of each subsequent RMPP MAD packet within +the transmission. Thus all the RMPP headers except the first are not copied to +user space from the kernel. + +The message is copied to the .I umad\fR buffer if there is sufficient room and the received .I length\fR is indicated. @@ -41,7 +50,8 @@ bytes long. .B Note also that .I *length\fR -must be >= 256 bytes. +must be >= 256 bytes. This length allows for at least a single MAD packet to +be returned. .SH "RETURN VALUE" .B umad_recv() @@ -49,6 +59,7 @@ returns non negative receiving agentid on success, and a negative value on error -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 + -ENOSPC The provided buffer is not long enough for the complete message. .SH "SEE ALSO" .BR umad_poll (3) .SH "AUTHOR" diff --git a/man/umad_send.3 b/man/umad_send.3 index f3158cb..feb33af 100644 --- a/man/umad_send.3 +++ b/man/umad_send.3 @@ -19,6 +19,14 @@ buffer from the port specified by .I portid\fR, and using the agent specified by .I agentid\fR. + +The buffer can contain a RMPP transmission which is larger than a single MAD +packet when the agentid specifies a class which utilizes RMPP and the header +flags indicate RMPP is active. NOTE currently only RMPPFlags.Active is +meaningful in the header in user space. All other RMPP fields are ignored. +The data section of the buffer will be sent in multiple RMPP MAD packets with +headers built for the user. + .I timeout_ms\fR controls the solicited MADs behavior as follows: zero value means not solicited. Positive value makes kernel indicate timeout