[ofa-general] Re: [PATCH] opensm/osm_pkey_mgr.c: setting/clearing both inbound and outbound partition enforcements
Sasha Khapyorsky
sashak at voltaire.com
Thu Dec 27 08:35:39 PST 2007
Hi Yevgeny,
On 17:39 Thu 27 Dec , Yevgeny Kliteynik wrote:
> Turning on inbound partition enforcement bit on switch ports -
> undoing part of the changes that were done by the previous pkey patch.
It looks like full revert, is it what did you mean?
As far as I understand Hal's point was different - to set *full* P_Key
values on switch's ports (and revert original patch). Not quite sure it
is the best option - IMO it doesn't enforce limited-to-limited
communication at nearest switch port and breaks limited-to-limited
enforcement on outbound ports. However I don't see an ideal solution
here. Finally we will need sort of convention.
Sasha
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> ---
> opensm/opensm/osm_pkey_mgr.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
> index 209fa71..61bd076 100644
> --- a/opensm/opensm/osm_pkey_mgr.c
> +++ b/opensm/opensm/osm_pkey_mgr.c
> @@ -212,7 +212,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
>
> p_pi = &p_physp->port_info;
>
> - if (((p_pi->vl_enforce & 0xc) == 0x4 && enforce) ||
> + if (((p_pi->vl_enforce & 0xc) == 0xc && enforce) ||
> ((p_pi->vl_enforce & 0xc) == 0 && !enforce)) {
> osm_log(p_log, OSM_LOG_DEBUG,
> "pkey_mgr_enforce_partition: "
> @@ -229,11 +229,10 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
>
> p_pi = (ib_port_info_t *) payload;
>
> - /* clearing enforcement in both directions */
> - p_pi->vl_enforce &= ~0xc;
> - if (enforce == TRUE)
> - /* enforcing only in outbound direction */
> - p_pi->vl_enforce |= 0x4;
> + if (enforce)
> + p_pi->vl_enforce |= 0xc;
> + else
> + p_pi->vl_enforce &= ~0xc;
>
> p_pi->state_info2 = 0;
> ib_port_info_set_port_state(p_pi, IB_LINK_NO_CHANGE);
> --
> 1.5.1.4
>
More information about the general
mailing list