[ofa-general] Re: [PATCH 3/10] infiniband-diags: convert ibping to "new" ibmad interface

Sasha Khapyorsky sashak at voltaire.com
Sat Mar 7 09:47:32 PST 2009


On 19:05 Thu 19 Feb     , Ira Weiny wrote:
> diff --git a/libibmad/src/vendor.c b/libibmad/src/vendor.c
> index 50a878e..1a129e5 100644
> --- a/libibmad/src/vendor.c
> +++ b/libibmad/src/vendor.c
> @@ -40,6 +40,7 @@
>  #include <string.h>
>  
>  #include <infiniband/mad.h>
> +#include "mad_internal.h"
>  
>  #undef DEBUG
>  #define DEBUG 	if (ibdebug)	IBWARN
> @@ -53,6 +54,16 @@ static inline int response_expected(int method)
>  uint8_t *ib_vendor_call(void *data, ib_portid_t * portid,
>  			ib_vendor_call_t * call)
>  {
> +	struct ibmad_port port;
> +
> +	port.port_id = madrpc_portid();

This breaks 'vendstat' since class_agents array is not initialized. So
I'm adding this:

+	port.class_agents[call->mgmt_class] = mad_class_agent(call->mgmt_class);

Sasha

> +	return ib_vendor_call_via(data, portid, call, &port);
> +}
> +
> +uint8_t *ib_vendor_call_via(void *data, ib_portid_t * portid,
> +			ib_vendor_call_t * call,
> +			struct ibmad_port *srcport)
> +{
>  	ib_rpc_t rpc = { 0 };
>  	int range1 = 0, resp_expected;
>  



More information about the general mailing list