diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/link.c | 25 | ||||
-rw-r--r-- | net/tipc/link.h | 4 | ||||
-rw-r--r-- | net/tipc/msg.c | 7 | ||||
-rw-r--r-- | net/tipc/msg.h | 3 | ||||
-rw-r--r-- | net/tipc/port.c | 66 | ||||
-rw-r--r-- | net/tipc/port.h | 16 | ||||
-rw-r--r-- | net/tipc/socket.c | 6 |
7 files changed, 49 insertions, 78 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 0cc3d9015c5d..b02a6dc4efe4 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -97,8 +97,7 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
97 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); | 97 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); |
98 | static int link_send_sections_long(struct tipc_port *sender, | 98 | static int link_send_sections_long(struct tipc_port *sender, |
99 | struct iovec const *msg_sect, | 99 | struct iovec const *msg_sect, |
100 | u32 num_sect, unsigned int total_len, | 100 | unsigned int len, u32 destnode); |
101 | u32 destnode); | ||
102 | static void link_state_event(struct tipc_link *l_ptr, u32 event); | 101 | static void link_state_event(struct tipc_link *l_ptr, u32 event); |
103 | static void link_reset_statistics(struct tipc_link *l_ptr); | 102 | static void link_reset_statistics(struct tipc_link *l_ptr); |
104 | static void link_print(struct tipc_link *l_ptr, const char *str); | 103 | static void link_print(struct tipc_link *l_ptr, const char *str); |
@@ -1065,8 +1064,7 @@ static int link_send_buf_fast(struct tipc_link *l_ptr, struct sk_buff *buf, | |||
1065 | */ | 1064 | */ |
1066 | int tipc_link_send_sections_fast(struct tipc_port *sender, | 1065 | int tipc_link_send_sections_fast(struct tipc_port *sender, |
1067 | struct iovec const *msg_sect, | 1066 | struct iovec const *msg_sect, |
1068 | const u32 num_sect, unsigned int total_len, | 1067 | unsigned int len, u32 destaddr) |
1069 | u32 destaddr) | ||
1070 | { | 1068 | { |
1071 | struct tipc_msg *hdr = &sender->phdr; | 1069 | struct tipc_msg *hdr = &sender->phdr; |
1072 | struct tipc_link *l_ptr; | 1070 | struct tipc_link *l_ptr; |
@@ -1080,8 +1078,7 @@ again: | |||
1080 | * Try building message using port's max_pkt hint. | 1078 | * Try building message using port's max_pkt hint. |
1081 | * (Must not hold any locks while building message.) | 1079 | * (Must not hold any locks while building message.) |
1082 | */ | 1080 | */ |
1083 | res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, | 1081 | res = tipc_msg_build(hdr, msg_sect, len, sender->max_pkt, &buf); |
1084 | sender->max_pkt, &buf); | ||
1085 | /* Exit if build request was invalid */ | 1082 | /* Exit if build request was invalid */ |
1086 | if (unlikely(res < 0)) | 1083 | if (unlikely(res < 0)) |
1087 | return res; | 1084 | return res; |
@@ -1121,8 +1118,7 @@ exit: | |||
1121 | if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt) | 1118 | if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt) |
1122 | goto again; | 1119 | goto again; |
1123 | 1120 | ||
1124 | return link_send_sections_long(sender, msg_sect, | 1121 | return link_send_sections_long(sender, msg_sect, len, |
1125 | num_sect, total_len, | ||
1126 | destaddr); | 1122 | destaddr); |
1127 | } | 1123 | } |
1128 | tipc_node_unlock(node); | 1124 | tipc_node_unlock(node); |
@@ -1133,8 +1129,8 @@ exit: | |||
1133 | if (buf) | 1129 | if (buf) |
1134 | return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); | 1130 | return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); |
1135 | if (res >= 0) | 1131 | if (res >= 0) |
1136 | return tipc_port_reject_sections(sender, hdr, msg_sect, num_sect, | 1132 | return tipc_port_reject_sections(sender, hdr, msg_sect, |
1137 | total_len, TIPC_ERR_NO_NODE); | 1133 | len, TIPC_ERR_NO_NODE); |
1138 | return res; | 1134 | return res; |
1139 | } | 1135 | } |
1140 | 1136 | ||
@@ -1154,13 +1150,12 @@ exit: | |||
1154 | */ | 1150 | */ |
1155 | static int link_send_sections_long(struct tipc_port *sender, | 1151 | static int link_send_sections_long(struct tipc_port *sender, |
1156 | struct iovec const *msg_sect, | 1152 | struct iovec const *msg_sect, |
1157 | u32 num_sect, unsigned int total_len, | 1153 | unsigned int len, u32 destaddr) |
1158 | u32 destaddr) | ||
1159 | { | 1154 | { |
1160 | struct tipc_link *l_ptr; | 1155 | struct tipc_link *l_ptr; |
1161 | struct tipc_node *node; | 1156 | struct tipc_node *node; |
1162 | struct tipc_msg *hdr = &sender->phdr; | 1157 | struct tipc_msg *hdr = &sender->phdr; |
1163 | u32 dsz = total_len; | 1158 | u32 dsz = len; |
1164 | u32 max_pkt, fragm_sz, rest; | 1159 | u32 max_pkt, fragm_sz, rest; |
1165 | struct tipc_msg fragm_hdr; | 1160 | struct tipc_msg fragm_hdr; |
1166 | struct sk_buff *buf, *buf_chain, *prev; | 1161 | struct sk_buff *buf, *buf_chain, *prev; |
@@ -1283,8 +1278,8 @@ reject: | |||
1283 | buf = buf_chain->next; | 1278 | buf = buf_chain->next; |
1284 | kfree_skb(buf_chain); | 1279 | kfree_skb(buf_chain); |
1285 | } | 1280 | } |
1286 | return tipc_port_reject_sections(sender, hdr, msg_sect, num_sect, | 1281 | return tipc_port_reject_sections(sender, hdr, msg_sect, |
1287 | total_len, TIPC_ERR_NO_NODE); | 1282 | len, TIPC_ERR_NO_NODE); |
1288 | } | 1283 | } |
1289 | 1284 | ||
1290 | /* Append chain of fragments to send queue & send them */ | 1285 | /* Append chain of fragments to send queue & send them */ |
diff --git a/net/tipc/link.h b/net/tipc/link.h index c048ed1cbd76..55cf8554a08b 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
@@ -227,9 +227,7 @@ int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf); | |||
227 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); | 227 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); |
228 | int tipc_link_send_sections_fast(struct tipc_port *sender, | 228 | int tipc_link_send_sections_fast(struct tipc_port *sender, |
229 | struct iovec const *msg_sect, | 229 | struct iovec const *msg_sect, |
230 | const u32 num_sect, | 230 | unsigned int len, u32 destnode); |
231 | unsigned int total_len, | ||
232 | u32 destnode); | ||
233 | void tipc_link_recv_bundle(struct sk_buff *buf); | 231 | void tipc_link_recv_bundle(struct sk_buff *buf); |
234 | int tipc_link_recv_fragment(struct sk_buff **pending, | 232 | int tipc_link_recv_fragment(struct sk_buff **pending, |
235 | struct sk_buff **fb, | 233 | struct sk_buff **fb, |
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 1e76d91e5691..e525f8ce1dee 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c | |||
@@ -73,13 +73,12 @@ void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, | |||
73 | * Returns message data size or errno | 73 | * Returns message data size or errno |
74 | */ | 74 | */ |
75 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | 75 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, |
76 | u32 num_sect, unsigned int total_len, int max_size, | 76 | unsigned int len, int max_size, struct sk_buff **buf) |
77 | struct sk_buff **buf) | ||
78 | { | 77 | { |
79 | int dsz, sz, hsz; | 78 | int dsz, sz, hsz; |
80 | unsigned char *to; | 79 | unsigned char *to; |
81 | 80 | ||
82 | dsz = total_len; | 81 | dsz = len; |
83 | hsz = msg_hdr_sz(hdr); | 82 | hsz = msg_hdr_sz(hdr); |
84 | sz = hsz + dsz; | 83 | sz = hsz + dsz; |
85 | msg_set_size(hdr, sz); | 84 | msg_set_size(hdr, sz); |
@@ -93,7 +92,7 @@ int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | |||
93 | return -ENOMEM; | 92 | return -ENOMEM; |
94 | skb_copy_to_linear_data(*buf, hdr, hsz); | 93 | skb_copy_to_linear_data(*buf, hdr, hsz); |
95 | to = (*buf)->data + hsz; | 94 | to = (*buf)->data + hsz; |
96 | if (total_len && memcpy_fromiovecend(to, msg_sect, 0, dsz)) { | 95 | if (len && memcpy_fromiovecend(to, msg_sect, 0, dsz)) { |
97 | kfree_skb(*buf); | 96 | kfree_skb(*buf); |
98 | *buf = NULL; | 97 | *buf = NULL; |
99 | return -EFAULT; | 98 | return -EFAULT; |
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 5e4ccf5c27df..559b73a9bf35 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -722,6 +722,5 @@ u32 tipc_msg_tot_importance(struct tipc_msg *m); | |||
722 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, | 722 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, |
723 | u32 destnode); | 723 | u32 destnode); |
724 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | 724 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, |
725 | u32 num_sect, unsigned int total_len, int max_size, | 725 | unsigned int len, int max_size, struct sk_buff **buf); |
726 | struct sk_buff **buf); | ||
727 | #endif | 726 | #endif |
diff --git a/net/tipc/port.c b/net/tipc/port.c index b3ed2fcab4fb..c081a7632302 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -90,8 +90,7 @@ int tipc_port_peer_msg(struct tipc_port *p_ptr, struct tipc_msg *msg) | |||
90 | * tipc_multicast - send a multicast message to local and remote destinations | 90 | * tipc_multicast - send a multicast message to local and remote destinations |
91 | */ | 91 | */ |
92 | int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, | 92 | int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, |
93 | u32 num_sect, struct iovec const *msg_sect, | 93 | struct iovec const *msg_sect, unsigned int len) |
94 | unsigned int total_len) | ||
95 | { | 94 | { |
96 | struct tipc_msg *hdr; | 95 | struct tipc_msg *hdr; |
97 | struct sk_buff *buf; | 96 | struct sk_buff *buf; |
@@ -114,8 +113,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, | |||
114 | msg_set_namelower(hdr, seq->lower); | 113 | msg_set_namelower(hdr, seq->lower); |
115 | msg_set_nameupper(hdr, seq->upper); | 114 | msg_set_nameupper(hdr, seq->upper); |
116 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); | 115 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); |
117 | res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, MAX_MSG_SIZE, | 116 | res = tipc_msg_build(hdr, msg_sect, len, MAX_MSG_SIZE, &buf); |
118 | &buf); | ||
119 | if (unlikely(!buf)) | 117 | if (unlikely(!buf)) |
120 | return res; | 118 | return res; |
121 | 119 | ||
@@ -436,14 +434,13 @@ exit: | |||
436 | } | 434 | } |
437 | 435 | ||
438 | int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, | 436 | int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, |
439 | struct iovec const *msg_sect, u32 num_sect, | 437 | struct iovec const *msg_sect, unsigned int len, |
440 | unsigned int total_len, int err) | 438 | int err) |
441 | { | 439 | { |
442 | struct sk_buff *buf; | 440 | struct sk_buff *buf; |
443 | int res; | 441 | int res; |
444 | 442 | ||
445 | res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, MAX_MSG_SIZE, | 443 | res = tipc_msg_build(hdr, msg_sect, len, MAX_MSG_SIZE, &buf); |
446 | &buf); | ||
447 | if (!buf) | 444 | if (!buf) |
448 | return res; | 445 | return res; |
449 | 446 | ||
@@ -918,15 +915,14 @@ int tipc_port_recv_msg(struct sk_buff *buf) | |||
918 | * tipc_port_recv_sections(): Concatenate and deliver sectioned | 915 | * tipc_port_recv_sections(): Concatenate and deliver sectioned |
919 | * message for this node. | 916 | * message for this node. |
920 | */ | 917 | */ |
921 | static int tipc_port_recv_sections(struct tipc_port *sender, unsigned int num_sect, | 918 | static int tipc_port_recv_sections(struct tipc_port *sender, |
922 | struct iovec const *msg_sect, | 919 | struct iovec const *msg_sect, |
923 | unsigned int total_len) | 920 | unsigned int len) |
924 | { | 921 | { |
925 | struct sk_buff *buf; | 922 | struct sk_buff *buf; |
926 | int res; | 923 | int res; |
927 | 924 | ||
928 | res = tipc_msg_build(&sender->phdr, msg_sect, num_sect, total_len, | 925 | res = tipc_msg_build(&sender->phdr, msg_sect, len, MAX_MSG_SIZE, &buf); |
929 | MAX_MSG_SIZE, &buf); | ||
930 | if (likely(buf)) | 926 | if (likely(buf)) |
931 | tipc_port_recv_msg(buf); | 927 | tipc_port_recv_msg(buf); |
932 | return res; | 928 | return res; |
@@ -935,8 +931,7 @@ static int tipc_port_recv_sections(struct tipc_port *sender, unsigned int num_se | |||
935 | /** | 931 | /** |
936 | * tipc_send - send message sections on connection | 932 | * tipc_send - send message sections on connection |
937 | */ | 933 | */ |
938 | int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect, | 934 | int tipc_send(u32 ref, struct iovec const *msg_sect, unsigned int len) |
939 | unsigned int total_len) | ||
940 | { | 935 | { |
941 | struct tipc_port *p_ptr; | 936 | struct tipc_port *p_ptr; |
942 | u32 destnode; | 937 | u32 destnode; |
@@ -950,11 +945,10 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect, | |||
950 | if (!tipc_port_congested(p_ptr)) { | 945 | if (!tipc_port_congested(p_ptr)) { |
951 | destnode = port_peernode(p_ptr); | 946 | destnode = port_peernode(p_ptr); |
952 | if (likely(!in_own_node(destnode))) | 947 | if (likely(!in_own_node(destnode))) |
953 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, num_sect, | 948 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, |
954 | total_len, destnode); | 949 | len, destnode); |
955 | else | 950 | else |
956 | res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect, | 951 | res = tipc_port_recv_sections(p_ptr, msg_sect, len); |
957 | total_len); | ||
958 | 952 | ||
959 | if (likely(res != -ELINKCONG)) { | 953 | if (likely(res != -ELINKCONG)) { |
960 | p_ptr->congested = 0; | 954 | p_ptr->congested = 0; |
@@ -965,7 +959,7 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect, | |||
965 | } | 959 | } |
966 | if (port_unreliable(p_ptr)) { | 960 | if (port_unreliable(p_ptr)) { |
967 | p_ptr->congested = 0; | 961 | p_ptr->congested = 0; |
968 | return total_len; | 962 | return len; |
969 | } | 963 | } |
970 | return -ELINKCONG; | 964 | return -ELINKCONG; |
971 | } | 965 | } |
@@ -974,8 +968,7 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect, | |||
974 | * tipc_send2name - send message sections to port name | 968 | * tipc_send2name - send message sections to port name |
975 | */ | 969 | */ |
976 | int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain, | 970 | int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain, |
977 | unsigned int num_sect, struct iovec const *msg_sect, | 971 | struct iovec const *msg_sect, unsigned int len) |
978 | unsigned int total_len) | ||
979 | { | 972 | { |
980 | struct tipc_port *p_ptr; | 973 | struct tipc_port *p_ptr; |
981 | struct tipc_msg *msg; | 974 | struct tipc_msg *msg; |
@@ -999,36 +992,32 @@ int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain, | |||
999 | 992 | ||
1000 | if (likely(destport || destnode)) { | 993 | if (likely(destport || destnode)) { |
1001 | if (likely(in_own_node(destnode))) | 994 | if (likely(in_own_node(destnode))) |
1002 | res = tipc_port_recv_sections(p_ptr, num_sect, | 995 | res = tipc_port_recv_sections(p_ptr, msg_sect, len); |
1003 | msg_sect, total_len); | ||
1004 | else if (tipc_own_addr) | 996 | else if (tipc_own_addr) |
1005 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, | 997 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, |
1006 | num_sect, total_len, | 998 | len, destnode); |
1007 | destnode); | ||
1008 | else | 999 | else |
1009 | res = tipc_port_reject_sections(p_ptr, msg, msg_sect, | 1000 | res = tipc_port_reject_sections(p_ptr, msg, msg_sect, |
1010 | num_sect, total_len, | 1001 | len, TIPC_ERR_NO_NODE); |
1011 | TIPC_ERR_NO_NODE); | ||
1012 | if (likely(res != -ELINKCONG)) { | 1002 | if (likely(res != -ELINKCONG)) { |
1013 | if (res > 0) | 1003 | if (res > 0) |
1014 | p_ptr->sent++; | 1004 | p_ptr->sent++; |
1015 | return res; | 1005 | return res; |
1016 | } | 1006 | } |
1017 | if (port_unreliable(p_ptr)) { | 1007 | if (port_unreliable(p_ptr)) { |
1018 | return total_len; | 1008 | return len; |
1019 | } | 1009 | } |
1020 | return -ELINKCONG; | 1010 | return -ELINKCONG; |
1021 | } | 1011 | } |
1022 | return tipc_port_reject_sections(p_ptr, msg, msg_sect, num_sect, | 1012 | return tipc_port_reject_sections(p_ptr, msg, msg_sect, len, |
1023 | total_len, TIPC_ERR_NO_NAME); | 1013 | TIPC_ERR_NO_NAME); |
1024 | } | 1014 | } |
1025 | 1015 | ||
1026 | /** | 1016 | /** |
1027 | * tipc_send2port - send message sections to port identity | 1017 | * tipc_send2port - send message sections to port identity |
1028 | */ | 1018 | */ |
1029 | int tipc_send2port(u32 ref, struct tipc_portid const *dest, | 1019 | int tipc_send2port(u32 ref, struct tipc_portid const *dest, |
1030 | unsigned int num_sect, struct iovec const *msg_sect, | 1020 | struct iovec const *msg_sect, unsigned int len) |
1031 | unsigned int total_len) | ||
1032 | { | 1021 | { |
1033 | struct tipc_port *p_ptr; | 1022 | struct tipc_port *p_ptr; |
1034 | struct tipc_msg *msg; | 1023 | struct tipc_msg *msg; |
@@ -1046,21 +1035,20 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest, | |||
1046 | msg_set_hdr_sz(msg, BASIC_H_SIZE); | 1035 | msg_set_hdr_sz(msg, BASIC_H_SIZE); |
1047 | 1036 | ||
1048 | if (in_own_node(dest->node)) | 1037 | if (in_own_node(dest->node)) |
1049 | res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect, | 1038 | res = tipc_port_recv_sections(p_ptr, msg_sect, len); |
1050 | total_len); | ||
1051 | else if (tipc_own_addr) | 1039 | else if (tipc_own_addr) |
1052 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, num_sect, | 1040 | res = tipc_link_send_sections_fast(p_ptr, msg_sect, len, |
1053 | total_len, dest->node); | 1041 | dest->node); |
1054 | else | 1042 | else |
1055 | res = tipc_port_reject_sections(p_ptr, msg, msg_sect, num_sect, | 1043 | res = tipc_port_reject_sections(p_ptr, msg, msg_sect, len, |
1056 | total_len, TIPC_ERR_NO_NODE); | 1044 | TIPC_ERR_NO_NODE); |
1057 | if (likely(res != -ELINKCONG)) { | 1045 | if (likely(res != -ELINKCONG)) { |
1058 | if (res > 0) | 1046 | if (res > 0) |
1059 | p_ptr->sent++; | 1047 | p_ptr->sent++; |
1060 | return res; | 1048 | return res; |
1061 | } | 1049 | } |
1062 | if (port_unreliable(p_ptr)) { | 1050 | if (port_unreliable(p_ptr)) { |
1063 | return total_len; | 1051 | return len; |
1064 | } | 1052 | } |
1065 | return -ELINKCONG; | 1053 | return -ELINKCONG; |
1066 | } | 1054 | } |
diff --git a/net/tipc/port.h b/net/tipc/port.h index 5a7026b9c345..912253597343 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
@@ -151,24 +151,20 @@ int tipc_port_peer_msg(struct tipc_port *p_ptr, struct tipc_msg *msg); | |||
151 | * TIPC messaging routines | 151 | * TIPC messaging routines |
152 | */ | 152 | */ |
153 | int tipc_port_recv_msg(struct sk_buff *buf); | 153 | int tipc_port_recv_msg(struct sk_buff *buf); |
154 | int tipc_send(u32 portref, unsigned int num_sect, struct iovec const *msg_sect, | 154 | int tipc_send(u32 portref, struct iovec const *msg_sect, unsigned int len); |
155 | unsigned int total_len); | ||
156 | 155 | ||
157 | int tipc_send2name(u32 portref, struct tipc_name const *name, u32 domain, | 156 | int tipc_send2name(u32 portref, struct tipc_name const *name, u32 domain, |
158 | unsigned int num_sect, struct iovec const *msg_sect, | 157 | struct iovec const *msg_sect, unsigned int len); |
159 | unsigned int total_len); | ||
160 | 158 | ||
161 | int tipc_send2port(u32 portref, struct tipc_portid const *dest, | 159 | int tipc_send2port(u32 portref, struct tipc_portid const *dest, |
162 | unsigned int num_sect, struct iovec const *msg_sect, | 160 | struct iovec const *msg_sect, unsigned int len); |
163 | unsigned int total_len); | ||
164 | 161 | ||
165 | int tipc_multicast(u32 portref, struct tipc_name_seq const *seq, | 162 | int tipc_multicast(u32 portref, struct tipc_name_seq const *seq, |
166 | unsigned int section_count, struct iovec const *msg, | 163 | struct iovec const *msg, unsigned int len); |
167 | unsigned int total_len); | ||
168 | 164 | ||
169 | int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, | 165 | int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, |
170 | struct iovec const *msg_sect, u32 num_sect, | 166 | struct iovec const *msg_sect, unsigned int len, |
171 | unsigned int total_len, int err); | 167 | int err); |
172 | struct sk_buff *tipc_port_get_ports(void); | 168 | struct sk_buff *tipc_port_get_ports(void); |
173 | void tipc_port_recv_proto_msg(struct sk_buff *buf); | 169 | void tipc_port_recv_proto_msg(struct sk_buff *buf); |
174 | void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp); | 170 | void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp); |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6cc7ddd2fb7c..d224382d8270 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -622,13 +622,11 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, | |||
622 | res = tipc_send2name(tport->ref, | 622 | res = tipc_send2name(tport->ref, |
623 | &dest->addr.name.name, | 623 | &dest->addr.name.name, |
624 | dest->addr.name.domain, | 624 | dest->addr.name.domain, |
625 | m->msg_iovlen, | ||
626 | m->msg_iov, | 625 | m->msg_iov, |
627 | total_len); | 626 | total_len); |
628 | } else if (dest->addrtype == TIPC_ADDR_ID) { | 627 | } else if (dest->addrtype == TIPC_ADDR_ID) { |
629 | res = tipc_send2port(tport->ref, | 628 | res = tipc_send2port(tport->ref, |
630 | &dest->addr.id, | 629 | &dest->addr.id, |
631 | m->msg_iovlen, | ||
632 | m->msg_iov, | 630 | m->msg_iov, |
633 | total_len); | 631 | total_len); |
634 | } else if (dest->addrtype == TIPC_ADDR_MCAST) { | 632 | } else if (dest->addrtype == TIPC_ADDR_MCAST) { |
@@ -641,7 +639,6 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, | |||
641 | break; | 639 | break; |
642 | res = tipc_multicast(tport->ref, | 640 | res = tipc_multicast(tport->ref, |
643 | &dest->addr.nameseq, | 641 | &dest->addr.nameseq, |
644 | m->msg_iovlen, | ||
645 | m->msg_iov, | 642 | m->msg_iov, |
646 | total_len); | 643 | total_len); |
647 | } | 644 | } |
@@ -707,8 +704,7 @@ static int send_packet(struct kiocb *iocb, struct socket *sock, | |||
707 | break; | 704 | break; |
708 | } | 705 | } |
709 | 706 | ||
710 | res = tipc_send(tport->ref, m->msg_iovlen, m->msg_iov, | 707 | res = tipc_send(tport->ref, m->msg_iov, total_len); |
711 | total_len); | ||
712 | if (likely(res != -ELINKCONG)) | 708 | if (likely(res != -ELINKCONG)) |
713 | break; | 709 | break; |
714 | if (timeout_val <= 0L) { | 710 | if (timeout_val <= 0L) { |