Skip to contentSkip to conversation

ssa_smdb.[c h]: remove 'osm_header.h' dependency from 'ssa_smdb.h'

PATCH In review Ilya Nelkenbaum 2 participants 3 messages Dec 16, 2013 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ssa_smdb.[c h]: remove 'osm_header.h' dependency from 'ssa_smdb.h'

---
Changes since version 1:
- all method declarations were removed from 'ssa_smdb.h'
- argument types were changed back from 'void*' to specific types

 include/infiniband/ssa_smdb.h |   26 --------------------------
 plugin/src/ssa_extract.c      |   16 ++++++++++++++++
 plugin/src/ssa_smdb.c         |    1 +
 3 files changed, 17 insertions(+), 26 deletions(-)
include/infiniband/ssa_smdb.h +0 -26
index 66fae67..016c99f 100644
@@ -34,7 +34,6 @@
 #ifndef _SSA_SMDB_H_
 #define _SSA_SMDB_H_
 
-#include <infiniband/osm_headers.h>
 #include <infiniband/ssa_db.h>
 #include <infiniband/umad_sm.h>
 
@@ -204,30 +203,5 @@ struct ep_lft_block_tbl_rec {
 struct ssa_db *ssa_db_smdb_init(uint64_t data_rec_cnt[SSA_TABLE_ID_MAX]);
 
 void ssa_db_smdb_destroy(struct ssa_db * p_smdb);
-
-/**********************SUBNET OPTS records*******************************/
-void ep_subnet_opts_tbl_rec_init(osm_subn_t *p_subn,
-				 struct ep_subnet_opts_tbl_rec * p_rec);
-
-/**********************GUID to LID records*******************************/
-void ep_guid_to_lid_tbl_rec_init(osm_port_t *p_port,
-				 struct ep_guid_to_lid_tbl_rec * p_rec);
-
-/**********************NODE records**************************************/
-void ep_node_tbl_rec_init(osm_node_t *p_node, struct ep_node_tbl_rec * p_rec);
-
-/**********************LINK records**************************************/
-void ep_link_tbl_rec_init(osm_physp_t *p_physp, struct ep_link_tbl_rec * p_rec);
-
-/**********************PORT records**************************************/
-void ep_port_tbl_rec_init(osm_physp_t *p_physp, struct ep_port_tbl_rec * p_rec);
-
-/********************** LFT Block records*******************************/
-void ep_lft_block_tbl_rec_init(osm_switch_t *p_sw, uint16_t lid, uint16_t block,
-			       struct ep_lft_block_tbl_rec * p_rec);
-
-/********************** LFT Top records*********************************/
-void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
-			     struct ep_lft_top_tbl_rec *p_rec);
 END_C_DECLS
 #endif				/* _SSA_SMDB_H_ */
plugin/src/ssa_extract.c +16 -0
index c8847eb..0587230 100644
@@ -54,6 +54,22 @@ extern struct ssa_database *ssa_db;
 extern int first;
 extern int smdb_deltas;
 
+extern void ep_subnet_opts_tbl_rec_init(osm_subn_t * p_subn,
+					struct ep_subnet_opts_tbl_rec * p_rec);
+extern void ep_guid_to_lid_tbl_rec_init(osm_port_t * p_port,
+					struct ep_guid_to_lid_tbl_rec * p_rec);
+extern void ep_node_tbl_rec_init(osm_node_t * p_node,
+				 struct ep_node_tbl_rec * p_rec);
+extern void ep_link_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_link_tbl_rec * p_rec);
+extern void ep_port_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_port_tbl_rec * p_rec);
+extern void ep_lft_block_tbl_rec_init(osm_switch_t * p_sw, uint16_t lid,
+				      uint16_t block,
+				      struct ep_lft_block_tbl_rec * p_rec);
+extern void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
+				    struct ep_lft_top_tbl_rec * p_rec);
+
 /** =========================================================================
  */
 struct ssa_db_extract *ssa_db_extract(osm_opensm_t *p_osm)
plugin/src/ssa_smdb.c +1 -0
index ed0a53e..a6e75a1 100644
@@ -32,6 +32,7 @@
  */
 
 #include <infiniband/ssa_smdb.h>
