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

Re: [PATCH v1] ibacm: Handle EP expiration time

From: Yuval Shaia <hidden>
Date: 2016-09-19 13:21:38

On Mon, Sep 19, 2016 at 07:22:54AM -0400, Hal Rosenstock wrote:
quoted
+
 static struct acmp_dest *
 acmp_acquire_dest(struct acmp_ep *ep, uint8_t addr_type, const uint8_t *addr)
 {
@@ -366,6 +376,16 @@ acmp_acquire_dest(struct acmp_ep *ep, uint8_t 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 && dest->state == ACMP_READY &&
+	    dest->addr_timeout != 0xFFFFFFFFFFFFFFFF) {
Nit related to the timeout check:
In acmp.c, (uint64_t)~0ULL is used in other places for this. Should this
addr_timeout check be changed to some infinite or no timeout define
along with the other occurrences for consistency and better code
readability ?
Will do.
-- Hal
quoted
+		acm_log(2, "Record valid for the next %ld minute(s)\n",
+			dest->addr_timeout - time_stamp_min());
+		if (time_stamp_min() >= dest->addr_timeout) {
+			acm_log(2, "Record expired\n");
+			acmp_remove_dest(ep, dest);
+			dest = NULL;
+		}
--
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