From patchwork Tue Mar 14 11:15:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9623045 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 959E360492 for ; Tue, 14 Mar 2017 11:16:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BCDD2838E for ; Tue, 14 Mar 2017 11:16:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80B8728532; Tue, 14 Mar 2017 11:16:26 +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 7C3162838E for ; Tue, 14 Mar 2017 11:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750768AbdCNLQY (ORCPT ); Tue, 14 Mar 2017 07:16:24 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:49002 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750820AbdCNLQX (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 v2EBGGka014196; 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 v2EBGGdV029146; 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 v2EBGG4a029145; 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 3/7] ibverbs: Allow creation of QP with cvlan stripping offload Date: Tue, 14 Mar 2017 13:15:39 +0200 Message-Id: <1489490143-29018-4-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 Allow users to create a QP that uses cvlan tripping capabilities if supported by the hardware. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Reviewed-by: Yishai Hadas --- libibverbs/cmd.c | 3 ++- libibverbs/verbs.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index b8fe76d..06ec671 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -926,7 +926,8 @@ static void create_qp_handle_resp_common(struct ibv_context *context, enum { CREATE_QP_EX2_SUP_CREATE_FLAGS = IBV_QP_CREATE_BLOCK_SELF_MCAST_LB | - IBV_QP_CREATE_SCATTER_FCS, + IBV_QP_CREATE_SCATTER_FCS | + IBV_QP_CREATE_CVLAN_STRIPPING, }; int ibv_cmd_create_qp_ex2(struct ibv_context *context, diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 3398566..c9084ea 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -780,6 +780,7 @@ enum ibv_qp_init_attr_mask { enum ibv_qp_create_flags { IBV_QP_CREATE_BLOCK_SELF_MCAST_LB = 1 << 1, IBV_QP_CREATE_SCATTER_FCS = 1 << 8, + IBV_QP_CREATE_CVLAN_STRIPPING = 1 << 9, }; struct ibv_rx_hash_conf {