>+/*
>+ * 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

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to