diff options
author | James Morris <james.l.morris@oracle.com> | 2014-11-19 05:32:12 -0500 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-11-19 05:32:12 -0500 |
commit | b10778a00d40b3d9fdaaf5891e802794781ff71c (patch) | |
tree | 6ba4cbac86eecedc3f30650e7f764ecf00c83898 /net/tipc/msg.h | |
parent | 594081ee7145cc30a3977cb4e218f81213b63dc5 (diff) | |
parent | bfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff) |
Merge commit 'v3.17' into next
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 503511903d1d..462fa194a6af 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -463,6 +463,11 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m) | |||
463 | #define FRAGMENT 1 | 463 | #define FRAGMENT 1 |
464 | #define LAST_FRAGMENT 2 | 464 | #define LAST_FRAGMENT 2 |
465 | 465 | ||
466 | /* Bundling protocol message types | ||
467 | */ | ||
468 | #define BUNDLE_OPEN 0 | ||
469 | #define BUNDLE_CLOSED 1 | ||
470 | |||
466 | /* | 471 | /* |
467 | * Link management protocol message types | 472 | * Link management protocol message types |
468 | */ | 473 | */ |
@@ -706,12 +711,36 @@ static inline void msg_set_link_tolerance(struct tipc_msg *m, u32 n) | |||
706 | msg_set_bits(m, 9, 0, 0xffff, n); | 711 | msg_set_bits(m, 9, 0, 0xffff, n); |
707 | } | 712 | } |
708 | 713 | ||
709 | u32 tipc_msg_tot_importance(struct tipc_msg *m); | 714 | static inline u32 tipc_msg_tot_importance(struct tipc_msg *m) |
715 | { | ||
716 | if ((msg_user(m) == MSG_FRAGMENTER) && (msg_type(m) == FIRST_FRAGMENT)) | ||
717 | return msg_importance(msg_get_wrapped(m)); | ||
718 | return msg_importance(m); | ||
719 | } | ||
720 | |||
721 | static inline u32 msg_tot_origport(struct tipc_msg *m) | ||
722 | { | ||
723 | if ((msg_user(m) == MSG_FRAGMENTER) && (msg_type(m) == FIRST_FRAGMENT)) | ||
724 | return msg_origport(msg_get_wrapped(m)); | ||
725 | return msg_origport(m); | ||
726 | } | ||
727 | |||
728 | bool tipc_msg_reverse(struct sk_buff *buf, u32 *dnode, int err); | ||
729 | |||
730 | int tipc_msg_eval(struct sk_buff *buf, u32 *dnode); | ||
731 | |||
710 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, | 732 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, |
711 | u32 destnode); | 733 | u32 destnode); |
712 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | ||
713 | unsigned int len, int max_size, struct sk_buff **buf); | ||
714 | 734 | ||
715 | int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf); | 735 | int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf); |
716 | 736 | ||
737 | bool tipc_msg_bundle(struct sk_buff *bbuf, struct sk_buff *buf, u32 mtu); | ||
738 | |||
739 | bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode); | ||
740 | |||
741 | int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov, | ||
742 | int offset, int dsz, int mtu , struct sk_buff **chain); | ||
743 | |||
744 | struct sk_buff *tipc_msg_reassemble(struct sk_buff *chain); | ||
745 | |||
717 | #endif | 746 | #endif |