[openib-general] port num in port priv
Suresh Shelvapille
suri at baymicrosystems.com
Thu Feb 9 14:22:33 PST 2006
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 {
> u64 wr_id;
> enum ib_wc_status status;
> enum ib_wc_opcode opcode;
> u32 vendor_err;
> u32 byte_len;
> __be32 imm_data;
> u32 qp_num;
> u32 src_qp;
> int wc_flags;
> u16 pkey_index;
> u16 slid;
> u8 sl;
> u8 dlid_path_bits;
> u8 port_num; /* valid only for DR SMPs
> on switches */
> };
>
> and that is the one that needs to be used in the DR return path.
>
[SS] if we are supposed to get the port num from the ib_wc, in
process_mad(0) I can do that for all SMP methods such as getportinfo()
etc...
But, the ib_wc parameter is null when process_mad is called from
show_pma_counter() function in sysfs.c?
So should I be switching between the port_num parameter vs. sib_wc->port_num
depending on whether ib_wc is NULL or not?
Thanks,
Suri
More information about the general
mailing list