[openib-general] [PATCHv2][RFC] kDAPL: use cm timers instead of own

Sean Hefty sean.hefty at intel.com
Fri May 27 08:44:26 PDT 2005


>+/*
>+ * approximately transforms miliseconds to 4.096us*2^x
>+ * 63(+8) is max return

I think that the max return is 64+8.

>+ */
>+static inline u8 dapl_convert_ms_to_kookyib(unsigned long ms) {

I like the function name.  :)

>+	unsigned long converged = 2;
>+	u8 i;
>+
>+	if (2 > ms)
>+		return 8;
>+
>+	for (i = 1; i < 64; i++) {
>+		if (converged >= ms)
>+			break;
>+		converged = 2*converged;
>+	}
>+
>+	return i+8;
>+}

I didn't notice any other issues looking over the changes, but see my other
email regarding setting the timeout based on the number of retries.

- Sean




More information about the general mailing list