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. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
6f1b8a0792
commit
e0cba2d201
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336363
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user