***SPAM*** Re: [ofa-general] Re: [PATCH v2 1/2] opensm: Handle trap repress on trap 144 generation

Hal Rosenstock hal.rosenstock at gmail.com
Tue Mar 10 08:13:12 PDT 2009


On Tue, Mar 10, 2009 at 4:31 AM, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> - Show quoted text -
> On 13:19 Fri 06 Mar     , Hal Rosenstock wrote:
>> diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
>> index 6639246..4576a8b 100644
>> --- a/opensm/opensm/osm_trap_rcv.c
>> +++ b/opensm/opensm/osm_trap_rcv.c
>> @@ -2,6 +2,7 @@
>>   * Copyright (c) 2004-2008 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
>> @@ -649,18 +650,34 @@ Exit:
>>  }
>>
>>  /**********************************************************************
>> - CURRENTLY WE ARE NOT CREATING TRAPS - SO THIS CALL IN AN ERROR
>>  **********************************************************************/
>>  static void
>>  trap_rcv_process_response(IN osm_sm_t * sm,
>>                         IN const osm_madw_t * const p_madw)
>>  {
>> +     uint8_t payload[sizeof(ib_mad_notice_attr_t)];
>> +     ib_smp_t *p_smp;
>> +     ib_mad_notice_attr_t *p_ntci = (ib_mad_notice_attr_t *) payload;
>> +
>> +     CL_ASSERT(p_madw);
>> +
>> +     if (!osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
>> +             return;
>>
>>       OSM_LOG_ENTER(sm->p_log);
>>
>> -     OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3808: "
>> -             "This function is not supported yet\n");
>> +     if (p_madw->p_mad->mgmt_class != IB_MCLASS_SUBN_LID &&
>> +         p_madw->p_mad->mgmt_class != IB_MCLASS_SUBN_DIR)
>> +             goto Exit;
>>
>> +     p_smp = osm_madw_get_smp_ptr(p_madw);
>> +
>> +     memset(payload, 0, sizeof(payload));
>> +     memcpy(payload, &p_smp->data, IB_SMP_DATA_SIZE);
>> +
>> +     osm_dump_notice(sm->p_log, p_ntci, OSM_LOG_VERBOSE);
>> +
>> +Exit:
>>       OSM_LOG_EXIT(sm->p_log);
>>  }
>
> Almost fine, but one thing still be unclear for me. How is this function
> trap_rcv_process_response() reachable and what is this supposed to do?

It isn't anymore; I'll remove it in next version.

-- Hal

> Sasha
> - Show quoted text -
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>



More information about the general mailing list