summaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorHoang Le <hoang.h.le@dektech.com.au>2020-03-26 09:50:29 +0700
committerDavid S. Miller <davem@davemloft.net>2020-03-26 11:21:02 -0700
commit8b1e5b0a99f04bda2d6c85ecfe5e68a356c10914 (patch)
treee0f56ef14ca4e736804e12d6e9c93357bc303f48 /net/tipc/msg.h
parent9fb16955fb661945ddffce4504dcffbe55cd518a (diff)
downloadlinux-8b1e5b0a99f04bda2d6c85ecfe5e68a356c10914.tar.gz
linux-8b1e5b0a99f04bda2d6c85ecfe5e68a356c10914.tar.bz2
linux-8b1e5b0a99f04bda2d6c85ecfe5e68a356c10914.zip
tipc: Add a missing case of TIPC_DIRECT_MSG type
In the commit f73b12812a3d ("tipc: improve throughput between nodes in netns"), we're missing a check to handle TIPC_DIRECT_MSG type, it's still using old sending mechanism for this message type. So, throughput improvement is not significant as expected. Besides that, when sending a large message with that type, we're also handle wrong receiving queue, it should be enqueued in socket receiving instead of multicast messages. Fix this by adding the missing case for TIPC_DIRECT_MSG. Fixes: f73b12812a3d ("tipc: improve throughput between nodes in netns") Reported-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Acked-by: Jon Maloy <jmaloy@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 6d466ebdb64f..871feadbbc19 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -394,6 +394,11 @@ static inline u32 msg_connected(struct tipc_msg *m)
return msg_type(m) == TIPC_CONN_MSG;
}
+static inline u32 msg_direct(struct tipc_msg *m)
+{
+ return msg_type(m) == TIPC_DIRECT_MSG;
+}
+
static inline u32 msg_errcode(struct tipc_msg *m)
{
return msg_bits(m, 1, 25, 0xf);