Re: [openib-general] port num in port priv

2006-02-10 Thread Hal Rosenstock
On Fri, 2006-02-10 at 13:56, Hal Rosenstock wrote: > On Thu, 2006-02-09 at 10:55, Roland Dreier wrote: > > The current code probably needs to be extended to give > > the upper layers the port number where a MAD was received, and also to > > make it possible to specify the port number that a directe

Re: [openib-general] port num in port priv

2006-02-10 Thread Hal Rosenstock
On Thu, 2006-02-09 at 10:55, Roland Dreier wrote: > The current code probably needs to be extended to give > the upper layers the port number where a MAD was received, and also to > make it possible to specify the port number that a directed route MAD > will be sent on. On the receive side, the po

RE: [openib-general] port num in port priv

2006-02-10 Thread Hal Rosenstock
Hi Suri, On Fri, 2006-02-10 at 09:09, Suresh Shelvapille wrote: > Hal: > The way I gather port stats locally on my device is by doing a "cat" on the > "/sys/class/Infiniband/mysw/port/0/counters" file. As Roland mentioned this > is limited to port0 counters on a switch. Base switch port 0 does n

RE: [openib-general] port num in port priv

2006-02-10 Thread Eitan Zahavi
Hi Suri, You can send a PMA PortCounters MAD either using "process local" or to the device using its LID. Eitan > I am not using user space verbs library, is there any other way to get at > the different port#N stats? > > Thanks, > Suri ___ openib-gene

RE: [openib-general] port num in port priv

2006-02-10 Thread Suresh Shelvapille
Hal: The way I gather port stats locally on my device is by doing a "cat" on the "/sys/class/Infiniband/mysw/port/0/counters" file. As Roland mentioned this is limited to port0 counters on a switch. If I need stats for port#N I need to expand this by providing more class attributes and getting to

RE: [openib-general] port num in port priv

2006-02-09 Thread Hal Rosenstock
Hi Suri, On Thu, 2006-02-09 at 18:06, Suresh Shelvapille wrote: > Hal and folks: > > > > > For switches, the one from the WC needs to be filled in and passed so > > that sounds wrong and needs fixing. Do you want to take a crack at this > > or should I ? > > > [SS] I am not as IB core stack sav

RE: [openib-general] port num in port priv

2006-02-09 Thread Hal Rosenstock
On Thu, 2006-02-09 at 17:56, Suresh Shelvapille wrote: > > > > Unfortunately the sysfs PMA counters support will not be that useful, > > since it will only show counters for port 0; but that's a different issue. > > > > - R. > [SS] That's a bummer, so don't we need to create as many file descrip

RE: [openib-general] port num in port priv

2006-02-09 Thread Suresh Shelvapille
Hal and folks: > > For switches, the one from the WC needs to be filled in and passed so > that sounds wrong and needs fixing. Do you want to take a crack at this > or should I ? > [SS] I am not as IB core stack savvy as you guys are, so I would appreciate it if you can provide the changes...I w

RE: [openib-general] port num in port priv

2006-02-09 Thread Suresh Shelvapille
> > Unfortunately the sysfs PMA counters support will not be that useful, > since it will only show counters for port 0; but that's a different issue. > > - R. [SS] That's a bummer, so don't we need to create as many file descriptors as the number of physical ports on a switch, so that we can

RE: [openib-general] port num in port priv

2006-02-09 Thread Hal Rosenstock
Hi Suresh, On Thu, 2006-02-09 at 17:22, Suresh Shelvapille wrote: > Hal: > > I am only addressing the process_mad issue here: > > > > > > As a result, it appears like the process_mad function is always called > > with a port number of > > > zero. > > > > That should be OK. The switch extern

Re: [openib-general] port num in port priv

2006-02-09 Thread Roland Dreier
Suresh> [SS] if we are supposed to get the port num from the Suresh> ib_wc, in process_mad(0) I can do that for all SMP methods Suresh> such as getportinfo() etc... But, the ib_wc parameter is Suresh> null when process_mad is called from show_pma_counter() Suresh> function in s

RE: [openib-general] port num in port priv

2006-02-09 Thread Suresh Shelvapille
Hal: I am only addressing the process_mad issue here: > > As a result, it appears like the process_mad function is always called > with a port number of > > zero. > > That should be OK. The switch external port it was received on should be > in the ib_wc as follows: > > struct ib_wc { >

Re: [openib-general] port num in port priv

2006-02-09 Thread Hal Rosenstock
On Thu, 2006-02-09 at 10:55, Roland Dreier wrote: > Suresh> For a switch only one port_priv object is created in > Suresh> mad.c. As a result, it appears like the process_mad > Suresh> function is always called with a port number of zero. And > Suresh> the return path is always fill

Re: [openib-general] port num in port priv

2006-02-09 Thread Hal Rosenstock
Hi Suresh, On Thu, 2006-02-09 at 10:40, Suresh Shelvapille wrote: > Hi: > > For a switch Note that this is some new ground for this code. > only one port_priv object is created in mad.c. A switch only has one port through which all MADs are processed (switch port 0 (either base or enhanced))

Re: [openib-general] port num in port priv

2006-02-09 Thread Roland Dreier
Suresh> For a switch only one port_priv object is created in Suresh> mad.c. As a result, it appears like the process_mad Suresh> function is always called with a port number of zero. And Suresh> the return path is always filled with zero as well (in Suresh> smi.c). Should not th

[openib-general] port num in port priv

2006-02-09 Thread Suresh Shelvapille
Hi: For a switch only one port_priv object is created in mad.c. As a result, it appears like the process_mad function is always called with a port number of zero. And the return path is always filled with zero as well (in smi.c). Should not this be the physical port number from which the mad pac