From patchwork Tue May 9 14:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 13235847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 541B2C77B75 for ; Tue, 9 May 2023 14:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235257AbjEIOw0 (ORCPT ); Tue, 9 May 2023 10:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235610AbjEIOw0 (ORCPT ); Tue, 9 May 2023 10:52:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2009930F0 for ; Tue, 9 May 2023 07:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683643901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PEY72ftlX/0eK22QRHkiMePdjKQD2JTUbos9ENwZDyM=; b=fz7FRpsvj0RqmoiN3buVsqLrGvEMxizTfUOLoi7AQv8NQl+z+44+X6QZcyb4iDGNR+W99L 3g/peukeHEvys8GKW99pEUBn6i1tj/o+cVk8BuVxeX0zETUJICzgaP7geuFvIAqyJba9/E wilcc0dp3CPPKKReiftaPx8pdenbhL0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-177-ByhJ1Y1cPmCeJ0jRZkmvjg-1; Tue, 09 May 2023 10:51:37 -0400 X-MC-Unique: ByhJ1Y1cPmCeJ0jRZkmvjg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1572C18ABFA2; Tue, 9 May 2023 14:51:35 +0000 (UTC) Received: from fedora-x1.redhat.com (unknown [10.22.33.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7AD840C6E6A; Tue, 9 May 2023 14:51:34 +0000 (UTC) From: Kamal Heib To: linux-rdma@vger.kernel.org Cc: Mustafa Ismail , Shiraz Saleem , Jason Gunthorpe , Leon Romanovsky , Kamal Heib Subject: [PATCH 3/3] RDMA/iRDMA: Move iw device ops initialization Date: Tue, 9 May 2023 10:51:27 -0400 Message-Id: <20230509145127.33734-4-kheib@redhat.com> In-Reply-To: <20230509145127.33734-3-kheib@redhat.com> References: <20230509145127.33734-1-kheib@redhat.com> <20230509145127.33734-2-kheib@redhat.com> <20230509145127.33734-3-kheib@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Move the initialization of the iw device ops to be under the declaration of the irdma_iw_dev_ops. Signed-off-by: Kamal Heib --- drivers/infiniband/hw/irdma/verbs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 771f3abbed63..7f5dd0edd072 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -4450,8 +4450,16 @@ static const struct ib_device_ops irdma_roce_dev_ops = { }; static const struct ib_device_ops irdma_iw_dev_ops = { - .modify_qp = irdma_modify_qp, .get_port_immutable = irdma_iw_port_immutable, + .iw_accept = irdma_accept, + .iw_add_ref = irdma_qp_add_ref, + .iw_connect = irdma_connect, + .iw_create_listen = irdma_create_listen, + .iw_destroy_listen = irdma_destroy_listen, + .iw_get_qp = irdma_get_qp, + .iw_reject = irdma_reject, + .iw_rem_ref = irdma_qp_rem_ref, + .modify_qp = irdma_modify_qp, .query_gid = irdma_query_gid, }; @@ -4522,14 +4530,6 @@ static void irdma_init_iw_device(struct irdma_device *iwdev) iwdev->ibdev.node_type = RDMA_NODE_RNIC; addrconf_addr_eui48((u8 *)&iwdev->ibdev.node_guid, netdev->dev_addr); - iwdev->ibdev.ops.iw_add_ref = irdma_qp_add_ref; - iwdev->ibdev.ops.iw_rem_ref = irdma_qp_rem_ref; - iwdev->ibdev.ops.iw_get_qp = irdma_get_qp; - iwdev->ibdev.ops.iw_connect = irdma_connect; - iwdev->ibdev.ops.iw_accept = irdma_accept; - iwdev->ibdev.ops.iw_reject = irdma_reject; - iwdev->ibdev.ops.iw_create_listen = irdma_create_listen; - iwdev->ibdev.ops.iw_destroy_listen = irdma_destroy_listen; memcpy(iwdev->ibdev.iw_ifname, netdev->name, sizeof(iwdev->ibdev.iw_ifname)); ib_set_device_ops(&iwdev->ibdev, &irdma_iw_dev_ops);