[ofa-general] Re: [RFC] [PATCH 2/2] for 2.6.23: ib/sa - add local path record caching
Michael S. Tsirkin
mst at dev.mellanox.co.il
Wed May 30 22:52:51 PDT 2007
It seems that below you try to get 0x7F paths to each dest:
+enum {
+ SA_DB_MAX_PATHS_PER_DEST = 0x7F,
+ SA_DB_MIN_RETRY_TIMER = 4000, /* 4 sec */
+ SA_DB_MAX_RETRY_TIMER = 256000 /* 256 sec */
+};
+
+static int set_paths_per_dest(const char *val, struct kernel_param *kp);
+static unsigned long paths_per_dest = SA_DB_MAX_PATHS_PER_DEST;
+module_param_call(paths_per_dest, set_paths_per_dest, param_get_ulong,
+ &paths_per_dest, 0644);
+MODULE_PARM_DESC(paths_per_dest, "Maximum number of paths to retrieve "
+ "to each destination (DGID). Set to 0 "
+ "to disable cache.");
But here you seem to bypass cache for multi-path queries:
+int ib_sa_path_rec_get(struct ib_sa_client *client,
+ struct ib_device *device, u8 port_num,
+ struct ib_sa_path_rec *rec,
+ ib_sa_comp_mask comp_mask,
+ int timeout_ms, gfp_t gfp_mask,
+ void (*callback)(int status,
+ struct ib_sa_path_rec *resp,
+ void *context),
+ void *context,
+ struct ib_sa_query **sa_query)
+{
+ struct sa_path_request *req;
+ struct ib_sa_attr_iter iter;
+ struct ib_sa_path_rec *path_rec;
+ int ret;
+
+ if (!paths_per_dest)
+ goto query_sa;
+
+ if (!(comp_mask & IB_SA_PATH_REC_DGID) ||
+ !(comp_mask & IB_SA_PATH_REC_NUMB_PATH) || rec->numb_path != 1)
+ goto query_sa;
how are multiple paths used?
--
MST
More information about the general
mailing list