Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2018 08:05:20 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r337069 - stable/11/sys/ofed/drivers/infiniband/core
Message-ID:  <201808020805.w7285KXt033714@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Aug  2 08:05:20 2018
New Revision: 337069
URL: https://svnweb.freebsd.org/changeset/base/337069

Log:
  MFC r336363:
  Process address resolve requests at least one time per second in ibcore.
  
  When setting a large address resolve timeout it was observed that the
  address resolving would succeed at the timeout and not when the address
  was available. Make sure the address resolving requests are processed no
  slower than one time every second.
  
  While at it use "int" for jiffies instead of "unsigned long" to match
  FreeBSD ticks.
  
  Sponsored by:		Mellanox Technologies

Modified:
  stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c	Thu Aug  2 08:04:21 2018	(r337068)
+++ stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c	Thu Aug  2 08:05:20 2018	(r337069)
@@ -63,7 +63,7 @@ struct addr_req {
 	void *context;
 	void (*callback)(int status, struct sockaddr *src_addr,
 			 struct rdma_dev_addr *addr, void *context);
-	unsigned long timeout;
+	int timeout;
 	int status;
 };
 
@@ -190,13 +190,15 @@ int rdma_translate_ip(const struct sockaddr *addr,
 }
 EXPORT_SYMBOL(rdma_translate_ip);
 
-static void set_timeout(unsigned long time)
+static void set_timeout(int time)
 {
 	int delay;	/* under FreeBSD ticks are 32-bit */
 
 	delay = time - jiffies;
 	if (delay <= 0)
 		delay = 1;
+	else if (delay > hz)
+		delay = hz;
 
 	mod_delayed_work(addr_wq, &work, delay);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808020805.w7285KXt033714>