Thread (1 message) 1 message, 1 author, 2016-09-19

RE: [PATCH] ibacm: Handle EP expiration time

From: Hefty, Sean <hidden>
Date: 2016-09-19 16:50:08

quoted
quoted
quoted
quoted
 static struct acmp_dest *
 acmp_acquire_dest(struct acmp_ep *ep, uint8_t addr_type, const
uint8_t
quoted
quoted
*addr)
 {
@@ -366,6 +382,15 @@ acmp_acquire_dest(struct acmp_ep *ep,
uint8_t
quoted
quoted
quoted
quoted
addr_type, const uint8_t *addr)
 	acm_log(2, "%s\n", log_data);
 	lock_acquire(&ep->lock);
 	dest = acmp_get_dest(ep, addr_type, addr);
+	if (dest && is_dest_ready(dest)) {
I think it would be clearer to just perform the state check here
and
quoted
quoted
either avoid the timeout check or merge it with the if statement
below.
quoted
quoted
As stated above, i cannot ignore the timeout so will merge it here.
quoted
quoted
+		acm_log(2, "Record valid for the next %ld
minute(s)\n",
quoted
quoted
quoted
quoted
+			dest->addr_timeout - time_stamp_min());
+		if (time_stamp_min() >= dest->addr_timeout) {
We also check addr_timeout here.  (Sorry, it's been a long while
since I've looked at this code.)  My question regarding timeouts are
around why do we need two checks?

First one is for log only.
okay
If you think it is not needed then i'll remove it, otherwise i will
take it
out to an helper variable and use it in both.
I think we're good then.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help