[openib-general] Re: Re:[PATCH] OpenSM - fix multicast flow in osmtest

Hal Rosenstock halr at voltaire.com
Wed Mar 1 05:49:03 PST 2006


Hi Yael,

On Thu, 2006-02-23 at 03:13, Yael Kalka wrote:
> Hi Hal,
> 
> I have done some work on osmtest/osmt_multicast.c. 
> There was a problem that in the middle of the test and in the end
> there were checks that the only multicast groups that exist are the
> ones discovered in the begining of the test. This isn't always true,
> since multicast groups can be created by other applications during the
> run. What the check should really be is that all the multicast groups
> that were created during the test are deleted. I've added a map of all
> the mlids created in the test, and added the above check.
> Also - inserted back in to the test some code under "#if 0" - checks
> of creation with illegal rate and mtu.

I am still working on this part of the patch.

> Also in the patch is a change to osm_helper.c, osm_dump_mc_record -
> dump all the records of mc (previously not all were printed).

I integrated and committed this part of the patch (to both the trunk and
1.0). Thanks.

-- Hal

> Thanks,
> Yael
> 
> Signed-off-by:  Yael Kalka <yael at mellanox.co.il>
> 
> Index: osmtest/osmt_multicast.c
> ===================================================================
> --- osmtest/osmt_multicast.c	(revision 5457)
> +++ osmtest/osmt_multicast.c	(working copy)
> @@ -45,12 +45,15 @@
>  
>  /* next error code: 16A    */
>  
> +#ifndef __WIN__
>  #include <unistd.h>
> +#endif
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
>  #include <complib/cl_debug.h>
>  #include <complib/cl_memory.h>
> +#include <complib/cl_map.h>
>  #include "osmtest.h"
>  
>  static
> @@ -88,6 +91,7 @@ osmt_query_mcast( IN osmtest_t * const p
>    cl_list_iterator_t  p_mgids_res;
>    cl_status_t cl_status;
>    cl_map_item_t *p_item,*p_next_item;
> +  osmtest_mgrp_t *p_mgrp;
>  
>    OSM_LOG_ENTER( &p_osmt->log, osmt_query_mcast );
>    /*
> @@ -114,7 +118,6 @@ osmt_query_mcast( IN osmtest_t * const p
>    req.pfn_query_cb = osmtest_query_res_cb;
>    req.p_query_input = &user;
>    req.sm_key = 0;
> -  osmtest_mgrp_t *p_mgrp;
>  
>    status = osmv_query_sa( p_osmt->h_bind, &req );
>  
> @@ -422,6 +425,8 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>    ib_node_record_t *p_rec;
>    uint32_t num_recs = 0,i;
>    uint8_t mtu_phys = 0,rate_phys = 0;
> +  cl_map_t test_created_mlids; /* List of all mlids created in this test */
> +  ib_member_rec_t* p_recvd_rec;
>  
>    static ib_gid_t good_mgid = {
>      {
> @@ -462,6 +467,14 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>        0xff, 0xff, 0xff, 0xff,            /*  32 bit IPv4 broadcast address */
>      },
>    };
> +  static ib_gid_t osm_link_local_mgid = {
> +    {
> +      0xFF, 0x02, 0x00, 0x00, 
> +      0x00, 0x00, 0x00, 0x00,
> +      0x00, 0x00, 0x00, 0x00,
> +      0x00, 0x00, 0x00, 0x01
> +    },
> +  };
>  
> 
>    OSM_LOG_ENTER( &p_osmt->log, osmt_run_mcast_flow );
> @@ -480,6 +493,10 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>  
>    }
>  
> +  /* Initialize the test_created_mgrps map */
> +  cl_map_construct(&test_created_mlids);
> +  cl_map_init(&test_created_mlids, 1000);
> +
>    p_mgrp_mlid_tbl = &p_osmt->exp_subn.mgrp_mlid_tbl;
>    osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
>  
> @@ -726,6 +743,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -772,6 +790,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -825,6 +844,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -875,6 +895,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -926,12 +947,10 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> -#if 0
> -  /*  CURRENTLY NOT SUPPORTED !!!! "Unrealizable" condition not available by OSM */
> -
>    /*  o15.0.1.8:  */
>    /*  - Request join with irrelevant RATE : get a ERR_INSUFFICIANT_COMPONENTS */
>    osm_log( &p_osmt->log, OSM_LOG_INFO,
> @@ -968,6 +987,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1006,6 +1026,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1044,6 +1065,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1079,6 +1101,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1120,6 +1143,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1155,16 +1179,19 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> +#if 0
> +  /* Currently PacketLifeTime isn't checked in opensm */
>    /* Check PacketLifeTime as 0 */
>    osm_log( &p_osmt->log, OSM_LOG_INFO,
>             "osmt_run_mcast_flow: "
>             "Checking Create with unrealistic packet life value less than 0 (o15.0.1.8)...\n"
>             );
>  
> -  /* impossible requested rate */
> +  /* impossible requested packet life */
>    mc_req_rec.pkt_life = 0 | IB_PATH_SELECTOR_LESS_THAN << 6;
>  
>    comp_mask =
> @@ -1191,6 +1218,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  #endif
> @@ -1247,6 +1275,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1273,12 +1302,10 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               "Number of MC Records found in SA DB is %d.\n", middle_cnt);
>      if (middle_cnt != start_cnt)
>      {
> -      osm_log( &p_osmt->log, OSM_LOG_ERROR,
> -               "osmt_run_mcast_flow: ERR 02ah: "
> +      osm_log( &p_osmt->log, OSM_LOG_INFO,
> +               "osmt_run_mcast_flow: "
>                 "Got different number of records stored in SA DB (before any creation)\n"
>                 "Instead of %d got %d\n", start_cnt,middle_cnt);
> -      status=IB_ERROR;
> -      goto Exit;
>      }
>    }
>  
> @@ -1332,6 +1359,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1389,6 +1417,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               ib_get_err_str( status ),
>               ib_get_mad_status_str( (ib_mad_t*)(&res_sa_mad) )
>               );
> +    status = IB_ERROR;
>      goto Exit;
>    }
>  
> @@ -1433,6 +1462,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>  
> @@ -1466,7 +1506,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> -
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>  
> @@ -1500,6 +1550,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>     /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>  
> @@ -1532,6 +1593,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>     /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>     /* Using Exact feasible MTU & RATE */
> @@ -1568,6 +1640,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>       /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>     /* Using Exact feasible RATE */
> @@ -1600,7 +1683,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> -
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>       /* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
>     /* Using Exact feasible MTU */
> @@ -1633,6 +1726,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /*  o15.0.1.5:  */
>    /*  - Check the returned MGID is valid. (p 804) */
> @@ -1702,6 +1806,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /*  o15.0.1.6: */
>    /*  - Create a new MCG with valid requested MGID. */
> @@ -1730,6 +1845,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               cl_ntoh64(good_mgid.unicast.interface_id));
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    osm_log( &p_osmt->log, OSM_LOG_INFO,
>             "osmt_run_mcast_flow: "
> @@ -1883,6 +2009,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               cl_ntoh64(good_mgid.unicast.interface_id));
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /* Change the flags to invalid value 0x2 - get back INVALID REQ */
>  
> @@ -1930,14 +2067,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>             "Checking link local MGID 0xFF02:0:0:0:0:0:0:1 (o15.0.1.6)...\n"
>             );
>  
> -  mc_req_rec.mgid = (ib_gid_t) {
> -    {
> -      0xFF, 0x02, 0x00, 0x00,
> -      0x00, 0x00, 0x00, 0x00,
> -      0x00, 0x00, 0x00, 0x00,
> -      0x00, 0x00, 0x00, 0x01
> -    },
> -  };
> +  mc_req_rec.mgid = osm_link_local_mgid;
>  
>    status = osmt_send_mcast_request( p_osmt, 1,
>                                      &mc_req_rec,
> @@ -1953,8 +2083,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> -
> -
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /*  o15.0.1.7 - implicitlly checked during the prev steps. */
>    /*  o15.0.1.8 - implicitlly checked during the prev steps. */
> @@ -1998,7 +2137,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>    /* Lets try a valid join scope state */
>    osm_log( &p_osmt->log, OSM_LOG_INFO,
>             "osmt_run_mcast_flow: "
> -           "Checking new MGID with invalid join state (o15.0.1.9)...\n"
> +           "Checking new MGID with valid join state (o15.0.1.9)...\n"
>             );
>  
>    mc_req_rec.mgid = good_mgid;
> @@ -2082,6 +2221,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               );
>      goto Exit;
>    }
> +  /* Save the mlid created in test_created_mlids map */
> +  p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
> +  osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +           "osmt_run_mcast_flow: "
> +           "Created MGID:0x%016" PRIx64 " : "
> +           "0x%016" PRIx64 " MLID:0x%04X\n",
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +           cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +           cl_ntoh16( p_recvd_rec->mlid ));
> +  cl_map_insert(&test_created_mlids,
> +                cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>  
>    /*  o15.0.1.10 - can't check on a single client .-- obsolete -
>        checked by SilverStorm bug o15-0.2.4, never the less recheck */
> @@ -2984,9 +3134,17 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>        else
>        {
>          cur_mlid = cl_ntoh16(p_mc_res->mlid);
> +        /* Save the mlid created in test_created_mlids map */
> +        p_recvd_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( &res_sa_mad );
>          osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
>                   "osmt_run_mcast_flow : "
> -                 "Added to new MCGroup with Mlid 0x04%x\n",cur_mlid);
> +                 "Created MGID:0x%016" PRIx64 " : "
> +                 "0x%016" PRIx64 " MLID:0x%04X\n",
> +                 cl_ntoh64( p_recvd_rec->mgid.unicast.prefix ),
> +                 cl_ntoh64( p_recvd_rec->mgid.unicast.interface_id ),
> +                 cl_ntoh16( p_recvd_rec->mlid ));
> +        cl_map_insert(&test_created_mlids,
> +                      cl_ntoh16(p_recvd_rec->mlid), p_recvd_rec );
>        }
>        tmp_mlid--;
>      }
> @@ -3070,7 +3228,10 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>               "GetTable of all records has failed!\n");
>      goto Exit;
>    }
> -  /* Only when we are on single mode check flow - do the count comparison, otherwise skip */
> +
> +  /* If we are in single mode check flow - need to make sure all the multicast groups 
> +     that are left are not ones created during the flow.
> +  */
>    if (p_osmt->opt.mmode == 1 || p_osmt->opt.mmode == 3)
>    {
>        end_cnt = cl_qmap_count(&p_osmt->exp_subn.mgrp_mlid_tbl);
> @@ -3080,14 +3241,47 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>            /* when we comapre num of MCG we should consider an outside source which create other MCGs */
>        if ((end_cnt-fail_to_delete_mcg) != (start_cnt - mcg_outside_test_cnt))
>        {
> -        osm_log( &p_osmt->log, OSM_LOG_ERROR,
> -                 "osmt_run_mcast_flow: ERR 02FG: "
> +        osm_log( &p_osmt->log, OSM_LOG_INFO,
> +                 "osmt_run_mcast_flow: "
>                   "Got different number of records stored in SA DB\n\t\t"
>                   "at Start got %d, at End got %d (IPoIB groups only)\n",
>                   (start_cnt-mcg_outside_test_cnt),(end_cnt-fail_to_delete_mcg));
> +      }
> +      p_mgrp_mlid_tbl = &p_osmt->exp_subn.mgrp_mlid_tbl;
> +      p_mgrp = (osmtest_mgrp_t*)cl_qmap_head( p_mgrp_mlid_tbl );
> +      while( p_mgrp != (osmtest_mgrp_t*)cl_qmap_end( p_mgrp_mlid_tbl ) )
> +      {
> +        uint16_t mlid = (uint16_t)cl_qmap_key((cl_map_item_t*)p_mgrp);
> +        osm_log( &p_osmt->log, OSM_LOG_INFO,
> +                 "osmt_run_mcast_flow: "
> +                 "Found MLID:0x%04X\n",
> +                 mlid);
> +        /* Check if the mlid is in the test_created_mlids. If TRUE, then we
> +           didn't delete a MCgroup that was created in this flow. */
> +        if ( cl_map_get (&test_created_mlids, mlid) != NULL )
> +        {
> +          /* This means that we still have an mgrp that we created!! */
> +          osm_log( &p_osmt->log, OSM_LOG_ERROR,
> +                   "osmt_run_mcast_flow: ERR 02FG: "
> +                   "Wasn't able to erase mgrp with MGID:0x%016" PRIx64 " : 0x%016"
> +                   PRIx64 " MLID:0x%04X\n",
> +                   cl_ntoh64(p_mgrp->mcmember_rec.mgid.unicast.prefix),
> +                   cl_ntoh64(p_mgrp->mcmember_rec.mgid.unicast.interface_id),
> +                   mlid );
>          status=IB_ERROR;
>          goto Exit;
>        }
> +        else
> +        {
> +          osm_log( &p_osmt->log, OSM_LOG_INFO,
> +                   "osmt_run_mcast_flow: "
> +                   "Still exists MGID:0x%016" PRIx64 " : 0x%016"
> +                   PRIx64 "\n",
> +                   cl_ntoh64(p_mgrp->mcmember_rec.mgid.unicast.prefix),
> +                   cl_ntoh64(p_mgrp->mcmember_rec.mgid.unicast.interface_id) );
> +        }
> +        p_mgrp = (osmtest_mgrp_t*)cl_qmap_next( &p_mgrp->map_item );
> +      }
>    }
>   Exit:
>    OSM_LOG_EXIT( &p_osmt->log );
> Index: opensm/osm_helper.c
> ===================================================================
> --- opensm/osm_helper.c	(revision 5457)
> +++ opensm/osm_helper.c	(working copy)
> @@ -970,11 +970,14 @@ osm_dump_mc_record(
>               "0x%016" PRIx64 "\n"
>               "\t\t\t\tqkey....................0x%X\n"
>               "\t\t\t\tMlid....................0x%X\n"
> -             "\t\t\t\tScopeState..............0x%X\n"
> -             "\t\t\t\tRate....................0x%X\n"
>               "\t\t\t\tMtu.....................0x%X\n"
>               "\t\t\t\tTClass..................0x%X\n"
> +             "\t\t\t\tpkey....................0x%X\n"
> +             "\t\t\t\tRate....................0x%X\n"
> +             "\t\t\t\tPacketLife..............0x%X\n"
>               "\t\t\t\tSLFlowLabelHopLimit.....0x%X\n"
> +             "\t\t\t\tScopeState..............0x%X\n"
> +             "\t\t\t\tProxyJoin...............0x%X\n"
>               "",
>               cl_ntoh64( p_mcmr->mgid.unicast.prefix ),
>               cl_ntoh64( p_mcmr->mgid.unicast.interface_id ),
> @@ -982,11 +985,14 @@ osm_dump_mc_record(
>               cl_ntoh64( p_mcmr->port_gid.unicast.interface_id ),
>               cl_ntoh32( p_mcmr->qkey ),
>               cl_ntoh16( p_mcmr->mlid ),
> -             p_mcmr->scope_state,
> -             p_mcmr->rate,
>               p_mcmr->mtu,
>               p_mcmr->tclass,
> -             cl_ntoh32( p_mcmr->sl_flow_hop )
> +             cl_ntoh16( p_mcmr->pkey ),
> +             p_mcmr->rate,
> +             p_mcmr->pkt_life,
> +             cl_ntoh32( p_mcmr->sl_flow_hop ),
> +             p_mcmr->scope_state,
> +             p_mcmr->proxy_join
>               );
>    }
>  }
> 




More information about the general mailing list