[openib-general] Re: [PATCH 1 of 2] static rate encoding change (kernel)
Roland Dreier
rdreier at cisco.com
Thu Mar 2 10:45:20 PST 2006
> +enum ib_max_static_rate {
> + IB_MAX_STATIC_RATE_PORT_CURRENT_MAX = 0,
> + IB_MAX_STATIC_RATE_2_5_GBPS = 2,
> + IB_MAX_STATIC_RATE_5_GBPS = 5,
> + IB_MAX_STATIC_RATE_10_GBPS = 3,
> + IB_MAX_STATIC_RATE_20_GBPS = 6,
> + IB_MAX_STATIC_RATE_30_GBPS = 4,
> + IB_MAX_STATIC_RATE_40_GBPS = 7,
> + IB_MAX_STATIC_RATE_60_GBPS = 8,
> + IB_MAX_STATIC_RATE_80_GBPS = 9,
> + IB_MAX_STATIC_RATE_120_GBPS = 10
> +};
How about calling this something like ib_link_rate (ib_rate seems a
little too short)? The idea is that it represents the value from an
SA query, so it would make sense to match the name of the field in the
path record, which isn't about static rate.
Then this
+static inline int ib_static_rate_enum_to_int(enum ib_max_static_rate rate)
could be named something like ib_link_rate_to_mult() -- it gives the
multiple of 2.5 GB/sec that a given rate represents.
Looking at the patch I see that SRP doesn't handle static rate
properly right now, and this patch would make it a lot easier to fix
that. So I like the idea.
- R.
More information about the general
mailing list