From: Yejune Deng <hidden> Date: 2021-03-24 11:02:08
My reasons are as following: ipv4_confirm_neigh() belongs to
ipv4_dst_ops that family is AF_INET, and ipv4_neigh_lookup() is also
added likely() when rt->rt_gw_family is equal to AF_INET.
On Wed, Mar 24, 2021 at 6:34 PM Leon Romanovsky [off-list ref] wrote:
On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune Deng wrote:
quoted
Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
== AF_INET'.
Why? Such macros are beneficial in only specific cases, most of the time,
likely/unlikely is cargo cult.
From: Leon Romanovsky <leon@kernel.org> Date: 2021-03-24 12:20:28
On Wed, Mar 24, 2021 at 07:01:19PM +0800, Yejune Deng wrote:
My reasons are as following: ipv4_confirm_neigh() belongs to
ipv4_dst_ops that family is AF_INET, and ipv4_neigh_lookup() is also
added likely() when rt->rt_gw_family is equal to AF_INET.
It is part of that cargo cult. Please support your claim with
performance numbers when this likely/unlikely will give any difference.
Thanks
On Wed, Mar 24, 2021 at 6:34 PM Leon Romanovsky [off-list ref] wrote:
quoted
On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune Deng wrote:
quoted
Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
== AF_INET'.
Why? Such macros are beneficial in only specific cases, most of the time,
likely/unlikely is cargo cult.