Hi!
I have implemented the completely flat addressing in the attached patch,
but haven't tested if it causes any problems during an upgrade. It
should be applied on top of the patches for ticket [#1613]. Please feel
free to try it out!
/ Anders Widell
On 03/29/2016 06:09 PM, Anders Widell wrote:
I saw that it was also semi-hard-coded in /etc/opensaf/fmd.conf, but
when looking a bit closer I notice that this configuration is not
actually used by FM... :-)
Ok, if we feel adventurous we could give it a try. The only known place
where node_id has been hard-coded is SMF, which unfortunately is very
much involved in upgrades. But the good thing is that thanks to ticket
[#79], SMF will automatically discover the node_id of system controllers
in OpenSAF 5.0. Thus, only pre-5.0 versions of SMF are problematic. It
/might/ work, so let's try it!
regards,
Anders Widell
On 03/29/2016 05:44 PM, Mathivanan Naickan Palanivelu wrote:
I guess we have deferred this (from moving to a direct mapping of slot_id to
the node_id) for a long time now.
I think SMF's dependency on fixed ids can (and must) be managed once when we
move to multiple standbys.
Iam thinking where else we could get stuck during upgrade!?
Mathi.
----- anders.wid...@ericsson.com wrote:
It is "almost flat" in the proposed patches: the user only needs to
configure slot_id on each node, in the range [1, 4095]. subslot_id
should not be configured by the user. When using TIPC, the TIPC
address
of each node will be "1.1.slot_id". So the only non-flat thing is
node_id, which is not configured by the user. We could have a direct
mapping from slot_id to node_id (i.e. set node_id to the same value as
slot_id), but I am worried about what will happen during an upgrade.
Old
nodes will translate e.g. slot_id 0x1 to node_id 0x2010f. New nodes
will
translate slot_id 0x1 to node_id 0x1. To make things worse, there are
some places in OpenSAF that have been hard-coded to expect the two
system controllers to have node_id 0x2010f and 0x2020f, respectively.
Maybe we can make it work somehow, but I anticipate there could be
problems during an upgrade.
regards,
Anders Widell
On 03/29/2016 10:29 AM, Mathivanan Naickan Palanivelu wrote:
We should consider removing subslots entirely and go for a truly
flat addressing scheme, if that is backward compatible.
There are other standard ways(PLM HE dependency) of provisioning AMC
subslots kind of hardware.
Mathi.
-----Original Message-----
From: Anders Widell [mailto:anders.wid...@ericsson.com]
Sent: Friday, March 18, 2016 9:38 PM
To: Venkata Mahesh Alla
Cc: opensaf-devel@lists.sourceforge.net
Subject: [devel] [PATCH 1 of 1] mds: Support up to 4095 nodes
[#1613]
osaf/libs/core/mds/include/mds_dt.h | 26
+++++++++++++++++---------
osaf/libs/core/mds/mds_c_db.c | 26
++++++++++++--------------
2 files changed, 29 insertions(+), 23 deletions(-)
Support up to 4095 nodes in the flat addressing scheme for TIPC, by
encoding
the slot ID in the lower eight bits and the ones' complement of the
subslot ID
in bits 8 to 11 in the node identifier of the TIPC address. The
reason for taking
the ones' complement of the subslot ID is backwards compatibility
with
existing installations, so that this enhancement can be upgraded
in-service.
diff --git a/osaf/libs/core/mds/include/mds_dt.h
b/osaf/libs/core/mds/include/mds_dt.h
--- a/osaf/libs/core/mds/include/mds_dt.h
+++ b/osaf/libs/core/mds/include/mds_dt.h
@@ -237,7 +237,8 @@ bool mdtm_mailbox_mbx_cleanup(NCSCONTEXT
/*
* In the default flat addressing scheme, TIPC node addresses
looks like
- * 1.1.1, 1.1.2 etc.
+ * 1.1.1, 1.1.2 etc. The ones' complement of the subslot ID is
shifted
+ 8
+ * bits up and the slot ID is added in the 8 LSB.
* In the non flat (old/legacy) addressing scheme TIPC addresses
looks like
* 1.1.31, 1.1.47. The slot ID is shifted 4 bits up and subslot
ID is added
* in the 4 LSB.
@@ -248,13 +249,20 @@ bool mdtm_mailbox_mbx_cleanup(NCSCONTEXT
#if (MDS_USE_SUBSLOT_ID == 0)
#define MDS_TIPC_NODE_ID_MIN 0x01001001
-#define MDS_TIPC_NODE_ID_MAX 0x010010ff
-#define MDS_NCS_NODE_ID_MIN (MDS_NCS_CHASSIS_ID|0x0000010f)
-#define MDS_NCS_NODE_ID_MAX (MDS_NCS_CHASSIS_ID|0x0000ff0f)
-#define m_MDS_GET_NCS_NODE_ID_FROM_TIPC_NODE_ID(node) \
- (NODE_ID)( MDS_NCS_CHASSIS_ID | (((node)&0xff)<<8) |
(0xf))
-#define m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(node) \
- (NODE_ID)( MDS_TIPC_COMMON_ID | (((node)&0xff00)>>8) )
+#define MDS_TIPC_NODE_ID_MAX 0x01001fff
+static inline NODE_ID
m_MDS_GET_NCS_NODE_ID_FROM_TIPC_NODE_ID(NODE_ID node) {
+ return MDS_NCS_CHASSIS_ID | ((node & 0xff) << 8) | (((node
&
+0xf00) >> 8) ^ 0xf); } static inline NODE_ID
+m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(NODE_ID node) {
+ return MDS_TIPC_COMMON_ID | ((node & 0xff00) >> 8) |
(((node &
+0xf) ^ 0xf) << 8); } static inline uint32_t
+m_MDS_CHECK_TIPC_NODE_ID_RANGE(NODE_ID node) {
+ return node < MDS_TIPC_NODE_ID_MIN || node >
MDS_TIPC_NODE_ID_MAX ?
+ NCSCC_RC_FAILURE : NCSCC_RC_SUCCESS;
+}
+static inline uint32_t m_MDS_CHECK_NCS_NODE_ID_RANGE(NODE_ID
node) {
+ return
+m_MDS_CHECK_TIPC_NODE_ID_RANGE(m_MDS_GET_TIPC_NODE_ID_FR
OM_NCS_NODE_ID(
+node));
+}
#else
#define MDS_TIPC_NODE_ID_MIN 0x01001001
#define MDS_TIPC_NODE_ID_MAX 0x0100110f
@@ -264,10 +272,10 @@ bool mdtm_mailbox_mbx_cleanup(NCSCONTEXT
(NODE_ID)( MDS_NCS_CHASSIS_ID | ((node)&0xf) |
(((node)&0xff0)<<4)) #define
m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(node) \
(NODE_ID)( MDS_TIPC_COMMON_ID | (((node)&0xff00)>>4) |
((node)&0xf) ) -#endif
#define m_MDS_CHECK_TIPC_NODE_ID_RANGE(node)
(((((node)<MDS_TIPC_NODE_ID_MIN)||((node)>MDS_TIPC_NODE_ID_MA
X))?NCSCC_RC_FAILURE:NCSCC_RC_SUCCESS))
#define m_MDS_CHECK_NCS_NODE_ID_RANGE(node)
(((((node)<MDS_NCS_NODE_ID_MIN)||((node)>MDS_NCS_NODE_ID_MA
X))?NCSCC_RC_FAILURE:NCSCC_RC_SUCCESS))
+#endif
/* ******************************************** */
/* ******************************************** */ diff --git
a/osaf/libs/core/mds/mds_c_db.c b/osaf/libs/core/mds/mds_c_db.c
--- a/osaf/libs/core/mds/mds_c_db.c
+++ b/osaf/libs/core/mds/mds_c_db.c
@@ -37,14 +37,13 @@ void get_adest_details(MDS_DEST adest, c
char *token, *saveptr;
struct stat s;
uint32_t process_id = 0;
- NCS_PHY_SLOT_ID phy_slot;
- NCS_SUB_SLOT_ID sub_slot;
+ SlotSubslotId slot_subslot_id;
char pid_path[1024];
char *pid_name = NULL;
char process_name[MDS_MAX_PROCESS_NAME_LEN];
bool remote = false;
-
m_NCS_GET_PHYINFO_FROM_NODE_ID(m_NCS_NODE_ID_FROM_
MDS_DEST(adest), NULL, &phy_slot, &sub_slot);
+ slot_subslot_id =
+GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest)
);
if (!tipc_mode_enabled) {
process_id =
m_MDS_GET_PROCESS_ID_FROM_ADEST(adest);
@@ -111,11 +110,11 @@ void get_adest_details(MDS_DEST adest, c
}
if (remote == true)
- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<rem_nodeid[%d]:%s>",
- phy_slot, process_name);
+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<rem_nodeid[%u]:%s>",
+ slot_subslot_id, process_name);
else
- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<nodeid[%d]:%s>",
- phy_slot, process_name);
+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<nodeid[%u]:%s>",
+ slot_subslot_id, process_name);
m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details);
m_MDS_LEAVE();
@@ -129,8 +128,7 @@ void get_adest_details(MDS_DEST adest, c void
get_subtn_adest_details(MDS_PWE_HDL pwe_hdl, MDS_SVC_ID svc_id,
MDS_DEST adest, char* adest_details) {
uint32_t process_id = 0;
- NCS_PHY_SLOT_ID phy_slot;
- NCS_SUB_SLOT_ID sub_slot;
+ SlotSubslotId slot_subslot_id;
char process_name[MDS_MAX_PROCESS_NAME_LEN];
bool remote = false;
MDS_SVC_INFO *svc_info = NULL;
@@ -139,7 +137,7 @@ void get_subtn_adest_details(MDS_PWE_HDL
char *pid_name = NULL;
struct stat s;
-
m_NCS_GET_PHYINFO_FROM_NODE_ID(m_NCS_NODE_ID_FROM_
MDS_DEST(adest), NULL, &phy_slot, &sub_slot);
+ slot_subslot_id =
+GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest)
);
process_id = m_MDS_GET_PROCESS_ID_FROM_ADEST(adest);
if (NCSCC_RC_SUCCESS == mds_mcm_check_intranode(adest)) {
@@ -185,11 +183,11 @@ void get_subtn_adest_details(MDS_PWE_HDL
}
if (remote == true)
- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<rem_node[%d]:%s>",
- phy_slot, process_name);
+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<rem_node[%u]:%s>",
+ slot_subslot_id, process_name);
else
- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<node[%d]:%s>",
- phy_slot, process_name);
+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN,
"<node[%u]:%s>",
+ slot_subslot_id, process_name);
done:
m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details);
m_MDS_LEAVE();
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with Intel Data
Analytics
Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel
# HG changeset patch
# Parent 50e28ef60d32e17ac9dde34c398dd444a24e9ffc
diff --git a/00-README.conf b/00-README.conf
--- a/00-README.conf
+++ b/00-README.conf
@@ -112,16 +112,12 @@ Notes:
In the case of 'make install', do the steps listed in
'Steps to configure opensaf user' above.
-(e) If use of MDS subslot ID needs to be enabled, add TIPC_USE_SUBSLOT_ID=YES
- Note that the use of subslot ID is deprecated and should not be enabled
- in new installations.
-
-(f) Time supervision of local node reboot should be disabled or changed. Change
+(e) Time supervision of local node reboot should be disabled or changed. Change
OPENSAF_REBOOT_TIMEOUT to the desired number of seconds before a reboot is
escalated to an immediate reboot via the SysRq interface, or zero to disable
this feature.
-(g) User's non-OpenSAF applications are also using TIPC and the user does not
+(f) User's non-OpenSAF applications are also using TIPC and the user does not
wants OpenSAF to manage(tipc configuration, insmod/rmmod) TIPC. In this case,
change OPENSAF_MANAGE_TIPC="no".
Note: When user has taken the responsibility to manage TIPC, then before
@@ -130,14 +126,14 @@ Notes:
as: $ configure_tipc start <interface name> <TIPC netid>
For eg:- $ configure_tipc start eth0 9859
-(h) Setting MDS_TIPC_MCAST_ENABLED to 1 or 0, allows OpenSAF to enable or
+(g) Setting MDS_TIPC_MCAST_ENABLED to 1 or 0, allows OpenSAF to enable or
disable TIPC Multicast Messaging and this configuration is valid when
MDS_TRANSPORT is set to TIPC. By Default TIPC Multicast Messaging is Enabled.
Note: In case of TIPC Multicast Messaging disabled (0), the performance
of OpenSAF will be considerably lower compared to Enabled (1).
-(i) To use TIPC duplicate node address detection in cluster, while starting Opensaf
+(h) To use TIPC duplicate node address detection in cluster, while starting Opensaf
we needs to enabled TIPC_DUPLICATE_NODE_DETECT=YES in
`/usr/lib(64)/opensaf/configure_tipc` script.
@@ -161,8 +157,7 @@ upon a 'make install'. For e.g.:
slot_id
The slot_id shall specify a unique value that represents a physical slot
-identifier for the node in a chassis environment. It is typically set to the
-same as the TIPC node ID.
+identifier for the node. It is typically set to the same as the TIPC node ID.
By default, the slot_id contains a value of 1. While configuring
a new/second node in the cluster, this must be set to a unique/different
@@ -170,22 +165,7 @@ value - for e.g. a value of 2 as below:
% echo 2 > $pkgsysconfdir/slot_id
Starting with OpenSAF version 5.0, the maximum supported value for slot_id is
-4095 when using the flat addressing scheme (i.e. when the use of subslot ID is
-disabled). Prior to OpenSAF 5.0, the maximum supported value for slot_id was
-255.
-
-*******************************************************************************
-subslot_id
-
-The use of subslot ID is disabled by default. When disabled, subslot_id must be
-set to 15 (which is the default value) on all nodes in the cluster.
-
-*******************************************************************************
-chassis_id
-
-The chassis_id represents an identifier for the chassis (Distributed Computing
-Environment) and should be set to an integer value. It is normally never changed
-from what's installed.
+4095. Prior to OpenSAF 5.0, the maximum supported value for slot_id was 255.
*******************************************************************************
imm.xml
diff --git a/00-README.debug b/00-README.debug
--- a/00-README.debug
+++ b/00-README.debug
@@ -56,10 +56,7 @@ 6. Have you checked the open source pac
available. In cases of rpm installation, make sure the devel package
is installed.
-7. Have you checked the chassis_id? The chassis_id should be the same as
- ACTIVE system controller.
-
-8. Have you checked the node_name. It should contain the same name as the
+7. Have you checked the node_name. It should contain the same name as the
value specified in the nodes.cfg file while generating the imm.xml.
"Unconfigured CLM nodes are not allowed to join the cluster if the node_names
dont match and CLMNA will not allowed to be initialized".
@@ -105,10 +102,7 @@ 4. If TCP is chosen as the mds transpor
a. DTM_NODE_IP should be configured same as system IP address.
-5. Have you checked the chassis_id? The chassis_id should be the same as
- ACTIVE & STANDBY system controllers.
-
-6. Have you checked the node_name. It should contain the same name as the
+5. Have you checked the node_name. It should contain the same name as the
value specified in the nodes.cfg file while generating the imm.xml.
"Unconfigured CLM nodes are not allowed to join the cluster if the node_names
dont match and CLMNA will not allowed to be initialized".
diff --git a/README b/README
--- a/README
+++ b/README
@@ -287,27 +287,12 @@ Building `OpenSAF'
Some features needs to be configured at build time but don't have configure
support, these are explained here.
-1) Configure a non flat MDS addressing scheme (deprecated)
-
-In the default (from OpenSAF 4.3 onwards) addressing scheme, TIPC node addresses
+In the new (from OpenSAF 4.3 onwards) addressing scheme, TIPC node addresses
looks like 1.1.1, 1.1.2 etc, and the slot_id can be in the range from 1 and up
to 4095 (though note that prior to OpenSAF 5.0, the maximum supported slot_id
was 255).
-To re-enable the old (pre OpenSAF 4.3) non flat addressing, configure the
-constant MDS_USE_SUBSLOT_ID=1 at configure time as in:
-
- % ./configure CPPFLAGS="-DMDS_USE_SUBSLOT_ID=1 ..."
-
-In the non flat scheme, the slot ID is shifted up 4 bits and subslot ID is
-added in the 4 LSB. The consequence of this is reduced number of
-addressable nodes in the cluster. This scheme is more likely to be used
-in xTCA type of systems and produces TIPC addresses like 1.1.31, 1.1.47 etc.
-
-More configuration is needed, see nid.conf in 00-README.conf
-
-
-2) Run as root (optional)
+1) Run as root (optional)
If the old (<4.2) behaviour of running all processes as root is desired, use
the following configure command:
@@ -315,7 +300,7 @@ the following configure command:
% ./configure CPPFLAGS=-DRUNASROOT
-3) Configure TIPC importance (optional)
+2) Configure TIPC importance (optional)
The default TIPC importance is LOW for all services except for AVND which is HIGH.
In some cases the default importance must be changed if e.g. an application starves the LOW importance communication level.
@@ -328,7 +313,7 @@ To change the default importance, use th
Note: Giving same importance to AVND & all other Opensaf models is not preferred option. The behavior is unsupported.
-4) Configure GCC hardening options (optional)
+3) Configure GCC hardening options (optional)
By default, the options "-fstack-protector -D_FORTIFY_SOURCE=2" are passed to
GCC for improved security. You can override these options by setting the
diff --git a/opensaf.spec.in b/opensaf.spec.in
--- a/opensaf.spec.in
+++ b/opensaf.spec.in
@@ -934,9 +934,7 @@ fi
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/lib/%{name}
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/log/%{name}
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/run/%{name}
-%config(noreplace) %{_pkgsysconfdir}/chassis_id
%config(noreplace) %{_pkgsysconfdir}/slot_id
-%config(noreplace) %{_pkgsysconfdir}/subslot_id
%config(noreplace) %{_pkgsysconfdir}/node_type
%config(noreplace) %{_pkgsysconfdir}/node_name
%config %{_pkgsysconfdir}/osafdir.conf
diff --git a/osaf/libs/common/mqsv/include/mqa_db.h b/osaf/libs/common/mqsv/include/mqa_db.h
--- a/osaf/libs/common/mqsv/include/mqa_db.h
+++ b/osaf/libs/common/mqsv/include/mqa_db.h
@@ -35,7 +35,7 @@
extern uint32_t gl_mqa_hdl;
/*Maximum Nodes in the cluster */
-#define MQA_MAX_NODES kMaxSlotsSubslots
+#define MQA_MAX_NODES kMaxSlots
typedef unsigned short SVC_SUBPART_VER;
/********************Service Sub part Versions*********************************/
diff --git a/osaf/libs/common/mqsv/include/mqsv_common.h b/osaf/libs/common/mqsv/include/mqsv_common.h
--- a/osaf/libs/common/mqsv/include/mqsv_common.h
+++ b/osaf/libs/common/mqsv/include/mqsv_common.h
@@ -86,7 +86,7 @@
uint32_t machineEndianness(void);
uint32_t mqsv_listenerq_msg_send(SaMsgQueueHandleT listenerhandle);
-SlotSubslotId mqsv_get_phy_slot_id(MDS_DEST dest);
+SlotId mqsv_get_phy_slot_id(MDS_DEST dest);
typedef unsigned int MSG_FRMT_VER;
#define m_MQSV_CONVERT_SATIME_TEN_MILLI_SEC(t) (t)/(10000000) /* 10^7 */
diff --git a/osaf/libs/common/mqsv/mqsv_common.c b/osaf/libs/common/mqsv/mqsv_common.c
--- a/osaf/libs/common/mqsv/mqsv_common.c
+++ b/osaf/libs/common/mqsv/mqsv_common.c
@@ -117,7 +117,7 @@ uint32_t mqsv_listenerq_msg_send(SaMsgQu
*************************************************************************************/
-SlotSubslotId mqsv_get_phy_slot_id(MDS_DEST dest)
+SlotId mqsv_get_phy_slot_id(MDS_DEST dest)
{
- return GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
+ return GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
}
diff --git a/osaf/libs/core/common/ncs_main_pub.c b/osaf/libs/core/common/ncs_main_pub.c
--- a/osaf/libs/core/common/ncs_main_pub.c
+++ b/osaf/libs/core/common/ncs_main_pub.c
@@ -139,8 +139,7 @@ typedef struct ncs_main_pub_cb {
} NCS_MAIN_PUB_CB;
typedef struct ncs_sys_params {
- SlotSubslotId slot_subslot_id;
- NCS_CHASSIS_ID shelf_id;
+ SlotId slot_id;
NCS_NODE_ID node_id;
uint32_t cluster_id;
uint32_t pcon_id;
@@ -755,13 +754,12 @@ void ncs_get_sys_params_arg(NCS_SYS_PARA
gl_ncs_main_pub_cb.my_nodeid = sys_params->node_id;
- sys_params->shelf_id = GetChassisIdFromNodeId(sys_params->node_id);
- sys_params->slot_subslot_id = GetSlotSubslotIdFromNodeId(sys_params->node_id);
+ sys_params->slot_id = GetSlotIdFromNodeId(sys_params->node_id);
sprintf(gl_pargv[orig_argc + 0], "NONE");
sprintf(gl_pargv[orig_argc + 1], "CLUSTER_ID=%d", sys_params->cluster_id);
- sprintf(gl_pargv[orig_argc + 2], "SHELF_ID=%d", sys_params->shelf_id);
- sprintf(gl_pargv[orig_argc + 3], "SLOT_ID=%d", sys_params->slot_subslot_id);
+ sprintf(gl_pargv[orig_argc + 2], "SHELF_ID=%d", 0x2);
+ sprintf(gl_pargv[orig_argc + 3], "SLOT_ID=%d", sys_params->slot_id);
sprintf(gl_pargv[orig_argc + 4], "NODE_ID=%d", sys_params->node_id);
sprintf(gl_pargv[orig_argc + 5], "PCON_ID=%d", sys_params->pcon_id);
diff --git a/osaf/libs/core/include/ncs_main_papi.h b/osaf/libs/core/include/ncs_main_papi.h
--- a/osaf/libs/core/include/ncs_main_papi.h
+++ b/osaf/libs/core/include/ncs_main_papi.h
@@ -88,20 +88,9 @@ extern "C" {
NCS_NODE_ID ncs_get_node_id(void);
#define m_NCS_GET_NODE_ID ncs_get_node_id()
-static inline NCS_CHASSIS_ID GetChassisIdFromNodeId(NCS_NODE_ID node_id)
+static inline SlotId GetSlotIdFromNodeId(NCS_NODE_ID node_id)
{
- uint32_t kChassisMask = 0xff;
- uint32_t chassis_id = (((uint32_t) node_id) >> 16) & kChassisMask;
- return chassis_id;
-}
-
-static inline SlotSubslotId GetSlotSubslotIdFromNodeId(NCS_NODE_ID node_id)
-{
- uint32_t kSubslotMask = 0xf;
- uint32_t kSlotMask = 0xff;
- uint32_t subslot_id = ((uint32_t) node_id) & kSubslotMask;
- uint32_t slot_id = (((uint32_t) node_id) >> 8) & kSlotMask;
- return ((subslot_id ^ kSubslotMask) << 8) | slot_id;
+ return ((uint32_t) node_id) & 4095u;
}
#ifdef __cplusplus
diff --git a/osaf/libs/core/include/ncsgl_defs.h b/osaf/libs/core/include/ncsgl_defs.h
--- a/osaf/libs/core/include/ncsgl_defs.h
+++ b/osaf/libs/core/include/ncsgl_defs.h
@@ -72,17 +72,15 @@ extern "C" {
#define NCSCC_RC_DUPLICATE_ENTRY 2011
/*************************************************
- * Maximum Slots (Including sub slots) supported
- * 256 slots x 16 subslots
+ * Maximum number of slots supported
*************************************************/
enum {
- kMaxSlotsSubslots = 4096
+ kMaxSlots = 4096
};
typedef uint64_t MDS_DEST;
typedef uint32_t NCS_NODE_ID;
- typedef uint8_t NCS_CHASSIS_ID;
- typedef uint32_t SlotSubslotId;
+ typedef uint32_t SlotId;
/* m_NCS_NODE_ID_FROM_MDS_DEST: Returns node-id if the MDS_DEST provided
is an absolute destination. Returns 0
diff --git a/osaf/libs/core/mds/include/mds_dt.h b/osaf/libs/core/mds/include/mds_dt.h
--- a/osaf/libs/core/mds/include/mds_dt.h
+++ b/osaf/libs/core/mds/include/mds_dt.h
@@ -232,29 +232,18 @@ bool mdtm_mailbox_mbx_cleanup(NCSCONTEXT
#define MDTM_PRI_MASK 0x3
/* Added for the subscription changes */
-#define MDS_NCS_CHASSIS_ID (m_NCS_GET_NODE_ID&0x00ff0000)
#define MDS_TIPC_COMMON_ID 0x01001000
/*
- * In the default flat addressing scheme, TIPC node addresses looks like
- * 1.1.1, 1.1.2 etc. The ones' complement of the subslot ID is shifted 8
- * bits up and the slot ID is added in the 8 LSB.
- * In the non flat (old/legacy) addressing scheme TIPC addresses looks like
- * 1.1.31, 1.1.47. The slot ID is shifted 4 bits up and subslot ID is added
- * in the 4 LSB.
+ * TIPC node addresses looks like 1.1.1, 1.1.2 etc.
*/
-#ifndef MDS_USE_SUBSLOT_ID
-#define MDS_USE_SUBSLOT_ID 0
-#endif
-
-#if (MDS_USE_SUBSLOT_ID == 0)
#define MDS_TIPC_NODE_ID_MIN 0x01001001
#define MDS_TIPC_NODE_ID_MAX 0x01001fff
static inline NODE_ID m_MDS_GET_NCS_NODE_ID_FROM_TIPC_NODE_ID(NODE_ID node) {
- return MDS_NCS_CHASSIS_ID | ((node & 0xff) << 8) | (((node & 0xf00) >> 8) ^ 0xf);
+ return ((uint32_t) node) & 4095u;
}
static inline NODE_ID m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(NODE_ID node) {
- return MDS_TIPC_COMMON_ID | ((node & 0xff00) >> 8) | (((node & 0xf) ^ 0xf) << 8);
+ return MDS_TIPC_COMMON_ID | (((uint32_t) node) & 4095u);
}
static inline uint32_t m_MDS_CHECK_TIPC_NODE_ID_RANGE(NODE_ID node) {
return node < MDS_TIPC_NODE_ID_MIN || node > MDS_TIPC_NODE_ID_MAX ?
@@ -263,19 +252,6 @@ static inline uint32_t m_MDS_CHECK_TIPC_
static inline uint32_t m_MDS_CHECK_NCS_NODE_ID_RANGE(NODE_ID node) {
return m_MDS_CHECK_TIPC_NODE_ID_RANGE(m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(node));
}
-#else
-#define MDS_TIPC_NODE_ID_MIN 0x01001001
-#define MDS_TIPC_NODE_ID_MAX 0x0100110f
-#define MDS_NCS_NODE_ID_MIN (MDS_NCS_CHASSIS_ID|0x00000100)
-#define MDS_NCS_NODE_ID_MAX (MDS_NCS_CHASSIS_ID|0x0000100f)
-#define m_MDS_GET_NCS_NODE_ID_FROM_TIPC_NODE_ID(node) \
- (NODE_ID)( MDS_NCS_CHASSIS_ID | ((node)&0xf) | (((node)&0xff0)<<4))
-#define m_MDS_GET_TIPC_NODE_ID_FROM_NCS_NODE_ID(node) \
- (NODE_ID)( MDS_TIPC_COMMON_ID | (((node)&0xff00)>>4) | ((node)&0xf) )
-
-#define m_MDS_CHECK_TIPC_NODE_ID_RANGE(node) (((((node)<MDS_TIPC_NODE_ID_MIN)||((node)>MDS_TIPC_NODE_ID_MAX))?NCSCC_RC_FAILURE:NCSCC_RC_SUCCESS))
-#define m_MDS_CHECK_NCS_NODE_ID_RANGE(node) (((((node)<MDS_NCS_NODE_ID_MIN)||((node)>MDS_NCS_NODE_ID_MAX))?NCSCC_RC_FAILURE:NCSCC_RC_SUCCESS))
-#endif
/* ******************************************** */
/* ******************************************** */
diff --git a/osaf/libs/core/mds/mds_c_db.c b/osaf/libs/core/mds/mds_c_db.c
--- a/osaf/libs/core/mds/mds_c_db.c
+++ b/osaf/libs/core/mds/mds_c_db.c
@@ -37,13 +37,13 @@ void get_adest_details(MDS_DEST adest, c
char *token, *saveptr;
struct stat s;
uint32_t process_id = 0;
- SlotSubslotId slot_subslot_id;
+ SlotId slot_id;
char pid_path[1024];
char *pid_name = NULL;
char process_name[MDS_MAX_PROCESS_NAME_LEN];
bool remote = false;
- slot_subslot_id = GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest));
+ slot_id = GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest));
if (!tipc_mode_enabled) {
process_id = m_MDS_GET_PROCESS_ID_FROM_ADEST(adest);
@@ -111,10 +111,10 @@ void get_adest_details(MDS_DEST adest, c
if (remote == true)
snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, "<rem_nodeid[%u]:%s>",
- slot_subslot_id, process_name);
+ slot_id, process_name);
else
snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, "<nodeid[%u]:%s>",
- slot_subslot_id, process_name);
+ slot_id, process_name);
m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details);
m_MDS_LEAVE();
@@ -128,7 +128,7 @@ void get_adest_details(MDS_DEST adest, c
void get_subtn_adest_details(MDS_PWE_HDL pwe_hdl, MDS_SVC_ID svc_id, MDS_DEST adest, char* adest_details)
{
uint32_t process_id = 0;
- SlotSubslotId slot_subslot_id;
+ SlotId slot_id;
char process_name[MDS_MAX_PROCESS_NAME_LEN];
bool remote = false;
MDS_SVC_INFO *svc_info = NULL;
@@ -137,7 +137,7 @@ void get_subtn_adest_details(MDS_PWE_HDL
char *pid_name = NULL;
struct stat s;
- slot_subslot_id = GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest));
+ slot_id = GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(adest));
process_id = m_MDS_GET_PROCESS_ID_FROM_ADEST(adest);
if (NCSCC_RC_SUCCESS == mds_mcm_check_intranode(adest)) {
@@ -184,10 +184,10 @@ void get_subtn_adest_details(MDS_PWE_HDL
if (remote == true)
snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, "<rem_node[%u]:%s>",
- slot_subslot_id, process_name);
+ slot_id, process_name);
else
snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, "<node[%u]:%s>",
- slot_subslot_id, process_name);
+ slot_id, process_name);
done:
m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details);
m_MDS_LEAVE();
diff --git a/osaf/libs/core/mds/mds_dt_tipc.c b/osaf/libs/core/mds/mds_dt_tipc.c
--- a/osaf/libs/core/mds/mds_dt_tipc.c
+++ b/osaf/libs/core/mds/mds_dt_tipc.c
@@ -51,10 +51,7 @@
/* Added for the subscription changes */
/*
- * In the default addressing scheme TIPC addresses will be 1.1.31, 1.1.47.
- * The slot ID is shifted 4 bits up and subslot ID is added in the 4 LSB.
- * When use of subslot ID is disabled (set MDS_USE_SUBSLOT_ID=0 in CFLAGS), the
- * TIPC addresses will be 1.1.1, 1.1.2, etc.
+ * The TIPC addresses will be 1.1.1, 1.1.2, etc.
*/
/* Following is defined for use by MDS in TIPC 2.0 as TIPC 2.0 supports only network order */
diff --git a/osaf/services/infrastructure/fm/config/fmd.conf b/osaf/services/infrastructure/fm/config/fmd.conf
--- a/osaf/services/infrastructure/fm/config/fmd.conf
+++ b/osaf/services/infrastructure/fm/config/fmd.conf
@@ -7,12 +7,6 @@
#########################################
export FM_TARGET_SYSTEM_ARCH="ATCA"
-export FM_CONTROLLER1_SLOT=1
-export FM_CONTROLLER1_SUBSLOT=15
-
-export FM_CONTROLLER2_SLOT=2
-export FM_CONTROLLER2_SUBSLOT=15
-
# Healthcheck keys
export FMS_HA_ENV_HEALTHCHECK_KEY="Default"
diff --git a/osaf/services/infrastructure/fm/fms/fm_mds.c b/osaf/services/infrastructure/fm/fms/fm_mds.c
--- a/osaf/services/infrastructure/fm/fms/fm_mds.c
+++ b/osaf/services/infrastructure/fm/fms/fm_mds.c
@@ -500,7 +500,7 @@ static uint32_t fm_mds_rcv_evt(FM_CB *cb
*
* Description : Posts an event to mail box.
*
-* Arguments : Control Block, Pointer to event, slot, subslot and Event Code.
+* Arguments : Control Block, Pointer to event, node ID and Event Code.
*
* Return Values : NCSCC_RC_FAILURE/NCSCC_RC_SUCCESS
*
diff --git a/osaf/services/infrastructure/nid/config/Makefile.am b/osaf/services/infrastructure/nid/config/Makefile.am
--- a/osaf/services/infrastructure/nid/config/Makefile.am
+++ b/osaf/services/infrastructure/nid/config/Makefile.am
@@ -30,9 +30,7 @@ endif
set-default-node-config:
@echo "*** Setting default controller node configuration ***"
- echo "2" > $(DESTDIR)$(pkgsysconfdir)/chassis_id
echo "1" > $(DESTDIR)$(pkgsysconfdir)/slot_id
- echo "15" > $(DESTDIR)$(pkgsysconfdir)/subslot_id
echo "controller" > $(DESTDIR)$(pkgsysconfdir)/node_type
install-data-hook: set-default-node-config
diff --git a/osaf/services/infrastructure/nid/scripts/configure_tipc.in b/osaf/services/infrastructure/nid/scripts/configure_tipc.in
--- a/osaf/services/infrastructure/nid/scripts/configure_tipc.in
+++ b/osaf/services/infrastructure/nid/scripts/configure_tipc.in
@@ -20,21 +20,11 @@
. $pkgsysconfdir/nid.conf
TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
-CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
SLOT_ID_FILE=$pkgsysconfdir/slot_id
-SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
# Configure TIPC in network mode. If the variable TIPC_MODULE points to a file,
# 'insmod' is used else 'modprobe'. 'tipc-config' needs to be in the path.
-# Support for using subslot ID as part the TIPC network address.
-# When TIPC_USE_SUBSLOT_ID is set to "NO" (the default), the subslot ID is
-# not included in the address and slot ID is not shifted thus producing
-# TIPC addresses like 1.1.1, 1.1.2, 1.1.3 etc.
-# When TIPC_USE_SUBSLOT_ID is set to "YES", the subslot ID becomes the last 4 bits
-# of the address and the slot ID is shifted up 4 bits.
-USE_SUBSLOT_ID=${TIPC_USE_SUBSLOT_ID:-"NO"}
-
# Currently supported max nodes for Opensaf
TIPC_MAX_NODES=2000
@@ -54,18 +44,6 @@ if ! [ -x ${tipc_config} ]; then
echo "error: tipc-config is not available"
exit 1
fi
-# Get the Chassis Id and Slot Id from @sysconfdir@/@PACKAGE_NAME@/chassis_id and @sysconfdir@/@PACKAGE_NAME@/slot_id
-if ! test -f "$CHASSIS_ID_FILE"; then
- echo "$CHASSIS_ID_FILE doesnt exists, exiting ...."
- exit 1
-fi
-CHASSIS_ID=`cat "$CHASSIS_ID_FILE"`
-if [ "$CHASSIS_ID" -gt "16" ] || [ "$CHASSIS_ID" -lt "1" ]
- then
- echo "CHASSIS ID Should be in the range of 1 to 16"
- echo "Quitting......"
- exit 1
-fi
if ! test -f "$SLOT_ID_FILE"; then
echo "$SLOT_ID_FILE doesnt exists, exiting ...."
exit 1
@@ -77,16 +55,6 @@ if [ "$SLOT_ID" -gt "4095" ] || [ "$SLOT
echo "Quitting......"
exit 1
fi
-if ! test -f $SUBSLOT_ID_FILE; then
- echo "$SLOT_ID_FILE doesnt exist, exiting ...."
- exit 1
-fi
-SUBSLOT_ID=`cat $SUBSLOT_ID_FILE`
-if [ "$SUBSLOT_ID" -gt "15" ] || [ "$SUBSLOT_ID" -lt "0" ]; then
- echo "SUBSLOT ID Should be in the range of 0 to 15"
- echo "Quitting......"
- exit 1
-fi
if [ "$#" -lt "1" ] || [ "$#" -gt "4" ]
then
@@ -113,14 +81,9 @@ if [ $# -gt 1 ] ; then
fi
fi
-printf "00%02x%02x%02x\n" $CHASSIS_ID $((SLOT_ID & 255)) $((SUBSLOT_ID ^ ((SLOT_ID >> 8) & 15) )) > $pkglocalstatedir/node_id
+printf "000000%02x\n" $SLOT_ID > $pkglocalstatedir/node_id
chmod 744 $pkglocalstatedir/node_id
-if [ "$USE_SUBSLOT_ID" = "YES" ]; then
- TIPC_NODEID=$(($SLOT_ID << $SHIFT4))
- TIPC_NODEID=$(($TIPC_NODEID + $SUBSLOT_ID))
-else
- TIPC_NODEID=$SLOT_ID
-fi
+TIPC_NODEID=$SLOT_ID
function tipc_duplicate_node_detect ()
{
diff --git a/osaf/services/infrastructure/nid/scripts/opensafd.in b/osaf/services/infrastructure/nid/scripts/opensafd.in
--- a/osaf/services/infrastructure/nid/scripts/opensafd.in
+++ b/osaf/services/infrastructure/nid/scripts/opensafd.in
@@ -141,20 +141,7 @@ final_clean() {
}
generate_nodeid() {
- CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
SLOT_ID_FILE=$pkgsysconfdir/slot_id
- SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
- if ! test -f "$CHASSIS_ID_FILE"; then
- echo "$CHASSIS_ID_FILE doesnt exists, exiting ...."
- exit 1
- fi
- CHASSIS_ID=`cat "$CHASSIS_ID_FILE"`
- if [ "$CHASSIS_ID" -gt "16" ] || [ "$CHASSIS_ID" -lt "1" ]
- then
- echo "CHASSIS ID Should be in the range of 1 to 16"
- echo "Quitting......"
- exit 1
- fi
if ! test -f "$SLOT_ID_FILE"; then
echo "$SLOT_ID_FILE doesnt exists, exiting ...."
exit 1
@@ -166,17 +153,7 @@ generate_nodeid() {
echo "Quitting......"
exit 1
fi
- if ! test -f $SUBSLOT_ID_FILE; then
- echo "$SLOT_ID_FILE doesnt exist, exiting ...."
- exit 1
- fi
- SUBSLOT_ID=`cat $SUBSLOT_ID_FILE`
- if [ "$SUBSLOT_ID" -gt "15" ] || [ "$SUBSLOT_ID" -lt "0" ]; then
- echo "SUBSLOT ID Should be in the range of 0 to 15"
- echo "Quitting......"
- exit 1
- fi
- printf "00%02x%02x%02x\n" $CHASSIS_ID $((SLOT_ID & 255)) $((SUBSLOT_ID ^ ((SLOT_ID >> 8) & 15) )) > $pkglocalstatedir/node_id
+ printf "000000%02x\n" $SLOT_ID > $pkglocalstatedir/node_id
chmod 744 $pkglocalstatedir/node_id
}
diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c b/osaf/services/saf/cpsv/cpd/cpd_db.c
--- a/osaf/services/saf/cpsv/cpd/cpd_db.c
+++ b/osaf/services/saf/cpsv/cpd/cpd_db.c
@@ -1214,7 +1214,7 @@ uint32_t cpd_process_cpnd_del(CPD_CB *cb
uint32_t cpd_get_slot_sub_id_from_mds_dest(MDS_DEST dest)
{
- return GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
+ return GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
}
/********************************************************************************
@@ -1228,7 +1228,7 @@ uint32_t cpd_get_slot_sub_id_from_mds_de
uint32_t cpd_get_slot_sub_slot_id_from_node_id(NCS_NODE_ID i_node_id)
{
- return GetSlotSubslotIdFromNodeId(i_node_id);
+ return GetSlotIdFromNodeId(i_node_id);
}
/*******************************************************************************************
diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_db.c b/osaf/services/saf/cpsv/cpnd/cpnd_db.c
--- a/osaf/services/saf/cpsv/cpnd/cpnd_db.c
+++ b/osaf/services/saf/cpsv/cpnd/cpnd_db.c
@@ -756,7 +756,7 @@ void cpnd_allrepl_write_evt_node_tree_de
*********************************************************************************/
uint32_t cpnd_get_slot_sub_slot_id_from_mds_dest(MDS_DEST dest)
{
- return GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
+ return GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
}
/***********************************************************************************
@@ -767,7 +767,7 @@ uint32_t cpnd_get_slot_sub_slot_id_from_
*********************************************************************************/
uint32_t cpnd_get_slot_sub_slot_id_from_node_id(NCS_NODE_ID i_node_id)
{
- return GetSlotSubslotIdFromNodeId(i_node_id);
+ return GetSlotIdFromNodeId(i_node_id);
}
/******************************************************************************************
diff --git a/osaf/services/saf/immsv/immd/immd_db.c b/osaf/services/saf/immsv/immd/immd_db.c
--- a/osaf/services/saf/immsv/immd/immd_db.c
+++ b/osaf/services/saf/immsv/immd/immd_db.c
@@ -288,28 +288,28 @@ uint32_t immd_cb_db_destroy(IMMD_CB *cb)
}
/*****************************************************************************
- Name : immd_get_slot_and_subslot_id_from_mds_dest
+ Name : immd_get_slot_id_from_mds_dest
- Description : To get the physical slot & subslot unique id from the mds_dest
+ Description : To get the physical slot unique id from the mds_dest
Arguments :
*****************************************************************************/
-uint32_t immd_get_slot_and_subslot_id_from_mds_dest(MDS_DEST dest)
+uint32_t immd_get_slot_id_from_mds_dest(MDS_DEST dest)
{
- return GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
+ return GetSlotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest));
}
/*****************************************************************************
- Name : immd_get_slot_and_subslot_id_from_node_id
+ Name : immd_get_slot_id_from_node_id
- Description : To get the physical slot & sbuslot unique id from the node id
+ Description : To get the physical slot unique id from the node id
Arguments :
*****************************************************************************/
-uint32_t immd_get_slot_and_subslot_id_from_node_id(NCS_NODE_ID node_id)
+uint32_t immd_get_slot_id_from_node_id(NCS_NODE_ID node_id)
{
- return GetSlotSubslotIdFromNodeId(node_id);
+ return GetSlotIdFromNodeId(node_id);
}
void immd_db_save_fevs(IMMD_CB *cb, IMMSV_FEVS *fevs_msg)
diff --git a/osaf/services/saf/immsv/immd/immd_evt.c b/osaf/services/saf/immsv/immd/immd_evt.c
--- a/osaf/services/saf/immsv/immd/immd_evt.c
+++ b/osaf/services/saf/immsv/immd/immd_evt.c
@@ -608,7 +608,7 @@ static void immd_req_sync(IMMD_CB *cb, I
}
}
- if (cb->is_rem_immnd_up && (cb->immd_remote_id == immd_get_slot_and_subslot_id_from_node_id(cb->immnd_coord))) {
+ if (cb->is_rem_immnd_up && (cb->immd_remote_id == immd_get_slot_id_from_node_id(cb->immnd_coord))) {
/*Coord immnd is at remote, i.e. at standby SC. */
TRACE_5("Send-3 SYNC_REQ to remote coord IMMND at standby SC, dest:%" PRIu64, cb->rem_immnd_dest);
proc_rc = immd_mds_msg_send(cb, NCSMDS_SVC_ID_IMMND, cb->rem_immnd_dest, &rqsync_evt);
@@ -1493,7 +1493,7 @@ static uint32_t immd_evt_proc_immnd_intr
node_info->isOnController = true;
LOG_NO("New IMMND process is on ACTIVE Controller at %x", node_info->immnd_key);
} else if (cb->immd_remote_id && m_IMMND_IS_ON_SCXB(cb->immd_remote_id,
- immd_get_slot_and_subslot_id_from_mds_dest(sinfo->dest))) {
+ immd_get_slot_id_from_mds_dest(sinfo->dest))) {
node_info->isOnController = true;
if (cb->is_rem_immnd_up) {
@@ -2614,7 +2614,7 @@ static uint32_t immd_evt_proc_mds_evt(IM
TRACE_5("Process MDS EVT NCSMDS_RED_DOWN, my PID:%u", getpid());
osafassert(cb->node_id != mds_info->node_id);
//#1773 #1819
- if(cb->immd_remote_id == immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id)) {
+ if(cb->immd_remote_id == immd_get_slot_id_from_node_id(mds_info->node_id)) {
LOG_WA("IMMD lost contact with peer IMMD (NCSMDS_RED_DOWN)");
cb->immd_remote_up = false;
@@ -2634,7 +2634,7 @@ static uint32_t immd_evt_proc_mds_evt(IM
MDS_DEST tmpDest = 0LL;
TRACE_5("Remote IMMD is UP.");
- cb->immd_remote_id = immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id);
+ cb->immd_remote_id = immd_get_slot_id_from_node_id(mds_info->node_id);
cb->immd_remote_up = true;
/*Check if the SBY IMMND has already identified itself.
@@ -2652,7 +2652,7 @@ static uint32_t immd_evt_proc_mds_evt(IM
node_info->isOnController = true;
TRACE_5("Located STDBY IMMND = %x node_id:%x",
- immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id),
+ immd_get_slot_id_from_node_id(mds_info->node_id),
mds_info->node_id);
immd_accept_node(cb, node_info, true, false); /* <==== Can not be sc-absence veteran if on sc. */
}
@@ -2673,12 +2673,12 @@ static uint32_t immd_evt_proc_mds_evt(IM
}
if (mds_info->svc_id == NCSMDS_SVC_ID_IMMND) {
- phy_slot_sub_slot = immd_get_slot_and_subslot_id_from_mds_dest(mds_info->dest);
+ phy_slot_sub_slot = immd_get_slot_id_from_mds_dest(mds_info->dest);
immd_immnd_info_node_find_add(&cb->immnd_tree, &mds_info->dest, &node_info, &add_flag);
LOG_IN("node with dest ADDED %" PRIu64, mds_info->dest);
if (m_IMMND_IS_ON_SCXB(cb->immd_self_id,
- immd_get_slot_and_subslot_id_from_mds_dest(mds_info->dest))) {
+ immd_get_slot_id_from_mds_dest(mds_info->dest))) {
TRACE_5("NCSMDS_UP for IMMND local");
cb->is_loc_immnd_up = true;
cb->loc_immnd_dest = mds_info->dest;
@@ -2689,7 +2689,7 @@ static uint32_t immd_evt_proc_mds_evt(IM
/* When IMMND ON STANDBY COMES UP */
if (m_IMMND_IS_ON_SCXB(cb->immd_remote_id,
- immd_get_slot_and_subslot_id_from_mds_dest(mds_info->dest))) {
+ immd_get_slot_id_from_mds_dest(mds_info->dest))) {
TRACE_5("REMOTE IMMND UP - node:%x", mds_info->node_id);
cb->is_rem_immnd_up = true; //ABT BUGFIX 080811
cb->rem_immnd_dest = mds_info->dest;
@@ -2729,11 +2729,11 @@ static uint32_t immd_evt_proc_mds_evt(IM
goto done;
}
- if (m_IMMND_IS_ON_SCXB(cb->immd_self_id, immd_get_slot_and_subslot_id_from_mds_dest(mds_info->dest))) {
+ if (m_IMMND_IS_ON_SCXB(cb->immd_self_id, immd_get_slot_id_from_mds_dest(mds_info->dest))) {
TRACE_5("NCSMDS_DOWN => local IMMND down");
cb->is_loc_immnd_up = false;
} else if (m_IMMND_IS_ON_SCXB(cb->immd_remote_id,
- immd_get_slot_and_subslot_id_from_mds_dest(mds_info->dest))) {
+ immd_get_slot_id_from_mds_dest(mds_info->dest))) {
TRACE_5("NCSMDS_DOWN, remote IMMND/IMMD ?? down");
cb->is_rem_immnd_up = false;
}
diff --git a/osaf/services/saf/immsv/immd/immd_mds.c b/osaf/services/saf/immsv/immd/immd_mds.c
--- a/osaf/services/saf/immsv/immd/immd_mds.c
+++ b/osaf/services/saf/immsv/immd/immd_mds.c
@@ -172,7 +172,7 @@ uint32_t immd_mds_register(IMMD_CB *cb,
/* Get the node id of local IMMD */
cb->node_id = m_NCS_GET_NODE_ID;
- cb->immd_self_id = immd_get_slot_and_subslot_id_from_node_id(cb->node_id);
+ cb->immd_self_id = immd_get_slot_id_from_node_id(cb->node_id);
TRACE_5("NodeId:%x SelfId:%x", cb->node_id, cb->immd_self_id);
return NCSCC_RC_SUCCESS;
}
diff --git a/osaf/services/saf/immsv/immd/immd_proc.c b/osaf/services/saf/immsv/immd/immd_proc.c
--- a/osaf/services/saf/immsv/immd/immd_proc.c
+++ b/osaf/services/saf/immsv/immd/immd_proc.c
@@ -337,7 +337,7 @@ bool immd_proc_elect_coord(IMMD_CB *cb,
if (!cb->is_rem_immnd_up) {
if (cb->immd_remote_id &&
m_IMMND_IS_ON_SCXB(cb->immd_remote_id,
- immd_get_slot_and_subslot_id_from_mds_dest(immnd_info_node->immnd_dest)))
+ immd_get_slot_id_from_mds_dest(immnd_info_node->immnd_dest)))
{
cb->is_rem_immnd_up = true; /*ABT BUGFIX 080905 */
cb->rem_immnd_dest = immnd_info_node->immnd_dest;
@@ -643,11 +643,11 @@ uint32_t immd_process_immnd_down(IMMD_CB
}
} else {
/* Check if it was the IMMND on the active controller that went down. */
- if (immd_get_slot_and_subslot_id_from_node_id(immnd_info->immnd_key) == cb->immd_remote_id) {
+ if (immd_get_slot_id_from_node_id(immnd_info->immnd_key) == cb->immd_remote_id) {
LOG_WA("IMMND DOWN on active controller %x "
"detected at standby immd!! %x. "
"Possible failover",
- immd_get_slot_and_subslot_id_from_node_id(immnd_info->immnd_key), cb->immd_self_id);
+ immd_get_slot_id_from_node_id(immnd_info->immnd_key), cb->immd_self_id);
possible_fo = true;
if (immnd_info->isCoord && immnd_info->syncStarted) {
immd_proc_abort_sync(cb, immnd_info);
diff --git a/osaf/services/saf/immsv/immd/immd_proc.h b/osaf/services/saf/immsv/immd/immd_proc.h
--- a/osaf/services/saf/immsv/immd/immd_proc.h
+++ b/osaf/services/saf/immsv/immd/immd_proc.h
@@ -41,8 +41,8 @@ void immd_cb_dump(void);
uint32_t immd_mbcsv_chgrole(IMMD_CB *cb, SaAmfHAStateT ha_state);
uint32_t immd_mbcsv_encode_proc(NCS_MBCSV_CB_ARG *arg);
-uint32_t immd_get_slot_and_subslot_id_from_mds_dest(MDS_DEST dest);
-uint32_t immd_get_slot_and_subslot_id_from_node_id(NCS_NODE_ID node_id);
+uint32_t immd_get_slot_id_from_mds_dest(MDS_DEST dest);
+uint32_t immd_get_slot_id_from_node_id(NCS_NODE_ID node_id);
uint32_t immd_mbcsv_register(IMMD_CB *cb);
uint32_t immd_mbcsv_finalize(IMMD_CB *cb);
uint32_t immd_mbcsv_close(IMMD_CB *cb);
diff --git a/osaf/services/saf/mqsv/mqd/mqd_mds.c b/osaf/services/saf/mqsv/mqd/mqd_mds.c
--- a/osaf/services/saf/mqsv/mqd/mqd_mds.c
+++ b/osaf/services/saf/mqsv/mqd/mqd_mds.c
@@ -567,7 +567,7 @@ static void mqd_mds_svc_evt(MQD_CB *pMqd
case NCSMDS_UP:
{
if (svc->i_svc_id == NCSMDS_SVC_ID_MQND) {
- SlotSubslotId to_dest_slotid;
+ SlotId to_dest_slotid;
uint16_t o_msg_fmt_ver;
to_dest_slotid = mqsv_get_phy_slot_id(svc->i_dest);
diff --git a/osaf/services/saf/plmsv/plms/plms_mds.c b/osaf/services/saf/plmsv/plms/plms_mds.c
--- a/osaf/services/saf/plmsv/plms/plms_mds.c
+++ b/osaf/services/saf/plmsv/plms/plms_mds.c
@@ -32,15 +32,15 @@ void plms_mds_unregister();
/*****************************************************************************
- Name : plms_get_slot_and_subslot_id_from_node_id
+ Name : plms_get_slot_id_from_node_id
Description : To get the physical slot & sbuslot unique id from the node id
Arguments :
*****************************************************************************/
-SaUint32T plms_get_slot_and_subslot_id_from_node_id(NCS_NODE_ID node_id)
+SaUint32T plms_get_slot_id_from_node_id(NCS_NODE_ID node_id)
{
- return GetSlotSubslotIdFromNodeId(node_id);
+ return GetSlotIdFromNodeId(node_id);
}
@@ -219,7 +219,7 @@ SaUint32T plms_mds_register()
/* Get the node id of local PLMS */
cb->node_id = m_NCS_GET_NODE_ID;
- cb->plms_self_id = plms_get_slot_and_subslot_id_from_node_id(cb->node_id);
+ cb->plms_self_id = plms_get_slot_id_from_node_id(cb->node_id);
TRACE_5("NodeId:%x SelfId:%x", cb->node_id, cb->plms_self_id);
TRACE_LEAVE();
return NCSCC_RC_SUCCESS;
diff --git a/osaf/services/saf/smfsv/smfd/smfd_main.c b/osaf/services/saf/smfsv/smfd/smfd_main.c
--- a/osaf/services/saf/smfsv/smfd/smfd_main.c
+++ b/osaf/services/saf/smfsv/smfd/smfd_main.c
@@ -133,8 +133,8 @@ uint32_t smfd_cb_init(smfd_cb_t * smfd_c
smfd_cb->clusterRebootCmd = NULL;
smfd_cb->smfnd_list = NULL;
- smfd_cb->smfNodeIdControllers[0] = 0x2010f;
- smfd_cb->smfNodeIdControllers[1] = 0x2020f;
+ smfd_cb->smfNodeIdControllers[0] = 0x1;
+ smfd_cb->smfNodeIdControllers[1] = 0x2;
smfd_cb->smfControllersUp[0] = false;
smfd_cb->smfControllersUp[1] = false;
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel