From patchwork Wed Mar 15 15:27:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9625925 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 7EE006048C for ; Wed, 15 Mar 2017 15:28:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71F48285A1 for ; Wed, 15 Mar 2017 15:28:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66C1F28640; Wed, 15 Mar 2017 15:28:35 +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 176BB285A1 for ; Wed, 15 Mar 2017 15:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbdCOP2c (ORCPT ); Wed, 15 Mar 2017 11:28:32 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:36888 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753475AbdCOP2E (ORCPT ); Wed, 15 Mar 2017 11:28:04 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 15 Mar 2017 17:27:59 +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 v2FFRxd7020192; Wed, 15 Mar 2017 17:27:59 +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 v2FFRxVE014172; Wed, 15 Mar 2017 17:27:59 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v2FFRxTm014171; Wed, 15 Mar 2017 17:27:59 +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 V1 rdma-core 6/6] ibverbs: Add support for scatter FCS ability in WQ Date: Wed, 15 Mar 2017 17:27:46 +0200 Message-Id: <1489591666-14062-7-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1489591666-14062-1-git-send-email-yishaih@mellanox.com> References: <1489591666-14062-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 Enable the user to create a workqueue object with the scatter FCS offload. If this option is set, the FCS (Frame Check Sequence) field of an incoming raw Ethernet packet will be scattered into host memory along the packet payload as it appeared on the wire. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Reviewed-by: Yishai Hadas --- libibverbs/man/ibv_create_wq.3 | 3 ++- libibverbs/verbs.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libibverbs/man/ibv_create_wq.3 b/libibverbs/man/ibv_create_wq.3 index 9a541fe..4a8b83c 100644 --- a/libibverbs/man/ibv_create_wq.3 +++ b/libibverbs/man/ibv_create_wq.3 @@ -40,7 +40,8 @@ uint32_t create_flags /* Creation flags for this WQ, use en enum ibv_wq_flags { .in +8 IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, /* CVLAN field will be stripped from incoming packets */ -IBV_WQ_FLAGS_RESERVED = 1 << 1, +IBV_WQ_FLAGS_SCATTER_FCS = 1 << 1, /* FCS field will be scattered to host memory */ +IBV_WQ_FLAGS_RESERVED = 1 << 2, .in -8 }; .nf diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 15e93b3..3f5e9fe 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -675,7 +675,8 @@ enum ibv_wq_init_attr_mask { enum ibv_wq_flags { IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, - IBV_WQ_FLAGS_RESERVED = 1 << 1, + IBV_WQ_FLAGS_SCATTER_FCS = 1 << 1, + IBV_WQ_FLAGS_RESERVED = 1 << 2, }; struct ibv_wq_init_attr { @@ -685,7 +686,7 @@ struct ibv_wq_init_attr { uint32_t max_sge; struct ibv_pd *pd; struct ibv_cq *cq; - uint32_t comp_mask; + uint32_t comp_mask; /* Use ibv_wq_init_attr_mask */ uint32_t create_flags; /* use ibv_wq_flags */ };