opensm/osm_vl15intf.c: Fix transaction ID printing in vl15_send_mad
PATCH 1/1 opensm/osm_vl15intf.c: Fix transaction ID printing in vl15_send_mad
opensm/osm_vl15intf.c: Fix transaction ID printing in vl15_send_mad
Rather than reverting commit 546399c3b983cdfe7adf4bd0b179358744603478, another alternative is to save off the transaction ID prior to sending the MAD.
This resolves OpenSM crash when accessing fields of mad that has already been returned to the pool.
---
opensm/opensm/osm_vl15intf.c +4 -1
@@ -3,6 +3,7 @@* Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. +* Copyright (c) 2009 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU
@@ -57,6 +58,7 @@static void vl15_send_mad (osm_vl15_t * p_vl,osm_madw_t * p_madw) {ib_api_status_t status; +ib_net64_t trans_id;/* Non-response-expected mads are not throttled on the wire
@@ -76,6 +78,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)cl_atomic_inc (&p_vl->p_stats->qp0_unicasts_sent);cl_atomic_inc (&p_vl->p_stats->qp0_mads_sent); + trans_id = p_madw->p_mad->trans_id; status =osm_vendor_send (osm_madw_get_bind_handle (p_madw), p_madw, p_madw->resp_expected);
@@ -93,7 +96,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)OSM_LOG (p_vl->p_log,OSM_LOG_ERROR ,"ERR 3E03: " "MAD send failed (%s), TID 0x%" PRIx64"\n" , -ib_get_err_str (status),cl_ntoh64 (p_madw->p_mad->trans_id)); +ib_get_err_str (status),cl_ntoh64 (trans_id));/* The MAD was never successfully sent, so
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Hal Rosenstock
opensm/osm_vl15intf.c: Fix transaction ID printing invl15_send_madRather than reverting commit
546399c3b983cdfe7adf4bd0b179358744603478, another alternative is to save off the transaction ID prior to sending the MAD.
Right, this one is much better :)
-- Yevgeny
Quoted 35 lines
This resolves OpenSM crash when accessing fields of mad that has already been returned to the pool.
Signed-off-by Hal Rosenstock<[email protected]>---
opensm/opensm/osm_vl15intf.c +3
-0@@ -3,6 +3,7 @@* Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. +* Copyright (c) 2009 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -57,6 +58,7 @@static void vl15_send_mad (osm_vl15_t * p_vl,osm_madw_t * p_madw) {ib_api_status_t status; +ib_net64_t trans_id;/* Non-response-expected mads are not throttled on the wire @@ -76,6 +78,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)cl_atomic_inc (&p_vl->p_stats->qp0_unicasts_sent);cl_atomic_inc (&p_vl->p_stats->qp0_mads_sent); + trans_id = p_madw->p_mad->trans_id; status =osm_vendor_send (osm_madw_get_bind_handle (p_madw), p_madw, p_madw->resp_expected);
opensm/opensm/osm_vl15intf.c static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw) · line 102
Quoted 8 lines
opensm/opensm/osm_vl15intf.c +1
-1@@ -93,7 +96,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)OSM_LOG (p_vl->p_log,OSM_LOG_ERROR ,"ERR 3E03: " "MAD send failed (%s), TID 0x%" PRIx64"\n" , -ib_get_err_str (status),cl_ntoh64 (p_madw->p_mad->trans_id)); +ib_get_err_str (status),cl_ntoh64 (trans_id));/* The MAD was never successfully sent, so
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 33 lines · Hal Rosenstock
opensm/osm_vl15intf.c: Fix transaction ID printing invl15_send_madRather than reverting commit
546399c3b983cdfe7adf4bd0b179358744603478, another alternative is to save off the transaction ID prior to sending the MAD.This resolves OpenSM crash when accessing fields of mad that has already been returned to the pool.
Signed-off-by Hal Rosenstock <[email protected]>---
opensm/opensm/osm_vl15intf.c +2
-0@@ -3,6 +3,7 @@* Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. +* Copyright (c) 2009 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -57,6 +58,7 @@static void vl15_send_mad (osm_vl15_t * p_vl,osm_madw_t * p_madw) {ib_api_status_t status; +ib_net64_t trans_id;/* Non-response-expected mads are not throttled on the wire
opensm/opensm/osm_vl15intf.c static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw) · line 81
Quoted 4 lines
opensm/opensm/osm_vl15intf.c +1
-0@@ -76,6 +78,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)cl_atomic_inc (&p_vl->p_stats->qp0_unicasts_sent);cl_atomic_inc (&p_vl->p_stats->qp0_mads_sent); + trans_id = p_madw->p_mad->trans_id;
This variable would make any sense only in case when appropriate log level is set. I think the better way to solve it is to revert the original patch and to print transaction id inside osm_vendor_send() (there is an error message anyway) before madw is freed.
Sasha
Quoted 13 lines
opensm/opensm/osm_vl15intf.c +1
-2status =osm_vendor_send (osm_madw_get_bind_handle (p_madw), p_madw, p_madw->resp_expected);@@ -93,7 +96,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)OSM_LOG (p_vl->p_log,OSM_LOG_ERROR ,"ERR 3E03: " "MAD send failed (%s), TID 0x%" PRIx64"\n" , -ib_get_err_str (status),cl_ntoh64 (p_madw->p_mad->trans_id)); +ib_get_err_str (status),cl_ntoh64 (trans_id));/* The MAD was never successfully sent, so --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html