From: Yevgeny Kliteynik <kliteyn-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
To: Jim Schutt <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org,
eitan-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org
Subject: Re: [PATCH 03/11] opensm: Allow the routing engine to participate in path SL calculations.
Date: Thu, 14 Jan 2010 18:24:11 +0200 [thread overview]
Message-ID: <4B4F452B.7040007@mellanox.co.il> (raw)
In-Reply-To: <1258744509-11148-4-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Jim,
On 20/Nov/09 21:15, Jim Schutt wrote:
> LASH already does this, in a hard-coded fashion.
>
> Generalize this by adding a callback to struct osm_routing_engine that
> computes a path SL value, and fix up LASH to use it.
>
> This patchset causes the requested or QoS-computed SL value to be passed
> to the routing engine path SL computation as a hint. In the event the
> routing engine's use of SLs allows it to support more than one QoS level,
> it may be able to make use of the SL hint to do so.
>
> For now, LASH just ignores the hint.
>
> Note that before this change, if LASH was configured and a specific path
> SL value was requested that differed from what LASH needed to route the
> fabric without credit loops, the path SL lookup would fail. Now LASH's
> SL value is always used.
>
> Possibly the choice between failing a path SL request when it conflicts
> with routing, vs. always providing an SL value that gives a credit-loop-
> free routing, should be user-configurable?
SL can come from the following places:
- user requested specific SL in PathRecord query
- QoS policy configuration
- SL specified in partition parameters
- basic QoS (no policies, only SL2VL table)
- routing engine
Except for QoS policy being able to override SL that is specified in
the partition parameters (with an error message in the log), IMHO if
there's a conflict between SLs coming from different constraints
PathRecord should fail to find a satisfiable path, or at least we
should see some error message in the log that the selected SL
conflicts with other OSM configurations, but will be used anyway.
[snip...]
>
> @@ -725,6 +707,14 @@ static ib_api_status_t pr_rcv_get_path_parms(IN osm_sa_t * sa,
> goto Exit;
> }
>
> + /*
> + * If the routing engine wants to have a say in path SL selection,
> + * send the currently computed SL value as a hint and let the routing
> + * engine override it.
> + */
> + if (p_re&& p_re->path_sl)
> + sl = p_re->path_sl(p_re->context, sl, p_src_port, p_dest_port);
>
In addition to error message if routing engine overrides the provided
hint, need to check whether the returned SL is valid - check the
corresponding bit in valid_sl_mask. It might be irrelevant for torus-2QoS
routing (not sure yet, need to read more patches :-) ), but it's
probably needed in general case.
Also, perhaps it would be better to provide the bitmask of available
SLs as a hint if there are more than one suitable SL?
I mean something like this (didn't try it, didn't even compile it,
need corresponding change in the p_re->path_sl callback, it's just
to illustrate what I mean):
---
opensm/opensm/osm_sa_path_record.c | 47
++++++++++++++++++++++-------------
1 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/opensm/opensm/osm_sa_path_record.c
b/opensm/opensm/osm_sa_path_record.c
index 7120d65..6de8979 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -171,7 +171,7 @@ static ib_api_status_t pr_rcv_get_path_parms(IN
osm_sa_t * sa,
uint8_t required_mtu;
uint8_t required_rate;
uint8_t required_pkt_life;
- uint8_t sl;
+ uint8_t sl = OSM_DEFAULT_SL;
uint8_t in_port_num;
ib_net16_t dest_lid;
uint8_t i;
@@ -688,33 +688,44 @@ static ib_api_status_t pr_rcv_get_path_parms(IN
osm_sa_t * sa,
cl_ntoh16(pkey), sl);
} else
sl = p_prtn->sl;
- } else if (sa->p_subn->opt.qos) {
+ }
+
+ /*
+ * If the routing engine wants to have a say in path SL selection,
+ * send the currently computed SL value as a hint and let the routing
+ * engine override it.
+ */
+ if (p_re && p_re->path_sl)
+ sl = p_re->path_sl(p_re->context, valid_sl_mask, p_src_port,
p_dest_port);
+
+ if (sa->p_subn->opt.qos && !(valid_sl_mask & (1 << sl))) {
+ OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F24: "
+ "Selected SL (%u) leads to VL15\n", sl);
+ status = IB_NOT_FOUND;
+ goto Exit;
+ }
+
+ if (!(p_re && p_re->path_sl) &&
+ !(comp_mask & IB_PR_COMPMASK_SL) &&
+ !(p_qos_level && p_qos_level->sl_set) &&
+ !pkey &&
+ (sa->p_subn->opt.qos)) {
if (valid_sl_mask & (1 << OSM_DEFAULT_SL))
sl = OSM_DEFAULT_SL;
else {
for (i = 0; i < IB_MAX_NUM_VLS; i++)
if (valid_sl_mask & (1 << i))
break;
+ if (i == IB_MAX_NUM_VLS) {
+ OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR ABCD: "
+ "bla bla bla\n");
+ status = IB_NOT_FOUND;
+ goto Exit;
+ }
sl = i;
}
- } else
- sl = OSM_DEFAULT_SL;
-
- if (sa->p_subn->opt.qos && !(valid_sl_mask & (1 << sl))) {
- OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F24: "
- "Selected SL (%u) leads to VL15\n", sl);
- status = IB_NOT_FOUND;
- goto Exit;
}
- /*
- * If the routing engine wants to have a say in path SL selection,
- * send the currently computed SL value as a hint and let the routing
- * engine override it.
- */
- if (p_re && p_re->path_sl)
- sl = p_re->path_sl(p_re->context, sl, p_src_port, p_dest_port);
-
/* reset pkey when raw traffic */
if (comp_mask & IB_PR_COMPMASK_RAWTRAFFIC &&
cl_ntoh32(p_pr->hop_flow_raw) & (1 << 31))
--
1.5.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-01-14 16:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 19:14 [PATCH 00/11] Add new torus routing engine: torus-2QoS Jim Schutt
[not found] ` <1258744509-11148-1-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2009-11-20 19:15 ` [PATCH 01/11] opensm: Prepare for routing engine input to path record SL lookup and SL2VL map setup Jim Schutt
2009-11-20 19:15 ` [PATCH 02/11] opensm: Allow the routing engine to influence SL2VL calculations Jim Schutt
[not found] ` <1258744509-11148-3-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2010-01-14 12:36 ` Yevgeny Kliteynik
[not found] ` <4B4F0FBD.3040308-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-01-14 16:01 ` Jim Schutt
2010-02-10 16:15 ` Yevgeny Kliteynik
[not found] ` <4B72DBBD.9020709-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-02-15 21:45 ` Jim Schutt
2009-11-20 19:15 ` [PATCH 03/11] opensm: Allow the routing engine to participate in path SL calculations Jim Schutt
[not found] ` <1258744509-11148-4-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2010-01-14 16:24 ` Yevgeny Kliteynik [this message]
[not found] ` <4B4F452B.7040007-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-01-18 19:24 ` Jim Schutt
[not found] ` <1263842661.5550.43.camel-mgfCWIlwujvg4c9jKm7R2O1ftBKYq+Ku@public.gmane.org>
2010-01-18 20:19 ` Yevgeny Kliteynik
2009-11-20 19:15 ` [PATCH 04/11] opensm: Track the minimum value in the fabric of data VLs supported Jim Schutt
2009-11-20 19:15 ` [PATCH 06/11] opensm: Enable torus-2QoS routing engine Jim Schutt
2009-11-20 19:15 ` [PATCH 07/11] opensm: Add opensm option to specify file name for extra torus-2QoS configuration information Jim Schutt
2009-11-20 19:15 ` [PATCH 08/11] opensm: Do not require -Q option for torus-2QoS routing engine Jim Schutt
2009-11-20 19:15 ` [PATCH 09/11] opensm: Make it possible to configure no fallback " Jim Schutt
[not found] ` <1258744509-11148-9-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2010-03-04 14:35 ` Yevgeny Kliteynik
[not found] ` <4B8FC53C.9060605-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-03-04 21:38 ` Jim Schutt
2009-11-20 19:15 ` [PATCH 10/11] opensm: Avoid havoc in minhop caused by torus-2QoS persistent use of osm_port_t:priv Jim Schutt
2009-11-20 19:15 ` [PATCH 11/11] opensm: Update documentation to describe torus-2QoS Jim Schutt
2009-11-20 19:24 ` [PATCH 05/11] opensm: Add torus-2QoS routing engine Jim Schutt
2009-11-20 19:27 ` torus-2QoS example input files (was Re: [PATCH 00/11] Add new torus routing engine: torus-2QoS) Jim Schutt
2009-12-18 20:50 ` [PATCH 00/12] Add specialized multicast support to new torus routing engine: torus-2QoS Jim Schutt
[not found] ` <1261169461-2516-1-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2009-12-18 20:54 ` [PATCH 05/12] opensm: Enforce torus-2QoS link ordering convention Jim Schutt
2010-02-16 16:16 ` [PATCH 0/3] opensm: Bug fixes for torus-2QoS patchset Jim Schutt
2010-02-16 16:16 ` [PATCH 1/3] opensm: Use local variables when searching for torus-2QoS master spanning tree root Jim Schutt
2010-02-16 16:16 ` [PATCH 2/3] opensm: Fix handling of torus-2QoS topology discovery for radix 4 torus dimensions Jim Schutt
2010-02-16 16:16 ` [PATCH 3/3] opensm: Avoid havoc in dump_ucast_routes() caused by torus-2QoS persistent use of osm_port_t:priv Jim Schutt
2009-12-18 20:50 ` [PATCH 01/12] opensm: Make error message for torus-2QoS dateline specification match code check Jim Schutt
2009-12-18 20:50 ` [PATCH 02/12] opensm: torus-2QoS should fail to route if message deadlock is possible Jim Schutt
2009-12-18 20:50 ` [PATCH 03/12] opensm: Remove unused port specification from torus-2QoS config file parsing Jim Schutt
[not found] ` <1261169461-2516-4-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2009-12-18 20:56 ` Jim Schutt
2009-12-18 20:50 ` [PATCH 04/12] opensm: Fix up some torus-2QoS comments to match code Jim Schutt
2009-12-18 20:50 ` [PATCH 06/12] opensm: Remove redundant function names in torus-2QoS logging Jim Schutt
2009-12-18 20:50 ` [PATCH 07/12] opensm: Make torus-2QoS always use OSM_LOG_INFO, never LOG_INFO Jim Schutt
2009-12-18 20:50 ` [PATCH 08/12] opensm: Add struct osm_routing_engine callback to build spanning trees for multicast Jim Schutt
2009-12-18 20:50 ` [PATCH 09/12] opensm: Make mcast_mgr_purge_tree() available outside osm_mcast_mgr.c Jim Schutt
2009-12-18 20:50 ` [PATCH 10/12] opensm: Implement master spanning tree for torus-2QoS multicast support Jim Schutt
2009-12-18 20:51 ` [PATCH 11/12] opensm: Implement multicast support for torus-2QoS Jim Schutt
2009-12-18 20:51 ` [PATCH 12/12] opensm: Update documentation to describe torus-2QoS multicast support Jim Schutt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4F452B.7040007@mellanox.co.il \
--to=kliteyn-vpraknaxozvs1mouv/rt9w@public.gmane.org \
--cc=eitan-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
--cc=jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox