From patchwork Tue Mar 14 11:15:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9623051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B6C160522 for ; Tue, 14 Mar 2017 11:16:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BC4F2838E for ; Tue, 14 Mar 2017 11:16:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10B0D2852E; Tue, 14 Mar 2017 11:16:29 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 957D8283FD for ; Tue, 14 Mar 2017 11:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750869AbdCNLQ1 (ORCPT ); Tue, 14 Mar 2017 07:16:27 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:49013 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750964AbdCNLQX (ORCPT ); Tue, 14 Mar 2017 07:16:23 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 14 Mar 2017 13:16:16 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v2EBGGwt014214; Tue, 14 Mar 2017 13:16:16 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v2EBGGlZ029158; Tue, 14 Mar 2017 13:16:16 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v2EBGGoB029157; Tue, 14 Mar 2017 13:16:16 +0200 From: Yishai Hadas To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, yishaih@mellanox.com, noaos@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 6/7] ibverbs: Update man pages to include cvlan offloads options Date: Tue, 14 Mar 2017 13:15:42 +0200 Message-Id: <1489490143-29018-7-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1489490143-29018-1-git-send-email-yishaih@mellanox.com> References: <1489490143-29018-1-git-send-email-yishaih@mellanox.com> 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 From: Noa Osherovich Provide information about the cvlan stripping offload for - ibv_create_wq - ibv_modify_wq - ibv_create_cq_ex - ibv_query_device_ex Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas --- libibverbs/man/ibv_create_cq_ex.3 | 9 +++++++-- libibverbs/man/ibv_create_wq.3 | 10 ++++++++++ libibverbs/man/ibv_modify_wq.3 | 2 ++ libibverbs/man/ibv_query_device_ex.3 | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/libibverbs/man/ibv_create_cq_ex.3 b/libibverbs/man/ibv_create_cq_ex.3 index a6ae769..020bbb4 100644 --- a/libibverbs/man/ibv_create_cq_ex.3 +++ b/libibverbs/man/ibv_create_cq_ex.3 @@ -17,10 +17,10 @@ creates a completion queue (CQ) for RDMA device context .I context\fR. The argument .I cq_attr -is a pointer to struct ibv_create_cq_attr_ex as defined in . +is a pointer to struct ibv_cq_init_attr_ex as defined in . .PP .nf -struct ibv_create_cq_attr_ex { +struct ibv_cq_init_attr_ex { .in +8 int cqe; /* Minimum number of entries required for CQ */ void *cq_context; /* Consumer-supplied context returned for completion events */ @@ -28,6 +28,7 @@ struct ibv_comp_channel *channel; /* Completion channel where completio int comp_vector; /* Completion vector used to signal completion events. Must be >= 0 and < context->num_comp_vectors. */ uint64_t wc_flags; /* The wc_flags that should be returned in ibv_poll_cq_ex. Or'ed bit of enum ibv_wc_flags_ex. */ uint32_t comp_mask; /* compatibility mask (extended verb). */ +uint32_t flags /* One or more flags from enum ibv_create_cq_attr_flags */ .in -8 }; @@ -40,6 +41,7 @@ enum ibv_wc_flags_ex { IBV_WC_EX_WITH_SL = 1 << 5, /* Require sl in WC */ IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6, /* Require dlid path bits in WC */ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, /* Require completion timestamp in WC /* + IBV_WC_EX_WITH_CVLAN = 1 << 8, /* Require VLAN info in WC */ }; enum ibv_cq_init_attr_mask { @@ -128,6 +130,9 @@ Below members and functions are used in order to poll the current completion. Th .BI "uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex " "*cq"); \c Get the completion timestamp from the current completion. +.BI "uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex " "*cq"); \c + Get the CVLAN field from the current completion. + .SH "RETURN VALUE" .B ibv_create_cq_ex() returns a pointer to the CQ, or NULL if the request fails. diff --git a/libibverbs/man/ibv_create_wq.3 b/libibverbs/man/ibv_create_wq.3 index aad6741..81fea04 100644 --- a/libibverbs/man/ibv_create_wq.3 +++ b/libibverbs/man/ibv_create_wq.3 @@ -31,8 +31,18 @@ uint32_t max_sge; /* Requested max number of scatter/gat struct ibv_pd *pd; /* PD to be associated with the WQ */ struct ibv_cq *cq; /* CQ to be associated with the WQ */ uint32_t comp_mask; /* Identifies valid fields. Use ibv_wq_init_attr_mask */ +uint32_t create_flags /* Creation flags for this WQ, use enum ibv_wq_flags */ .in -8 }; +.sp +.nf +enum ibv_wq_flags { +.in +8 +IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, +IBV_WQ_FLAGS_RESERVED = 1 << 1, +.in -8 +}; +.nf .fi .PP The function diff --git a/libibverbs/man/ibv_modify_wq.3 b/libibverbs/man/ibv_modify_wq.3 index f17faed..1972ec2 100644 --- a/libibverbs/man/ibv_modify_wq.3 +++ b/libibverbs/man/ibv_modify_wq.3 @@ -26,6 +26,8 @@ struct ibv_wq_attr { uint32_t attr_mask; /* Use enum ibv_wq_attr_mask */ enum ibv_wq_state wq_state; /* Move to this state */ enum ibv_wq_state curr_wq_state; /* Assume this is the current state */ +uint32_t flags; /* Flags values to modify, use enum ibv_wq_flags */ +uint32_t flags_mask; /* Which flags to modify, use enum ibv_wq_flags */ .in -8 }; .fi diff --git a/libibverbs/man/ibv_query_device_ex.3 b/libibverbs/man/ibv_query_device_ex.3 index c291017..7f58355 100644 --- a/libibverbs/man/ibv_query_device_ex.3 +++ b/libibverbs/man/ibv_query_device_ex.3 @@ -32,6 +32,7 @@ struct ibv_tso_caps tso_caps; /* TCP segmentation offload c struct ibv_rss_caps rss_caps; /* RSS capabilities */ uint32_t max_wq_type_rq; /* Max Work Queue from type RQ */ struct ibv_packet_pacing_caps packet_pacing_caps; /* Packet pacing capabilities */ +uint32_t raw_packet_caps; /* Raw packet capabilities, use enum ibv_raw_packet_caps */ .in -8 };