From patchwork Wed Nov 21 06:58:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10692053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 656F315A7 for ; Wed, 21 Nov 2018 06:58:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 529312B3B9 for ; Wed, 21 Nov 2018 06:58:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44EE82B3CC; Wed, 21 Nov 2018 06:58:37 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 D6CD72B3B9 for ; Wed, 21 Nov 2018 06:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728136AbeKURbv (ORCPT ); Wed, 21 Nov 2018 12:31:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51252 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727343AbeKURbv (ORCPT ); Wed, 21 Nov 2018 12:31:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBFEB89ACE; Wed, 21 Nov 2018 06:58:35 +0000 (UTC) Received: from lhg.nay.redhat.com (unknown [10.66.129.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4680217A8F; Wed, 21 Nov 2018 06:58:32 +0000 (UTC) From: Honggang LI To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [opensm patch 5/6] opensm/osm_service.h: Fix and add some comments Date: Wed, 21 Nov 2018 14:58:10 +0800 Message-Id: <20181121065811.21806-5-honli@redhat.com> In-Reply-To: <20181121065811.21806-4-honli@redhat.com> References: <20181121065811.21806-1-honli@redhat.com> <20181121065811.21806-2-honli@redhat.com> <20181121065811.21806-3-honli@redhat.com> <20181121065811.21806-4-honli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 21 Nov 2018 06:58:35 +0000 (UTC) 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: Honggang Li Signed-off-by: Honggang Li --- include/opensm/osm_service.h | 91 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 5 deletions(-) diff --git a/include/opensm/osm_service.h b/include/opensm/osm_service.h index 446b8883..9a41878e 100644 --- a/include/opensm/osm_service.h +++ b/include/opensm/osm_service.h @@ -96,10 +96,10 @@ typedef struct osm_svcr { } osm_svcr_t; /* * FIELDS -* map_item -* Map Item for qmap linkage. Must be first element!! +* list_item +* List Item for Quick List linkage. Must be first element!! * -* svc_rec +* service_record * IB Service record structure * * modified_time @@ -150,7 +150,7 @@ void osm_svcr_init(IN osm_svcr_t * p_svcr, IN const ib_service_record_t * p_svc_rec); /* * PARAMETERS -* p_svc_rec +* p_svcr * [in] Pointer to osm_svcr_t structure * p_svc_rec * [in] Pointer to the ib_service_record_t @@ -171,21 +171,102 @@ void osm_svcr_init(IN osm_svcr_t * p_svcr, void osm_svcr_delete(IN osm_svcr_t * p_svcr); /* * PARAMETERS -* p_svc_rec +* p_svcr * [in] Pointer to osm_svcr_t structure * * SEE ALSO * Service Record, osm_svcr_new *********/ +/****f* OpenSM: Service Record/osm_svcr_get_by_rid +* NAME +* osm_svcr_get_by_rid +* +* DESCRIPTION +* Search the Service Record Database by record service_id, +* service_gid and service_pkey. +* +* SYNOPSIS +*/ osm_svcr_t *osm_svcr_get_by_rid(IN osm_subn_t const *p_subn, IN osm_log_t * p_log, IN ib_service_record_t * p_svc_rec); +/* +* PARAMETERS +* p_subn +* [in] Pointer to Subnet structure +* +* p_log +* [in] Pointer to osm_log_t +* +* p_svc_rec +* [in] Pointer to IB Service Record +* +* RETURN VALUES +* If found a matched record, pointer to osm_svcr_t structure. +* Otherwise, pointer to NULL. +* +* SEE ALSO +* Service Record +*********/ +/****f* OpenSM: Service Record/osm_svcr_insert_to_db +* NAME +* osm_svcr_insert_to_db +* +* DESCRIPTION +* Insert new Service Record into Database +* +* SYNOPSIS +*/ void osm_svcr_insert_to_db(IN osm_subn_t * p_subn, IN osm_log_t * p_log, IN osm_svcr_t * p_svcr); +/* +* PARAMETERS +* p_subn +* [in] Pointer to Subnet structure +* +* p_log +* [in] Pointer to osm_log_t +* +* p_svcr +* [in] Pointer to IB Service Record to be inserted +* +* RETURN VALUES +* This function does not return a value. +* +* SEE ALSO +* Service Record, osm_svcr_remove_from_db +*********/ + +/****f* OpenSM: Service Record/osm_svcr_remove_from_db +* NAME +* osm_svcr_remove_from_db +* +* DESCRIPTION +* Remove a Service Record from Database +* +* SYNOPSIS +*/ void osm_svcr_remove_from_db(IN osm_subn_t * p_subn, IN osm_log_t * p_log, IN osm_svcr_t * p_svcr); +/* +* PARAMETERS +* p_subn +* [in] Pointer to Subnet structure +* +* p_log +* [in] Pointer to osm_log_t +* +* p_svcr +* [in] Pointer to IB Service Record to be removed +* +* RETURN VALUES +* This function does not return a value. +* +* SEE ALSO +* Service Record, osm_svcr_insert_to_db +*********/ END_C_DECLS #endif /* _OSM_SVCR_H_ */