+#include <infiniband/osm_headers.h>
 #include <asm/byteorder.h>
 
 static const struct db_table_def def_tbl[] = {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 52AF0075.3070709-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

#2 lore raw
Quoted 69 lines · Ilya Nelkenbaum

---
Changes since version 1:
- all method declarations were removed from 'ssa_smdb.h'
- argument types were changed back from 'void*' to specific types

 include/infiniband/ssa_smdb.h |   26 --------------------------
 plugin/src/ssa_extract.c      |   16 ++++++++++++++++
 plugin/src/ssa_smdb.c         |    1 +
 3 files changed, 17 insertions(+), 26 deletions(-)
include/infiniband/ssa_smdb.h +0 -26
index 66fae67..016c99f 100644
@@ -34,7 +34,6 @@
 #ifndef _SSA_SMDB_H_
 #define _SSA_SMDB_H_
 
-#include <infiniband/osm_headers.h>
 #include <infiniband/ssa_db.h>
 #include <infiniband/umad_sm.h>
 
@@ -204,30 +203,5 @@ struct ep_lft_block_tbl_rec {
 struct ssa_db *ssa_db_smdb_init(uint64_t data_rec_cnt[SSA_TABLE_ID_MAX]);
 
 void ssa_db_smdb_destroy(struct ssa_db * p_smdb);
-
-/**********************SUBNET OPTS records*******************************/
-void ep_subnet_opts_tbl_rec_init(osm_subn_t *p_subn,
-				 struct ep_subnet_opts_tbl_rec * p_rec);
-
-/**********************GUID to LID records*******************************/
-void ep_guid_to_lid_tbl_rec_init(osm_port_t *p_port,
-				 struct ep_guid_to_lid_tbl_rec * p_rec);
-
-/**********************NODE records**************************************/
-void ep_node_tbl_rec_init(osm_node_t *p_node, struct ep_node_tbl_rec * p_rec);
-
-/**********************LINK records**************************************/
-void ep_link_tbl_rec_init(osm_physp_t *p_physp, struct ep_link_tbl_rec * p_rec);
-
-/**********************PORT records**************************************/
-void ep_port_tbl_rec_init(osm_physp_t *p_physp, struct ep_port_tbl_rec * p_rec);
-
-/********************** LFT Block records*******************************/
-void ep_lft_block_tbl_rec_init(osm_switch_t *p_sw, uint16_t lid, uint16_t block,
-			       struct ep_lft_block_tbl_rec * p_rec);
-
-/********************** LFT Top records*********************************/
-void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
-			     struct ep_lft_top_tbl_rec *p_rec);
 END_C_DECLS
 #endif				/* _SSA_SMDB_H_ */
plugin/src/ssa_extract.c +5 -0
index c8847eb..0587230 100644
@@ -54,6 +54,22 @@ extern struct ssa_database *ssa_db;
 extern int first;
 extern int smdb_deltas;
 
+extern void ep_subnet_opts_tbl_rec_init(osm_subn_t * p_subn,
+					struct ep_subnet_opts_tbl_rec * p_rec);
+extern void ep_guid_to_lid_tbl_rec_init(osm_port_t * p_port,
+					struct ep_guid_to_lid_tbl_rec * p_rec);
+extern void ep_node_tbl_rec_init(osm_node_t * p_node,

plugin/src/ssa_extract.c extern struct ssa_database *ssa_db; · line 71

Quoted 10 lines
plugin/src/ssa_extract.c +10 -0
+				 struct ep_node_tbl_rec * p_rec);
+extern void ep_link_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_link_tbl_rec * p_rec);
+extern void ep_port_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_port_tbl_rec * p_rec);
+extern void ep_lft_block_tbl_rec_init(osm_switch_t * p_sw, uint16_t lid,
+				      uint16_t block,
+				      struct ep_lft_block_tbl_rec * p_rec);
+extern void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
+				    struct ep_lft_top_tbl_rec * p_rec);

Rather than extern these routines, they should be put into new header file.

-- Hal

Quoted 10 lines
plugin/src/ssa_extract.c +1 -0
+
 /** =========================================================================
  */
 struct ssa_db_extract *ssa_db_extract(osm_opensm_t *p_osm)
plugin/src/ssa_smdb.c +0 -0
index ed0a53e..a6e75a1 100644

plugin/src/ssa_smdb.c line 38

Quoted 7 lines
plugin/src/ssa_smdb.c +1 -0
@@ -32,6 +32,7 @@
  */
 
 #include <infiniband/ssa_smdb.h>
