aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-02-15 15:38:38 -0500
committerDavid S. Miller <davem@davemloft.net>2019-02-15 15:38:38 -0500
commit3313da8188cc346a205783c22c37e821b4b7016d (patch)
tree5697cd985220def9bc2e35dfbb832dad04c2d051 /net/tipc/msg.h
parent50f444aa50a4f3fab35a04f56d6bb83dc1e8c875 (diff)
parent24f0a48743a256bdec1bcb80708bc309da4aa261 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The netfilter conflicts were rather simple overlapping changes. However, the cls_tcindex.c stuff was a bit more complex. On the 'net' side, Cong is fixing several races and memory leaks. Whilst on the 'net-next' side we have Vlad adding the rtnl-ness support. What I've decided to do, in order to resolve this, is revert the conversion over to using a workqueue that Cong did, bringing us back to pure RCU. I did it this way because I believe that either Cong's races don't apply with have Vlad did things, or Cong will have to implement the race fix slightly differently. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index a0924956bb61..d7e4b8b93f9d 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -360,6 +360,28 @@ static inline void msg_set_bcast_ack(struct tipc_msg *m, u16 n)
360 msg_set_bits(m, 1, 0, 0xffff, n); 360 msg_set_bits(m, 1, 0, 0xffff, n);
361} 361}
362 362
363/* Note: reusing bits in word 1 for ACTIVATE_MSG only, to re-synch
364 * link peer session number
365 */
366static inline bool msg_dest_session_valid(struct tipc_msg *m)
367{
368 return msg_bits(m, 1, 16, 0x1);
369}
370
371static inline void msg_set_dest_session_valid(struct tipc_msg *m, bool valid)
372{
373 msg_set_bits(m, 1, 16, 0x1, valid);
374}
375
376static inline u16 msg_dest_session(struct tipc_msg *m)
377{
378 return msg_bits(m, 1, 0, 0xffff);
379}
380
381static inline void msg_set_dest_session(struct tipc_msg *m, u16 n)
382{
383 msg_set_bits(m, 1, 0, 0xffff, n);
384}
363 385
364/* 386/*
365 * Word 2 387 * Word 2