aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c6
-rw-r--r--net/tipc/bcast.h2
-rw-r--r--net/tipc/link.c18
-rw-r--r--net/tipc/link.h4
-rw-r--r--net/tipc/msg.c6
-rw-r--r--net/tipc/msg.h4
-rw-r--r--net/tipc/name_distr.c4
-rw-r--r--net/tipc/port.c10
-rw-r--r--net/tipc/socket.c20
9 files changed, 37 insertions, 37 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 2f3256da6f88..d890d480ae3b 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -389,13 +389,13 @@ static void bclink_peek_nack(struct tipc_msg *msg)
389 tipc_node_unlock(n_ptr); 389 tipc_node_unlock(n_ptr);
390} 390}
391 391
392/* tipc_bclink_xmit2 - broadcast buffer chain to all nodes in cluster 392/* tipc_bclink_xmit - broadcast buffer chain to all nodes in cluster
393 * and to identified node local sockets 393 * and to identified node local sockets
394 * @buf: chain of buffers containing message 394 * @buf: chain of buffers containing message
395 * Consumes the buffer chain, except when returning -ELINKCONG 395 * Consumes the buffer chain, except when returning -ELINKCONG
396 * Returns 0 if success, otherwise errno: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE 396 * Returns 0 if success, otherwise errno: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE
397 */ 397 */
398int tipc_bclink_xmit2(struct sk_buff *buf) 398int tipc_bclink_xmit(struct sk_buff *buf)
399{ 399{
400 int rc = 0; 400 int rc = 0;
401 int bc = 0; 401 int bc = 0;
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h
index af6b6579f5c7..4875d9536aee 100644
--- a/net/tipc/bcast.h
+++ b/net/tipc/bcast.h
@@ -98,6 +98,6 @@ int tipc_bclink_reset_stats(void);
98int tipc_bclink_set_queue_limits(u32 limit); 98int tipc_bclink_set_queue_limits(u32 limit);
99void tipc_bcbearer_sort(struct tipc_node_map *nm_ptr, u32 node, bool action); 99void tipc_bcbearer_sort(struct tipc_node_map *nm_ptr, u32 node, bool action);
100uint tipc_bclink_get_mtu(void); 100uint tipc_bclink_get_mtu(void);
101int tipc_bclink_xmit2(struct sk_buff *buf); 101int tipc_bclink_xmit(struct sk_buff *buf);
102 102
103#endif 103#endif
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 28730ddf4b78..fb1485dc6736 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -706,7 +706,7 @@ static int tipc_link_cong(struct tipc_link *link, struct sk_buff *buf)
706} 706}
707 707
708/** 708/**
709 * __tipc_link_xmit2(): same as tipc_link_xmit2, but destlink is known & locked 709 * __tipc_link_xmit(): same as tipc_link_xmit, but destlink is known & locked
710 * @link: link to use 710 * @link: link to use
711 * @buf: chain of buffers containing message 711 * @buf: chain of buffers containing message
712 * Consumes the buffer chain, except when returning -ELINKCONG 712 * Consumes the buffer chain, except when returning -ELINKCONG
@@ -715,7 +715,7 @@ static int tipc_link_cong(struct tipc_link *link, struct sk_buff *buf)
715 * Only the socket functions tipc_send_stream() and tipc_send_packet() need 715 * Only the socket functions tipc_send_stream() and tipc_send_packet() need
716 * to act on the return value, since they may need to do more send attempts. 716 * to act on the return value, since they may need to do more send attempts.
717 */ 717 */
718int __tipc_link_xmit2(struct tipc_link *link, struct sk_buff *buf) 718int __tipc_link_xmit(struct tipc_link *link, struct sk_buff *buf)
719{ 719{
720 struct tipc_msg *msg = buf_msg(buf); 720 struct tipc_msg *msg = buf_msg(buf);
721 uint psz = msg_size(msg); 721 uint psz = msg_size(msg);
@@ -783,7 +783,7 @@ int __tipc_link_xmit2(struct tipc_link *link, struct sk_buff *buf)
783} 783}
784 784
785/** 785/**
786 * tipc_link_xmit2() is the general link level function for message sending 786 * tipc_link_xmit() is the general link level function for message sending
787 * @buf: chain of buffers containing message 787 * @buf: chain of buffers containing message
788 * @dsz: amount of user data to be sent 788 * @dsz: amount of user data to be sent
789 * @dnode: address of destination node 789 * @dnode: address of destination node
@@ -791,7 +791,7 @@ int __tipc_link_xmit2(struct tipc_link *link, struct sk_buff *buf)
791 * Consumes the buffer chain, except when returning -ELINKCONG 791 * Consumes the buffer chain, except when returning -ELINKCONG
792 * Returns 0 if success, otherwise errno: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE 792 * Returns 0 if success, otherwise errno: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE
793 */ 793 */
794int tipc_link_xmit2(struct sk_buff *buf, u32 dnode, u32 selector) 794int tipc_link_xmit(struct sk_buff *buf, u32 dnode, u32 selector)
795{ 795{
796 struct tipc_link *link = NULL; 796 struct tipc_link *link = NULL;
797 struct tipc_node *node; 797 struct tipc_node *node;
@@ -802,7 +802,7 @@ int tipc_link_xmit2(struct sk_buff *buf, u32 dnode, u32 selector)
802 tipc_node_lock(node); 802 tipc_node_lock(node);
803 link = node->active_links[selector & 1]; 803 link = node->active_links[selector & 1];
804 if (link) 804 if (link)
805 rc = __tipc_link_xmit2(link, buf); 805 rc = __tipc_link_xmit(link, buf);
806 tipc_node_unlock(node); 806 tipc_node_unlock(node);
807 } 807 }
808 808
@@ -836,7 +836,7 @@ static void tipc_link_sync_xmit(struct tipc_link *link)
836 msg = buf_msg(buf); 836 msg = buf_msg(buf);
837 tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE, link->addr); 837 tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE, link->addr);
838 msg_set_last_bcast(msg, link->owner->bclink.acked); 838 msg_set_last_bcast(msg, link->owner->bclink.acked);
839 __tipc_link_xmit2(link, buf); 839 __tipc_link_xmit(link, buf);
840} 840}
841 841
842/* 842/*
@@ -1683,7 +1683,7 @@ static void tipc_link_tunnel_xmit(struct tipc_link *l_ptr,
1683 } 1683 }
1684 skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE); 1684 skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE);
1685 skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length); 1685 skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length);
1686 __tipc_link_xmit2(tunnel, buf); 1686 __tipc_link_xmit(tunnel, buf);
1687} 1687}
1688 1688
1689 1689
@@ -1716,7 +1716,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr)
1716 if (buf) { 1716 if (buf) {
1717 skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE); 1717 skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE);
1718 msg_set_size(&tunnel_hdr, INT_H_SIZE); 1718 msg_set_size(&tunnel_hdr, INT_H_SIZE);
1719 __tipc_link_xmit2(tunnel, buf); 1719 __tipc_link_xmit(tunnel, buf);
1720 } else { 1720 } else {
1721 pr_warn("%sunable to send changeover msg\n", 1721 pr_warn("%sunable to send changeover msg\n",
1722 link_co_err); 1722 link_co_err);
@@ -1789,7 +1789,7 @@ void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr,
1789 skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE); 1789 skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE);
1790 skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data, 1790 skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data,
1791 length); 1791 length);
1792 __tipc_link_xmit2(tunnel, outbuf); 1792 __tipc_link_xmit(tunnel, outbuf);
1793 if (!tipc_link_is_up(l_ptr)) 1793 if (!tipc_link_is_up(l_ptr))
1794 return; 1794 return;
1795 iter = iter->next; 1795 iter = iter->next;
diff --git a/net/tipc/link.h b/net/tipc/link.h
index f0ebeb677a8b..782983ccd323 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -226,8 +226,8 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area,
226void tipc_link_reset_all(struct tipc_node *node); 226void tipc_link_reset_all(struct tipc_node *node);
227void tipc_link_reset(struct tipc_link *l_ptr); 227void tipc_link_reset(struct tipc_link *l_ptr);
228void tipc_link_reset_list(unsigned int bearer_id); 228void tipc_link_reset_list(unsigned int bearer_id);
229int tipc_link_xmit2(struct sk_buff *buf, u32 dest, u32 selector); 229int tipc_link_xmit(struct sk_buff *buf, u32 dest, u32 selector);
230int __tipc_link_xmit2(struct tipc_link *link, struct sk_buff *buf); 230int __tipc_link_xmit(struct tipc_link *link, struct sk_buff *buf);
231u32 tipc_link_get_max_pkt(u32 dest, u32 selector); 231u32 tipc_link_get_max_pkt(u32 dest, u32 selector);
232void tipc_link_bundle_rcv(struct sk_buff *buf); 232void tipc_link_bundle_rcv(struct sk_buff *buf);
233void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob, 233void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob,
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index e3102ea494d4..b6f45d029933 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -120,7 +120,7 @@ out_free:
120 120
121 121
122/** 122/**
123 * tipc_msg_build2 - create buffer chain containing specified header and data 123 * tipc_msg_build - create buffer chain containing specified header and data
124 * @mhdr: Message header, to be prepended to data 124 * @mhdr: Message header, to be prepended to data
125 * @iov: User data 125 * @iov: User data
126 * @offset: Posision in iov to start copying from 126 * @offset: Posision in iov to start copying from
@@ -129,8 +129,8 @@ out_free:
129 * @chain: Buffer or chain of buffers to be returned to caller 129 * @chain: Buffer or chain of buffers to be returned to caller
130 * Returns message data size or errno: -ENOMEM, -EFAULT 130 * Returns message data size or errno: -ENOMEM, -EFAULT
131 */ 131 */
132int tipc_msg_build2(struct tipc_msg *mhdr, struct iovec const *iov, 132int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov,
133 int offset, int dsz, int pktmax , struct sk_buff **chain) 133 int offset, int dsz, int pktmax , struct sk_buff **chain)
134{ 134{
135 int mhsz = msg_hdr_sz(mhdr); 135 int mhsz = msg_hdr_sz(mhdr);
136 int msz = mhsz + dsz; 136 int msz = mhsz + dsz;
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 868fe22e3452..462fa194a6af 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -738,8 +738,8 @@ bool tipc_msg_bundle(struct sk_buff *bbuf, struct sk_buff *buf, u32 mtu);
738 738
739bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode); 739bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode);
740 740
741int tipc_msg_build2(struct tipc_msg *mhdr, struct iovec const *iov, 741int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov,
742 int offset, int dsz, int mtu , struct sk_buff **chain); 742 int offset, int dsz, int mtu , struct sk_buff **chain);
743 743
744struct sk_buff *tipc_msg_reassemble(struct sk_buff *chain); 744struct sk_buff *tipc_msg_reassemble(struct sk_buff *chain);
745 745
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index d16f9475fa76..dcc15bcd5692 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -116,7 +116,7 @@ void named_cluster_distribute(struct sk_buff *buf)
116 if (!obuf) 116 if (!obuf)
117 break; 117 break;
118 msg_set_destnode(buf_msg(obuf), dnode); 118 msg_set_destnode(buf_msg(obuf), dnode);
119 tipc_link_xmit2(obuf, dnode, dnode); 119 tipc_link_xmit(obuf, dnode, dnode);
120 } 120 }
121 rcu_read_unlock(); 121 rcu_read_unlock();
122 122
@@ -232,7 +232,7 @@ void tipc_named_node_up(u32 dnode)
232 /* Convert circular list to linear list and send: */ 232 /* Convert circular list to linear list and send: */
233 buf_chain = (struct sk_buff *)msg_list.next; 233 buf_chain = (struct sk_buff *)msg_list.next;
234 ((struct sk_buff *)msg_list.prev)->next = NULL; 234 ((struct sk_buff *)msg_list.prev)->next = NULL;
235 tipc_link_xmit2(buf_chain, dnode, dnode); 235 tipc_link_xmit(buf_chain, dnode, dnode);
236} 236}
237 237
238/** 238/**
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 835dca1fd7ad..7e096a5e7701 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -130,7 +130,7 @@ void tipc_port_destroy(struct tipc_port *p_ptr)
130 tipc_nodesub_unsubscribe(&p_ptr->subscription); 130 tipc_nodesub_unsubscribe(&p_ptr->subscription);
131 msg = buf_msg(buf); 131 msg = buf_msg(buf);
132 peer = msg_destnode(msg); 132 peer = msg_destnode(msg);
133 tipc_link_xmit2(buf, peer, msg_link_selector(msg)); 133 tipc_link_xmit(buf, peer, msg_link_selector(msg));
134 } 134 }
135 spin_lock_bh(&tipc_port_list_lock); 135 spin_lock_bh(&tipc_port_list_lock);
136 list_del(&p_ptr->port_list); 136 list_del(&p_ptr->port_list);
@@ -187,7 +187,7 @@ static void port_timeout(unsigned long ref)
187 } 187 }
188 tipc_port_unlock(p_ptr); 188 tipc_port_unlock(p_ptr);
189 msg = buf_msg(buf); 189 msg = buf_msg(buf);
190 tipc_link_xmit2(buf, msg_destnode(msg), msg_link_selector(msg)); 190 tipc_link_xmit(buf, msg_destnode(msg), msg_link_selector(msg));
191} 191}
192 192
193 193
@@ -202,7 +202,7 @@ static void port_handle_node_down(unsigned long ref)
202 buf = port_build_self_abort_msg(p_ptr, TIPC_ERR_NO_NODE); 202 buf = port_build_self_abort_msg(p_ptr, TIPC_ERR_NO_NODE);
203 tipc_port_unlock(p_ptr); 203 tipc_port_unlock(p_ptr);
204 msg = buf_msg(buf); 204 msg = buf_msg(buf);
205 tipc_link_xmit2(buf, msg_destnode(msg), msg_link_selector(msg)); 205 tipc_link_xmit(buf, msg_destnode(msg), msg_link_selector(msg));
206} 206}
207 207
208 208
@@ -347,7 +347,7 @@ void tipc_acknowledge(u32 ref, u32 ack)
347 if (!buf) 347 if (!buf)
348 return; 348 return;
349 msg = buf_msg(buf); 349 msg = buf_msg(buf);
350 tipc_link_xmit2(buf, msg_destnode(msg), msg_link_selector(msg)); 350 tipc_link_xmit(buf, msg_destnode(msg), msg_link_selector(msg));
351} 351}
352 352
353int tipc_publish(struct tipc_port *p_ptr, unsigned int scope, 353int tipc_publish(struct tipc_port *p_ptr, unsigned int scope,
@@ -509,6 +509,6 @@ int tipc_port_shutdown(u32 ref)
509 buf = port_build_peer_abort_msg(p_ptr, TIPC_CONN_SHUTDOWN); 509 buf = port_build_peer_abort_msg(p_ptr, TIPC_CONN_SHUTDOWN);
510 tipc_port_unlock(p_ptr); 510 tipc_port_unlock(p_ptr);
511 msg = buf_msg(buf); 511 msg = buf_msg(buf);
512 tipc_link_xmit2(buf, msg_destnode(msg), msg_link_selector(msg)); 512 tipc_link_xmit(buf, msg_destnode(msg), msg_link_selector(msg));
513 return tipc_port_disconnect(ref); 513 return tipc_port_disconnect(ref);
514} 514}
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index b28eea50c7fc..5ad42f6137d8 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -131,7 +131,7 @@ static void reject_rx_queue(struct sock *sk)
131 131
132 while ((buf = __skb_dequeue(&sk->sk_receive_queue))) { 132 while ((buf = __skb_dequeue(&sk->sk_receive_queue))) {
133 if (tipc_msg_reverse(buf, &dnode, TIPC_ERR_NO_PORT)) 133 if (tipc_msg_reverse(buf, &dnode, TIPC_ERR_NO_PORT))
134 tipc_link_xmit2(buf, dnode, 0); 134 tipc_link_xmit(buf, dnode, 0);
135 } 135 }
136} 136}
137 137
@@ -341,7 +341,7 @@ static int tipc_release(struct socket *sock)
341 tipc_port_disconnect(port->ref); 341 tipc_port_disconnect(port->ref);
342 } 342 }
343 if (tipc_msg_reverse(buf, &dnode, TIPC_ERR_NO_PORT)) 343 if (tipc_msg_reverse(buf, &dnode, TIPC_ERR_NO_PORT))
344 tipc_link_xmit2(buf, dnode, 0); 344 tipc_link_xmit(buf, dnode, 0);
345 } 345 }
346 } 346 }
347 347
@@ -566,7 +566,7 @@ static int tipc_sendmcast(struct socket *sock, struct tipc_name_seq *seq,
566 566
567new_mtu: 567new_mtu:
568 mtu = tipc_bclink_get_mtu(); 568 mtu = tipc_bclink_get_mtu();
569 rc = tipc_msg_build2(mhdr, iov, 0, dsz, mtu, &buf); 569 rc = tipc_msg_build(mhdr, iov, 0, dsz, mtu, &buf);
570 if (unlikely(rc < 0)) 570 if (unlikely(rc < 0))
571 return rc; 571 return rc;
572 572
@@ -821,12 +821,12 @@ static int tipc_sendmsg(struct kiocb *iocb, struct socket *sock,
821 821
822new_mtu: 822new_mtu:
823 mtu = tipc_node_get_mtu(dnode, tsk->port.ref); 823 mtu = tipc_node_get_mtu(dnode, tsk->port.ref);
824 rc = tipc_msg_build2(mhdr, iov, 0, dsz, mtu, &buf); 824 rc = tipc_msg_build(mhdr, iov, 0, dsz, mtu, &buf);
825 if (rc < 0) 825 if (rc < 0)
826 goto exit; 826 goto exit;
827 827
828 do { 828 do {
829 rc = tipc_link_xmit2(buf, dnode, tsk->port.ref); 829 rc = tipc_link_xmit(buf, dnode, tsk->port.ref);
830 if (likely(rc >= 0)) { 830 if (likely(rc >= 0)) {
831 if (sock->state != SS_READY) 831 if (sock->state != SS_READY)
832 sock->state = SS_CONNECTING; 832 sock->state = SS_CONNECTING;
@@ -934,12 +934,12 @@ static int tipc_send_stream(struct kiocb *iocb, struct socket *sock,
934next: 934next:
935 mtu = port->max_pkt; 935 mtu = port->max_pkt;
936 send = min_t(uint, dsz - sent, TIPC_MAX_USER_MSG_SIZE); 936 send = min_t(uint, dsz - sent, TIPC_MAX_USER_MSG_SIZE);
937 rc = tipc_msg_build2(mhdr, m->msg_iov, sent, send, mtu, &buf); 937 rc = tipc_msg_build(mhdr, m->msg_iov, sent, send, mtu, &buf);
938 if (unlikely(rc < 0)) 938 if (unlikely(rc < 0))
939 goto exit; 939 goto exit;
940 do { 940 do {
941 if (likely(!tipc_sk_conn_cong(tsk))) { 941 if (likely(!tipc_sk_conn_cong(tsk))) {
942 rc = tipc_link_xmit2(buf, dnode, ref); 942 rc = tipc_link_xmit(buf, dnode, ref);
943 if (likely(!rc)) { 943 if (likely(!rc)) {
944 tsk->sent_unacked++; 944 tsk->sent_unacked++;
945 sent += send; 945 sent += send;
@@ -1571,7 +1571,7 @@ static int tipc_backlog_rcv(struct sock *sk, struct sk_buff *buf)
1571 if ((rc < 0) && !tipc_msg_reverse(buf, &onode, -rc)) 1571 if ((rc < 0) && !tipc_msg_reverse(buf, &onode, -rc))
1572 return 0; 1572 return 0;
1573 1573
1574 tipc_link_xmit2(buf, onode, 0); 1574 tipc_link_xmit(buf, onode, 0);
1575 1575
1576 return 0; 1576 return 0;
1577} 1577}
@@ -1623,7 +1623,7 @@ exit:
1623 if ((rc < 0) && !tipc_msg_reverse(buf, &dnode, -rc)) 1623 if ((rc < 0) && !tipc_msg_reverse(buf, &dnode, -rc))
1624 return -EHOSTUNREACH; 1624 return -EHOSTUNREACH;
1625 1625
1626 tipc_link_xmit2(buf, dnode, 0); 1626 tipc_link_xmit(buf, dnode, 0);
1627 return (rc < 0) ? -EHOSTUNREACH : 0; 1627 return (rc < 0) ? -EHOSTUNREACH : 0;
1628} 1628}
1629 1629
@@ -1910,7 +1910,7 @@ restart:
1910 } 1910 }
1911 tipc_port_disconnect(port->ref); 1911 tipc_port_disconnect(port->ref);
1912 if (tipc_msg_reverse(buf, &peer, TIPC_CONN_SHUTDOWN)) 1912 if (tipc_msg_reverse(buf, &peer, TIPC_CONN_SHUTDOWN))
1913 tipc_link_xmit2(buf, peer, 0); 1913 tipc_link_xmit(buf, peer, 0);
1914 } else { 1914 } else {
1915 tipc_port_shutdown(port->ref); 1915 tipc_port_shutdown(port->ref);
1916 } 1916 }