[openib-general] port num in port priv

Hal Rosenstock halr at voltaire.com
Thu Feb 9 09:26:49 PST 2006


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 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.  

Yes, this is new ground as far as I know.

> The current code probably needs to be extended to give
> the upper layers the port number where a MAD was received,

This is supported at the WC level. I didn't trace it all the way back to
see what changes if any changes are needed at the MAD layer to pass this
port number to SMI, but I think that at least is the first layer of this
onion.

>  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.

This clearly has not been tested.

-- Hal

> 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.
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list