[openib-general] Questions about SMI
Roland Dreier
roland at topspin.com
Wed Oct 13 10:27:02 PDT 2004
Hal> int snoop_mad(struct ib_device *ibdev,
Hal> u8 port_num,
Hal> u16 slid,
Hal> struct ib_mad *mad);
That's fine with me. How about the return value -- I would suggest 0
for ignored, non-zero for consumed? So the MAD layer would do:
if (device->snoop_mad(...)) {
/* free mad */
/* stop processing */
}
/* otherwise proceed as usual */
Hal> Got it: it's any locally generated traps. Do they all show up
Hal> on QP0 regardless of the class of the trap ?
No, I think BM traps arrive on QP1 (although I haven't tested).
Hal> I'm counting the low level driver :-) It depends on what the
Hal> driver will do with the MAD. There are "ownership" issues on
Hal> the MAD.
If you count the low-level driver then there can be two consumers per
MAD: first snoop_mad() sees it and then agent dispatch gives it to a
different consumer.
Hal> OK. It shouldn't take long to code this up. Testing will take
Hal> a little longer. Is there any easy way to cause one of these
Hal> traps to be generated ?
I think if you send an SMP with bad M_Key it should generate a trap.
- R.
More information about the general
mailing list