* [PATCH] opensm/osm_port_info_rcv.c: Don't modify subnet minimal values when PortState DOWN
@ 2012-12-03 21:26 Hal Rosenstock
[not found] ` <50BD18F0.4030900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-12-03 21:26 UTC (permalink / raw)
To: Alex Netes
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
as they are vendor dependent fields in PortInfo and can't be relied on due to:
C14-24.2.1: If PortInfo:Portstate=Down, then
o a SubnGet(PortInfo) shall produce valid data for PortInfo:PortState
and PortInfo:PortPhysicalState; whether any other component has
valid data is vendor-dependent.
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/opensm/osm_port_info_rcv.c b/opensm/osm_port_info_rcv.c
index 6f6922c..859a6be 100644
--- a/opensm/osm_port_info_rcv.c
+++ b/opensm/osm_port_info_rcv.c
@@ -94,7 +94,8 @@ static void pi_rcv_process_endport(IN osm_sm_t * sm, IN osm_physp_t * p_physp,
port_guid = osm_physp_get_port_guid(p_physp);
/* HACK extended port 0 should be handled too! */
- if (osm_physp_get_port_num(p_physp) != 0) {
+ if (osm_physp_get_port_num(p_physp) != 0 &&
+ ib_port_info_get_port_state(p_pi) != IB_LINK_DOWN) {
/* track the minimal endport MTU, rate, and operational VLs */
mtu = ib_port_info_get_mtu_cap(p_pi);
if (mtu < sm->p_subn->min_ca_mtu) {
@@ -323,6 +324,9 @@ static void pi_rcv_process_switch_port(IN osm_sm_t * sm, IN osm_node_t * p_node,
p_physp->port_info = *p_pi;
pi_rcv_process_endport(sm, p_physp, p_pi);
} else {
+ if (ib_port_info_get_port_state(p_pi) == IB_LINK_DOWN)
+ goto Exit;
+
/* track the minimal switch ext port MTU, rate, and operational VLs */
mtu = ib_port_info_get_mtu_cap(p_pi);
if (mtu < sm->p_subn->min_sw_mtu) {
@@ -358,6 +362,7 @@ static void pi_rcv_process_switch_port(IN osm_sm_t * sm, IN osm_node_t * p_node,
}
}
+Exit:
OSM_LOG_EXIT(sm->p_log);
}
--
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] opensm/osm_port_info_rcv.c: Don't modify subnet minimal values when PortState DOWN
[not found] ` <50BD18F0.4030900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2013-01-30 17:49 ` Alex Netes
0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2013-01-30 17:49 UTC (permalink / raw)
To: Hal Rosenstock
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
Hi Hal,
On 16:26 Mon 03 Dec , Hal Rosenstock wrote:
> as they are vendor dependent fields in PortInfo and can't be relied on due to:
>
> C14-24.2.1: If PortInfo:Portstate=Down, then
> o a SubnGet(PortInfo) shall produce valid data for PortInfo:PortState
> and PortInfo:PortPhysicalState; whether any other component has
> valid data is vendor-dependent.
>
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
Applied, thanks.
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-30 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 21:26 [PATCH] opensm/osm_port_info_rcv.c: Don't modify subnet minimal values when PortState DOWN Hal Rosenstock
[not found] ` <50BD18F0.4030900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-01-30 17:49 ` Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).