[openib-general] [PATCH] osm: TRIVIAL code cleanup
Yevgeny Kliteynik
kliteyn at mellanox.co.il
Mon Aug 28 01:11:53 PDT 2006
Hi Hal.
I noticed that there are some unused defaults:
OSM_DEFAULT_MGRP_MTU and OSM_DEFAULT_MGRP_RATE.
The corresponding values in the code are hadcoded.
Fixed the code to use these defaults, and updated the
OSM_DEFAULT_MGRP_MTU to the value that was hardcoded.
Yevgeny
Signed-off-by: Yevgeny Kliteynik <kliteyn at mellanox.co.il>
Index: include/opensm/osm_sa_mcmember_record.h
===================================================================
--- include/opensm/osm_sa_mcmember_record.h (revision 9107)
+++ include/opensm/osm_sa_mcmember_record.h (working copy)
@@ -374,12 +374,12 @@ osm_mcmr_rcv_find_or_create_new_mgrp(
* OSM_DEFAULT_MGRP_MTU
*
* DESCRIPTION
-* Default MTU used for new MGRP creation (256 bytes)
+* Default MTU used for new MGRP creation (2048 bytes)
* Note it includes the MTUSelector which is set to "Greater Than"
*
* SYNOPSIS
*/
-#define OSM_DEFAULT_MGRP_MTU 0x01
+#define OSM_DEFAULT_MGRP_MTU 0x04
/***********/
/****d* OpenSM: MC Member Record Receiver/OSM_DEFAULT_MGRP_RATE
Index: opensm/osm_prtn.c
===================================================================
--- opensm/osm_prtn.c (revision 9107)
+++ opensm/osm_prtn.c (working copy)
@@ -216,10 +216,10 @@ ib_api_status_t osm_prtn_add_mcgroup(osm
memcpy(&mc_rec.mgid.raw[4], &pkey, sizeof(pkey));
mc_rec.qkey = CL_HTON32(0x0b1b);
- mc_rec.mtu = (mtu ? mtu : 4) | (2 << 6); /* 2048 Bytes */
+ mc_rec.mtu = (mtu ? mtu : OSM_DEFAULT_MGRP_MTU) | (2 << 6);
mc_rec.tclass = 0;
mc_rec.pkey = pkey;
- mc_rec.rate = (rate ? rate : 0x3) | (2 << 6); /* 10Gb/sec */
+ mc_rec.rate = (rate ? rate : OSM_DEFAULT_MGRP_RATE) | (2 << 6);
mc_rec.pkt_life = OSM_DEFAULT_SUBNET_TIMEOUT;
mc_rec.sl_flow_hop = ib_member_set_sl_flow_hop(p->sl, 0, 0);
/* Note: scope needs to be consistent with MGID */
More information about the general
mailing list