osaf/services/infrastructure/nid/scripts/configure_tipc.in | 6 +++--- osaf/services/infrastructure/nid/scripts/opensafd.in | 6 +++--- 2 files changed, 6 insertions(+), 6 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/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 @@ -71,9 +71,9 @@ if ! test -f "$SLOT_ID_FILE"; then exit 1 fi SLOT_ID=`cat "$SLOT_ID_FILE"` -if [ "$SLOT_ID" -gt "255" ] || [ "$SLOT_ID" -lt "1" ] +if [ "$SLOT_ID" -gt "4095" ] || [ "$SLOT_ID" -lt "1" ] then - echo "SLOT ID Should be in the range of 1 to 255" + echo "SLOT ID Should be in the range of 1 to 4095" echo "Quitting......" exit 1 fi @@ -113,7 +113,7 @@ if [ $# -gt 1 ] ; then fi fi -printf "00%02x%02x%02x\n" $CHASSIS_ID $SLOT_ID $SUBSLOT_ID > $pkglocalstatedir/node_id +printf "00%02x%02x%02x\n" $CHASSIS_ID $((SLOT_ID & 255)) $((SUBSLOT_ID ^ ((SLOT_ID >> 8) & 15) )) > $pkglocalstatedir/node_id chmod 744 $pkglocalstatedir/node_id if [ "$USE_SUBSLOT_ID" = "YES" ]; then TIPC_NODEID=$(($SLOT_ID << $SHIFT4)) 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 @@ -160,9 +160,9 @@ generate_nodeid() { exit 1 fi SLOT_ID=`cat "$SLOT_ID_FILE"` - if [ "$SLOT_ID" -gt "255" ] || [ "$SLOT_ID" -lt "1" ] + if [ "$SLOT_ID" -gt "4095" ] || [ "$SLOT_ID" -lt "1" ] then - echo "SLOT ID Should be in the range of 1 to 255" + echo "SLOT ID Should be in the range of 1 to 4095" echo "Quitting......" exit 1 fi @@ -176,7 +176,7 @@ generate_nodeid() { echo "Quitting......" exit 1 fi - printf "00%02x%02x%02x\n" $CHASSIS_ID $SLOT_ID $SUBSLOT_ID > $pkglocalstatedir/node_id + printf "00%02x%02x%02x\n" $CHASSIS_ID $((SLOT_ID & 255)) $((SUBSLOT_ID ^ ((SLOT_ID >> 8) & 15) )) > $pkglocalstatedir/node_id chmod 744 $pkglocalstatedir/node_id } ------------------------------------------------------------------------------ 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