Hi Dan, On 16:50 Fri 11 Apr , Dan Noe wrote: > > The solution Joel had mentioned was to use madrpc_init() and then call > port_performance_reset() to reset the port. But madrpc_init keeps a static > file descriptor (mad_portid) that is used for subsequent calls (such as is > eventually used when port_performance_reset() is called). And, there does > not seem to be any method to close this file descriptor. > > So, it is impossible to extend this method to multiple devices (or even > multiple ports). With a single call to madrpc_init one can perpetually > reset the performance counters in the polling loop but this approach > doesn't work with multiple devices.
Why do you need to open multiple devices/ports? Are you using this tool for multiple IB subnets handling? > If madrpc_init is called more than > once, it leaks a file descriptor. Yes, madrpc_init() is old and it works in this way. There are newer mad_rpc_open_port() and mad_rpc_close_port() functions in libibmad which support multiple devices/ports you can use it instead. Sasha _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
