From patchwork Sat Jan 16 15:53:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8049191 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B92C59F716 for ; Sat, 16 Jan 2016 15:56:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C920520357 for ; Sat, 16 Jan 2016 15:56:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E55CC2034C for ; Sat, 16 Jan 2016 15:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbcAPP4e (ORCPT ); Sat, 16 Jan 2016 10:56:34 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36440 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbcAPP4V (ORCPT ); Sat, 16 Jan 2016 10:56:21 -0500 Received: by mail-wm0-f48.google.com with SMTP id l65so53194714wmf.1 for ; Sat, 16 Jan 2016 07:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ocIO0GCWx9dJv05VNoCP+WNtcqbPzhQV3HW8zctzAJw=; b=ngBsDi/K8MQwasyQBgWZKCx1D+VoZWI+NukvDdAacA1Und3qES/fKYybFEhZxzNZA9 DXhaURnH2VLDOVHWA48XZg6gdtHC+J8OxlstddKwlUpeObJjahUCRzXn0KXx8bz/TBOK 1hsTdo/X+vCg9/yuhAkvH3UbACdRFTjugPeerhOWoc+uTQV7anmWg9GjbpWhQAa2xvLt YpQYvWmRfu5NrqbC5PVRu4IV1KWapIBEwFBAMAwmEozd2PmDvKyuvYX0VWrDRQbIHxFW ykbP4m8PfAlPNFAoAKMWkHbmgaUrK68s1iSQYc/jqXSBLkN6WGLrVbhXPU9nXgn5T6M+ 9EyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ocIO0GCWx9dJv05VNoCP+WNtcqbPzhQV3HW8zctzAJw=; b=M0hhiaXHW6kCKxHeb9MTpDBf0HACYm9Pvq1KyLfApJAGL9ldRODdf/OymimBnsCfRz 6l0WaSU6rKP4irYpQ0Xz8HHXjC9F1WIsSzAO0zpTv/8zTlo1aVEYyfQhvyBILnJnkPh6 /7+2AdEQ3/0pxnMpWQtM40z1sj21MKBE8aFrhnippzr5bqRa+5jiD9YQ6MRSgl668vcp ROvT4rYOdiJFwSJ1riJCErg66fM3KQC3vES01vyOEcpUl3bKQfNv6fNvloXL+Tj52H3c oXR3lNQIHiX8LALOMaWaTcioivixA6uYSrkhp6TaPVU+RoRV5qghSgDGTDGPpKg7NfM1 e14A== X-Gm-Message-State: AG10YORU/1dYQR7bg9uakKDyDF7oR4Gax4qEhQeqE9MqaA1Ib3pp0rsz5OjkoYjpl2DuTQ== X-Received: by 10.28.213.204 with SMTP id m195mr4500875wmg.53.1452959780343; Sat, 16 Jan 2016 07:56:20 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id e2sm8786170wma.1.2016.01.16.07.56.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Jan 2016 07:56:19 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH libibverbs V1 1/5] Add CQ ignore overrun flag Date: Sat, 16 Jan 2016 17:53:40 +0200 Message-Id: <1452959624-29454-2-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452959624-29454-1-git-send-email-leon@leon.nu> References: <1452959624-29454-1-git-send-email-leon@leon.nu> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky A CQ overrun is checked while posting a completion, and if encountered, the QP is transferred to the appropriate error state. CQ update (and error discovery) are not synchronized with WQE execution. In cross-channel mode, the send/receive queues will forward their completions to managing QP. Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg --- include/infiniband/verbs.h | 1 + man/ibv_create_cq_ex.3 | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index c3e863850d4e..466d779592bf 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -1207,6 +1207,7 @@ enum ibv_create_cq_attr { enum ibv_create_cq_attr_flags { IBV_CREATE_CQ_ATTR_COMPLETION_TIMESTAMP = 1 << 0, + IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN = 1 << 1 }; struct ibv_create_cq_attr_ex { diff --git a/man/ibv_create_cq_ex.3 b/man/ibv_create_cq_ex.3 index 9f9e049b0d43..f01a5513926b 100644 --- a/man/ibv_create_cq_ex.3 +++ b/man/ibv_create_cq_ex.3 @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.TH IBV_CREATE_CQ_EX 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual" +.TH IBV_CREATE_CQ_EX 3 2015-12-27 libibverbs "Libibverbs Programmer's Manual" .SH "NAME" ibv_create_cq_ex \- create a completion queue (CQ) .SH "SYNOPSIS" @@ -42,13 +42,19 @@ enum ibv_wc_flags_ex { IBV_WC_EX_WITH_SLID = 1 << 7, /* Require slid in WC */ IBV_WC_EX_WITH_SL = 1 << 8, /* Require sl in WC */ IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 9, /* Require dlid path bits in WC */ - IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 10, /* Require completion timestamp in WC /* + IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 10, /* Require completion timestamp in WC */ }; +enum ibv_create_cq_attr_flags { + IBV_CREATE_CQ_ATTR_COMPLETION_TIMESTAMP = 1 << 0, + IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN = 1 << 1 /* Ignore completion queue overrun errors */ +}; enum ibv_create_cq_attr { - IBV_CREATE_CQ_ATTR_FLAGS = 1 << 0, + IBV_CREATE_CQ_ATTR_FLAGS = 1 << 0, + IBV_CREATE_CQ_ATTR_RESERVED = 1 << 1 }; + .SH "RETURN VALUE" .B ibv_create_cq_ex() returns a pointer to the CQ, or NULL if the request fails. @@ -68,4 +74,8 @@ CQ should be destroyed with ibv_destroy_cq. .BR ibv_create_qp (3) .SH "AUTHORS" .TP -Matan Barak +Matan Barak +.RI < matanb@mellanox.com > +.TP +Leon Romanovsky +.RI < leonro@mellanox.com >