+#include <infiniband/osm_headers.h>
 #include <asm/byteorder.h>
 
 static const struct db_table_def def_tbl[] = {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to a message not in the archive

Please ignore.

Quoted 89 lines · Ilya Nelkenbaum

---
Changes since version 1:
- all method declarations were removed from 'ssa_smdb.h'
- argument types were changed back from 'void*' to specific types

 include/infiniband/ssa_smdb.h |   26 --------------------------
 plugin/src/ssa_extract.c      |   16 ++++++++++++++++
 plugin/src/ssa_smdb.c         |    1 +
 3 files changed, 17 insertions(+), 26 deletions(-)
include/infiniband/ssa_smdb.h +0 -26
index 66fae67..016c99f 100644
@@ -34,7 +34,6 @@
 #ifndef _SSA_SMDB_H_
 #define _SSA_SMDB_H_
 
-#include <infiniband/osm_headers.h>
 #include <infiniband/ssa_db.h>
 #include <infiniband/umad_sm.h>
 
@@ -204,30 +203,5 @@ struct ep_lft_block_tbl_rec {
 struct ssa_db *ssa_db_smdb_init(uint64_t data_rec_cnt[SSA_TABLE_ID_MAX]);
 
 void ssa_db_smdb_destroy(struct ssa_db * p_smdb);
-
-/**********************SUBNET OPTS records*******************************/
-void ep_subnet_opts_tbl_rec_init(osm_subn_t *p_subn,
-				 struct ep_subnet_opts_tbl_rec * p_rec);
-
-/**********************GUID to LID records*******************************/
-void ep_guid_to_lid_tbl_rec_init(osm_port_t *p_port,
-				 struct ep_guid_to_lid_tbl_rec * p_rec);
-
-/**********************NODE records**************************************/
-void ep_node_tbl_rec_init(osm_node_t *p_node, struct ep_node_tbl_rec * p_rec);
-
-/**********************LINK records**************************************/
-void ep_link_tbl_rec_init(osm_physp_t *p_physp, struct ep_link_tbl_rec * p_rec);
-
-/**********************PORT records**************************************/
-void ep_port_tbl_rec_init(osm_physp_t *p_physp, struct ep_port_tbl_rec * p_rec);
-
-/********************** LFT Block records*******************************/
-void ep_lft_block_tbl_rec_init(osm_switch_t *p_sw, uint16_t lid, uint16_t block,
-			       struct ep_lft_block_tbl_rec * p_rec);
-
-/********************** LFT Top records*********************************/
-void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
-			     struct ep_lft_top_tbl_rec *p_rec);
 END_C_DECLS
 #endif				/* _SSA_SMDB_H_ */
plugin/src/ssa_extract.c +16 -0
index c8847eb..0587230 100644
@@ -54,6 +54,22 @@ extern struct ssa_database *ssa_db;
 extern int first;
 extern int smdb_deltas;
 
+extern void ep_subnet_opts_tbl_rec_init(osm_subn_t * p_subn,
+					struct ep_subnet_opts_tbl_rec * p_rec);
+extern void ep_guid_to_lid_tbl_rec_init(osm_port_t * p_port,
+					struct ep_guid_to_lid_tbl_rec * p_rec);
+extern void ep_node_tbl_rec_init(osm_node_t * p_node,
+				 struct ep_node_tbl_rec * p_rec);
+extern void ep_link_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_link_tbl_rec * p_rec);
+extern void ep_port_tbl_rec_init(osm_physp_t * p_physp,
+				 struct ep_port_tbl_rec * p_rec);
+extern void ep_lft_block_tbl_rec_init(osm_switch_t * p_sw, uint16_t lid,
+				      uint16_t block,
+				      struct ep_lft_block_tbl_rec * p_rec);
+extern void ep_lft_top_tbl_rec_init(uint16_t lid, uint16_t lft_top,
+				    struct ep_lft_top_tbl_rec * p_rec);
+
 /** =========================================================================
  */
 struct ssa_db_extract *ssa_db_extract(osm_opensm_t *p_osm)
plugin/src/ssa_smdb.c +0 -0
index ed0a53e..a6e75a1 100644

plugin/src/ssa_smdb.c line 38

Quoted 7 lines
plugin/src/ssa_smdb.c +1 -0
@@ -32,6 +32,7 @@
  */
 
 #include <infiniband/ssa_smdb.h>
+#include <infiniband/osm_headers.h>
 #include <asm/byteorder.h>
 
 static const struct db_table_def def_tbl[] = {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html