]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: eliminate checking netns if node established
authorHoang Le <hoang.h.le@dektech.com.au>
Fri, 8 Nov 2019 03:02:37 +0000 (10:02 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:04 +0000 (11:42 +0100)
commit4730bdb3ffc44c3d6c85a0b4e378ca1816600aa2
tree58c5b9429fcdfb9a77d116b29f6f36f1c0247f00
parente4363105d999a9b7b08c3c4d00afc31ed254f975
tipc: eliminate checking netns if node established

[ Upstream commit eaf0cefc973fe535456543f4aebded1a95386a3a ]

Currently, we scan over all network namespaces at each received
discovery message in order to check if the sending peer might be
present in a host local namespaces.

This is unnecessary since we can assume that a peer will not change its
location during an established session.

We now improve the condition for this testing so that we don't perform
any redundant scans.

Fixes: bdbb15a6e028 ("tipc: improve throughput between nodes in netns")
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: c244c092f1ed ("tipc: fix unexpected link reset due to discovery messages")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tipc/node.c