]> 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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Nov 2019 04:08:53 +0000 (20:08 -0800)
commitda3814a4d18413fc6075e41ecdc473dc99535b89
treef666502e527b146c7e5dac670b3d56236480b46d
parentbbebda56bc93e8216302b599d6fb4f131520554f
tipc: eliminate checking netns if node established

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: 5248c6f8694f ("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>
net/tipc/node.c