Searched hist:"62 e395f8" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/Documentation/networking/ |
H A D | ip-sysctl.rst | 62e395f8 Mon Jan 30 11:14:28 CST 2023 Brian Haley <haleyb.dev@gmail.com> neighbor: fix proxy_delay usage when it is zero
When set to zero, the neighbor sysctl proxy_delay value does not cause an immediate reply for ARP/ND requests as expected, it instead causes a random delay between [0, U32_MAX). Looking at this comment from __get_random_u32_below() explains the reason:
/* * This function is technically undefined for ceil == 0, and in fact * for the non-underscored constant version in the header, we build bug * on that. But for the non-constant case, it's convenient to have that * evaluate to being a straight call to get_random_u32(), so that * get_random_u32_inclusive() can work over its whole range without * undefined behavior. */
Added helper function that does not call get_random_u32_below() if proxy_delay is zero and just uses the current value of jiffies instead, causing pneigh_enqueue() to respond immediately.
Also added definition of proxy_delay to ip-sysctl.txt since it was missing.
Signed-off-by: Brian Haley <haleyb.dev@gmail.com> Link: https://lore.kernel.org/r/20230130171428.367111-1-haleyb.dev@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
/openbmc/linux/net/core/ |
H A D | neighbour.c | 62e395f8 Mon Jan 30 11:14:28 CST 2023 Brian Haley <haleyb.dev@gmail.com> neighbor: fix proxy_delay usage when it is zero
When set to zero, the neighbor sysctl proxy_delay value does not cause an immediate reply for ARP/ND requests as expected, it instead causes a random delay between [0, U32_MAX). Looking at this comment from __get_random_u32_below() explains the reason:
/* * This function is technically undefined for ceil == 0, and in fact * for the non-underscored constant version in the header, we build bug * on that. But for the non-constant case, it's convenient to have that * evaluate to being a straight call to get_random_u32(), so that * get_random_u32_inclusive() can work over its whole range without * undefined behavior. */
Added helper function that does not call get_random_u32_below() if proxy_delay is zero and just uses the current value of jiffies instead, causing pneigh_enqueue() to respond immediately.
Also added definition of proxy_delay to ip-sysctl.txt since it was missing.
Signed-off-by: Brian Haley <haleyb.dev@gmail.com> Link: https://lore.kernel.org/r/20230130171428.367111-1-haleyb.dev@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|