[ofa-general] [PATCH] opensm: rename osm_sa_vendor_send() to osm_sa_send()
Sasha Khapyorsky
sashak at voltaire.com
Sun Mar 2 12:05:44 PST 2008
Rename osm_sa_vendor_send() to osm_sa_send() (since it is not part of
vendor library). Also it changes prototype to match better other SA
sender functions.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/include/opensm/osm_sa.h | 17 ++++++-----------
opensm/opensm/osm_inform.c | 3 +--
opensm/opensm/osm_sa.c | 21 +++++++++------------
opensm/opensm/osm_sa_class_port_info.c | 2 +-
4 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/opensm/include/opensm/osm_sa.h b/opensm/include/opensm/osm_sa.h
index f4f751b..370e4e0 100644
--- a/opensm/include/opensm/osm_sa.h
+++ b/opensm/include/opensm/osm_sa.h
@@ -351,20 +351,17 @@ osm_sa_bind(IN osm_sa_t * const p_sa, IN const ib_net64_t port_guid);
* SEE ALSO
*********/
-/****f* OpenSM: SA/osm_sa_vendor_send
+/****f* OpenSM: SA/osm_sa_send
* NAME
-* osm_sa_vendor_send
+* osm_sa_send
*
* DESCRIPTION
* Sends SA MAD via osm_vendor_send and maintains the QP1 sent statistic
*
* SYNOPSIS
*/
-ib_api_status_t
-osm_sa_vendor_send(IN osm_bind_handle_t h_bind,
- IN osm_madw_t * const p_madw,
- IN boolean_t const resp_expected,
- IN osm_subn_t * const p_subn);
+ib_api_status_t osm_sa_send(osm_sa_t *sa, IN osm_madw_t * const p_madw,
+ IN boolean_t const resp_expected);
/****f* IBA Base: Types/osm_sa_send_error
* NAME
@@ -376,10 +373,8 @@ osm_sa_vendor_send(IN osm_bind_handle_t h_bind,
*
* SYNOPSIS
*/
-void
-osm_sa_send_error(IN osm_sa_t * sa,
- IN const osm_madw_t * const p_madw,
- IN const ib_net16_t sa_status);
+void osm_sa_send_error(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+ IN const ib_net16_t sa_status);
/*
* PARAMETERS
* sa
diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
index bbd573c..9553f7f 100644
--- a/opensm/opensm/osm_inform.c
+++ b/opensm/opensm/osm_inform.c
@@ -365,8 +365,7 @@ static ib_api_status_t __osm_send_report(IN osm_infr_t * p_infr_rec, /* the info
*p_report_ntc = *p_ntc;
/* The TRUE is for: response is expected */
- osm_sa_vendor_send(p_report_madw->h_bind, p_report_madw, TRUE,
- p_infr_rec->sa->p_subn);
+ osm_sa_send(p_infr_rec->sa, p_report_madw, TRUE);
Exit:
OSM_LOG_EXIT(p_log);
diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c
index 4edce47..d85463e 100644
--- a/opensm/opensm/osm_sa.c
+++ b/opensm/opensm/osm_sa.c
@@ -318,19 +318,17 @@ Exit:
return (status);
}
-ib_api_status_t
-osm_sa_vendor_send(IN osm_bind_handle_t h_bind,
- IN osm_madw_t * const p_madw,
- IN boolean_t const resp_expected,
- IN osm_subn_t * const p_subn)
+ib_api_status_t osm_sa_send(osm_sa_t *sa,
+ IN osm_madw_t * const p_madw,
+ IN boolean_t const resp_expected)
{
ib_api_status_t status;
- cl_atomic_inc(&p_subn->p_osm->stats.sa_mads_sent);
- status = osm_vendor_send(h_bind, p_madw, resp_expected);
+ cl_atomic_inc(&sa->p_subn->p_osm->stats.sa_mads_sent);
+ status = osm_vendor_send(p_madw->h_bind, p_madw, resp_expected);
if (status != IB_SUCCESS) {
- cl_atomic_dec(&p_subn->p_osm->stats.sa_mads_sent);
- OSM_LOG(&p_subn->p_osm->log, OSM_LOG_ERROR, "ERR 4C04: "
+ cl_atomic_dec(&sa->p_subn->p_osm->stats.sa_mads_sent);
+ OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4C04: "
"osm_vendor_send failed, status = %s\n",
ib_get_err_str(status));
}
@@ -392,8 +390,7 @@ osm_sa_send_error(IN osm_sa_t * sa,
if (osm_log_is_active(sa->p_log, OSM_LOG_FRAMES))
osm_dump_sa_mad(sa->p_log, p_resp_sa_mad, OSM_LOG_FRAMES);
- osm_sa_vendor_send(osm_madw_get_bind_handle(p_resp_madw),
- p_resp_madw, FALSE, sa->p_subn);
+ osm_sa_send(sa, p_resp_madw, FALSE);
Exit:
OSM_LOG_EXIT(sa->p_log);
@@ -501,7 +498,7 @@ void osm_sa_respond(osm_sa_t *sa, osm_madw_t *madw, size_t attr_size,
p += attr_size;
}
- osm_sa_vendor_send(resp_madw->h_bind, resp_madw, FALSE, sa->p_subn);
+ osm_sa_send(sa, resp_madw, FALSE);
osm_dump_sa_mad(sa->p_log, resp_sa_mad, OSM_LOG_FRAMES);
Exit:
diff --git a/opensm/opensm/osm_sa_class_port_info.c b/opensm/opensm/osm_sa_class_port_info.c
index 3a76a69..f0afb32 100644
--- a/opensm/opensm/osm_sa_class_port_info.c
+++ b/opensm/opensm/osm_sa_class_port_info.c
@@ -174,7 +174,7 @@ __osm_cpi_rcv_respond(IN osm_sa_t * sa,
if (osm_log_is_active(sa->p_log, OSM_LOG_FRAMES))
osm_dump_sa_mad(sa->p_log, p_resp_sa_mad, OSM_LOG_FRAMES);
- osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE, sa->p_subn);
+ osm_sa_send(sa, p_resp_madw, FALSE);
Exit:
OSM_LOG_EXIT(sa->p_log);
--
1.5.4.rc2.60.gb2e62
More information about the general
mailing list