[openib-general] port num in port priv

Roland Dreier rdreier at cisco.com
Thu Feb 9 07:55:33 PST 2006


    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 this be the physical port number from
    Suresh> which the mad packet came?

You are breaking new ground by running the Linux IB stack on top of a
switch device.  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.

Also I'm not sure whether the directed route handling will work for
MADs whose final destination is not the local switch and which
therefore need to be forwarded instead of processed.

So there are quite a few things in the core that you will need to add
for your device.

    Suresh> Do I have to do something with the return path attributes
    Suresh> when I send the packet out in my switch driver? I am using
    Suresh> linux 2.6.12.

I would suggest using a newer kernel.  Otherwise you will be
struggling to merge your change back and forth.

 - R.



More information about the general mailing list