From patchwork Wed Apr 3 02:54:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10882591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD93A17E0 for ; Wed, 3 Apr 2019 02:55:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9751C289D2 for ; Wed, 3 Apr 2019 02:55:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B69F289D7; Wed, 3 Apr 2019 02:55:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E42E2289D2 for ; Wed, 3 Apr 2019 02:55:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbfDCCzS (ORCPT ); Tue, 2 Apr 2019 22:55:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfDCCzS (ORCPT ); Tue, 2 Apr 2019 22:55:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09DED30FE5BD; Wed, 3 Apr 2019 02:55:18 +0000 (UTC) Received: from localhost (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57BB96839E; Wed, 3 Apr 2019 02:55:17 +0000 (UTC) From: Honggang Li To: dotanba@gmail.com Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [PATCH] man/ibv_poll_cq.3 add note for "byte_len" field Date: Wed, 3 Apr 2019 10:54:18 +0800 Message-Id: <20190403025418.26863-1-honli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 03 Apr 2019 02:55:18 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Honggang Li --- libibverbs/man/ibv_poll_cq.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libibverbs/man/ibv_poll_cq.3 b/libibverbs/man/ibv_poll_cq.3 index 957fd151495a..db94436f848b 100644 --- a/libibverbs/man/ibv_poll_cq.3 +++ b/libibverbs/man/ibv_poll_cq.3 @@ -30,7 +30,7 @@ uint64_t wr_id; /* ID of the completed Work Request (WR) enum ibv_wc_status status; /* Status of the operation */ enum ibv_wc_opcode opcode; /* Operation type specified in the completed WR */ uint32_t vendor_err; /* Vendor error syndrome */ -uint32_t byte_len; /* Number of bytes transferred */ +uint32_t byte_len; /* Number of bytes received */ union { .in +8 __be32 imm_data; /* Immediate data (in network byte order) */ @@ -78,6 +78,8 @@ found. On failure, a negative value is returned. .PP Each polled completion is removed from the CQ and cannot be returned to it. .PP +ibv_poll_cq will not update the "byte_len" field when the "opcode" of completed WR is IBV_WC_SEND. +.PP The user should consume work completions at a rate that prevents CQ overrun from occurrence. In case of a CQ overrun, the async event .B IBV_EVENT_CQ_ERR