aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-02-18 03:06:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-18 17:31:59 -0500
commit247f0f3c3176c55b46cb9a20011d3d6757634815 (patch)
tree634cb9d42ab33082f75f152a5886dffbcb9cc825 /net/tipc
parentb356e978e92fccd17a3e4620a4821bdbfb706c1a (diff)
tipc: align tipc function names with common naming practice in the network
Rename the following functions, which are shorter and more in line with common naming practice in the network subsystem. tipc_bclink_send_msg->tipc_bclink_xmit tipc_bclink_recv_pkt->tipc_bclink_rcv tipc_disc_recv_msg->tipc_disc_rcv tipc_link_send_proto_msg->tipc_link_proto_xmit link_recv_proto_msg->tipc_link_proto_rcv link_send_sections_long->tipc_link_iovec_long_xmit tipc_link_send_sections_fast->tipc_link_iovec_xmit_fast tipc_link_send_sync->tipc_link_sync_xmit tipc_link_recv_sync->tipc_link_sync_rcv tipc_link_send_buf->__tipc_link_xmit tipc_link_send->tipc_link_xmit tipc_link_send_names->tipc_link_names_xmit tipc_named_recv->tipc_named_rcv tipc_link_recv_bundle->tipc_link_bundle_rcv tipc_link_dup_send_queue->tipc_link_dup_queue_xmit link_send_long_buf->tipc_link_frag_xmit tipc_multicast->tipc_port_mcast_xmit tipc_port_recv_mcast->tipc_port_mcast_rcv tipc_port_reject_sections->tipc_port_iovec_reject tipc_port_recv_proto_msg->tipc_port_proto_rcv tipc_connect->tipc_port_connect __tipc_connect->__tipc_port_connect __tipc_disconnect->__tipc_port_disconnect tipc_disconnect->tipc_port_disconnect tipc_shutdown->tipc_port_shutdown tipc_port_recv_msg->tipc_port_rcv tipc_port_recv_sections->tipc_port_iovec_rcv release->tipc_release accept->tipc_accept bind->tipc_bind get_name->tipc_getname poll->tipc_poll send_msg->tipc_sendmsg send_packet->tipc_send_packet send_stream->tipc_send_stream recv_msg->tipc_recvmsg recv_stream->tipc_recv_stream connect->tipc_connect listen->tipc_listen shutdown->tipc_shutdown setsockopt->tipc_setsockopt getsockopt->tipc_getsockopt Above changes have no impact on current users of the functions. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c21
-rw-r--r--net/tipc/bcast.h4
-rw-r--r--net/tipc/discover.c4
-rw-r--r--net/tipc/discover.h2
-rw-r--r--net/tipc/link.c184
-rw-r--r--net/tipc/link.h29
-rw-r--r--net/tipc/name_distr.c8
-rw-r--r--net/tipc/name_distr.h2
-rw-r--r--net/tipc/net.c10
-rw-r--r--net/tipc/node.c2
-rw-r--r--net/tipc/port.c97
-rw-r--r--net/tipc/port.h26
-rw-r--r--net/tipc/socket.c188
13 files changed, 290 insertions, 287 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 06a639c375f0..e0feb7ef1469 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -356,9 +356,9 @@ static void bclink_peek_nack(struct tipc_msg *msg)
356} 356}
357 357
358/* 358/*
359 * tipc_bclink_send_msg - broadcast a packet to all nodes in cluster 359 * tipc_bclink_xmit - broadcast a packet to all nodes in cluster
360 */ 360 */
361int tipc_bclink_send_msg(struct sk_buff *buf) 361int tipc_bclink_xmit(struct sk_buff *buf)
362{ 362{
363 int res; 363 int res;
364 364
@@ -370,7 +370,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
370 goto exit; 370 goto exit;
371 } 371 }
372 372
373 res = tipc_link_send_buf(bcl, buf); 373 res = __tipc_link_xmit(bcl, buf);
374 if (likely(res >= 0)) { 374 if (likely(res >= 0)) {
375 bclink_set_last_sent(); 375 bclink_set_last_sent();
376 bcl->stats.queue_sz_counts++; 376 bcl->stats.queue_sz_counts++;
@@ -399,19 +399,18 @@ static void bclink_accept_pkt(struct tipc_node *node, u32 seqno)
399 */ 399 */
400 400
401 if (((seqno - tipc_own_addr) % TIPC_MIN_LINK_WIN) == 0) { 401 if (((seqno - tipc_own_addr) % TIPC_MIN_LINK_WIN) == 0) {
402 tipc_link_send_proto_msg( 402 tipc_link_proto_xmit(node->active_links[node->addr & 1],
403 node->active_links[node->addr & 1], 403 STATE_MSG, 0, 0, 0, 0, 0);
404 STATE_MSG, 0, 0, 0, 0, 0);
405 bcl->stats.sent_acks++; 404 bcl->stats.sent_acks++;
406 } 405 }
407} 406}
408 407
409/** 408/**
410 * tipc_bclink_recv_pkt - receive a broadcast packet, and deliver upwards 409 * tipc_bclink_rcv - receive a broadcast packet, and deliver upwards
411 * 410 *
412 * tipc_net_lock is read_locked, no other locks set 411 * tipc_net_lock is read_locked, no other locks set
413 */ 412 */
414void tipc_bclink_recv_pkt(struct sk_buff *buf) 413void tipc_bclink_rcv(struct sk_buff *buf)
415{ 414{
416 struct tipc_msg *msg = buf_msg(buf); 415 struct tipc_msg *msg = buf_msg(buf);
417 struct tipc_node *node; 416 struct tipc_node *node;
@@ -468,7 +467,7 @@ receive:
468 spin_unlock_bh(&bc_lock); 467 spin_unlock_bh(&bc_lock);
469 tipc_node_unlock(node); 468 tipc_node_unlock(node);
470 if (likely(msg_mcast(msg))) 469 if (likely(msg_mcast(msg)))
471 tipc_port_recv_mcast(buf, NULL); 470 tipc_port_mcast_rcv(buf, NULL);
472 else 471 else
473 kfree_skb(buf); 472 kfree_skb(buf);
474 } else if (msg_user(msg) == MSG_BUNDLER) { 473 } else if (msg_user(msg) == MSG_BUNDLER) {
@@ -478,7 +477,7 @@ receive:
478 bcl->stats.recv_bundled += msg_msgcnt(msg); 477 bcl->stats.recv_bundled += msg_msgcnt(msg);
479 spin_unlock_bh(&bc_lock); 478 spin_unlock_bh(&bc_lock);
480 tipc_node_unlock(node); 479 tipc_node_unlock(node);
481 tipc_link_recv_bundle(buf); 480 tipc_link_bundle_rcv(buf);
482 } else if (msg_user(msg) == MSG_FRAGMENTER) { 481 } else if (msg_user(msg) == MSG_FRAGMENTER) {
483 int ret; 482 int ret;
484 ret = tipc_link_frag_rcv(&node->bclink.reasm_head, 483 ret = tipc_link_frag_rcv(&node->bclink.reasm_head,
@@ -503,7 +502,7 @@ receive:
503 bclink_accept_pkt(node, seqno); 502 bclink_accept_pkt(node, seqno);
504 spin_unlock_bh(&bc_lock); 503 spin_unlock_bh(&bc_lock);
505 tipc_node_unlock(node); 504 tipc_node_unlock(node);
506 tipc_named_recv(buf); 505 tipc_named_rcv(buf);
507 } else { 506 } else {
508 spin_lock_bh(&bc_lock); 507 spin_lock_bh(&bc_lock);
509 bclink_accept_pkt(node, seqno); 508 bclink_accept_pkt(node, seqno);
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h
index 6ee587b469fd..a80ef54b818e 100644
--- a/net/tipc/bcast.h
+++ b/net/tipc/bcast.h
@@ -90,8 +90,8 @@ void tipc_bclink_add_node(u32 addr);
90void tipc_bclink_remove_node(u32 addr); 90void tipc_bclink_remove_node(u32 addr);
91struct tipc_node *tipc_bclink_retransmit_to(void); 91struct tipc_node *tipc_bclink_retransmit_to(void);
92void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked); 92void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked);
93int tipc_bclink_send_msg(struct sk_buff *buf); 93int tipc_bclink_xmit(struct sk_buff *buf);
94void tipc_bclink_recv_pkt(struct sk_buff *buf); 94void tipc_bclink_rcv(struct sk_buff *buf);
95u32 tipc_bclink_get_last_sent(void); 95u32 tipc_bclink_get_last_sent(void);
96u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr); 96u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr);
97void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent); 97void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent);
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index 412ff41b8611..fa94da6db3d4 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -110,11 +110,11 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr,
110} 110}
111 111
112/** 112/**
113 * tipc_disc_recv_msg - handle incoming link setup message (request or response) 113 * tipc_disc_rcv - handle incoming link setup message (request or response)
114 * @buf: buffer containing message 114 * @buf: buffer containing message
115 * @b_ptr: bearer that message arrived on 115 * @b_ptr: bearer that message arrived on
116 */ 116 */
117void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) 117void tipc_disc_rcv(struct sk_buff *buf, struct tipc_bearer *b_ptr)
118{ 118{
119 struct tipc_node *n_ptr; 119 struct tipc_node *n_ptr;
120 struct tipc_link *link; 120 struct tipc_link *link;
diff --git a/net/tipc/discover.h b/net/tipc/discover.h
index 75b67c403aa3..b4fc962c3623 100644
--- a/net/tipc/discover.h
+++ b/net/tipc/discover.h
@@ -44,6 +44,6 @@ int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest,
44void tipc_disc_delete(struct tipc_link_req *req); 44void tipc_disc_delete(struct tipc_link_req *req);
45void tipc_disc_add_dest(struct tipc_link_req *req); 45void tipc_disc_add_dest(struct tipc_link_req *req);
46void tipc_disc_remove_dest(struct tipc_link_req *req); 46void tipc_disc_remove_dest(struct tipc_link_req *req);
47void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr); 47void tipc_disc_rcv(struct sk_buff *buf, struct tipc_bearer *b_ptr);
48 48
49#endif 49#endif
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 5422e96014e2..e4f233d58d35 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -77,19 +77,19 @@ static const char *link_unk_evt = "Unknown link event ";
77 77
78static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr, 78static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
79 struct sk_buff *buf); 79 struct sk_buff *buf);
80static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf); 80static void tipc_link_proto_rcv(struct tipc_link *l_ptr, struct sk_buff *buf);
81static int tipc_link_tunnel_rcv(struct tipc_node *n_ptr, 81static int tipc_link_tunnel_rcv(struct tipc_node *n_ptr,
82 struct sk_buff **buf); 82 struct sk_buff **buf);
83static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); 83static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance);
84static int link_send_sections_long(struct tipc_port *sender, 84static int tipc_link_iovec_long_xmit(struct tipc_port *sender,
85 struct iovec const *msg_sect, 85 struct iovec const *msg_sect,
86 unsigned int len, u32 destnode); 86 unsigned int len, u32 destnode);
87static void link_state_event(struct tipc_link *l_ptr, u32 event); 87static void link_state_event(struct tipc_link *l_ptr, u32 event);
88static void link_reset_statistics(struct tipc_link *l_ptr); 88static void link_reset_statistics(struct tipc_link *l_ptr);
89static void link_print(struct tipc_link *l_ptr, const char *str); 89static void link_print(struct tipc_link *l_ptr, const char *str);
90static int link_send_long_buf(struct tipc_link *l_ptr, struct sk_buff *buf); 90static int tipc_link_frag_xmit(struct tipc_link *l_ptr, struct sk_buff *buf);
91static void tipc_link_send_sync(struct tipc_link *l); 91static void tipc_link_sync_xmit(struct tipc_link *l);
92static void tipc_link_recv_sync(struct tipc_node *n, struct sk_buff *buf); 92static void tipc_link_sync_rcv(struct tipc_node *n, struct sk_buff *buf);
93 93
94/* 94/*
95 * Simple link routines 95 * Simple link routines
@@ -512,12 +512,12 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
512 if (l_ptr->next_in_no != l_ptr->checkpoint) { 512 if (l_ptr->next_in_no != l_ptr->checkpoint) {
513 l_ptr->checkpoint = l_ptr->next_in_no; 513 l_ptr->checkpoint = l_ptr->next_in_no;
514 if (tipc_bclink_acks_missing(l_ptr->owner)) { 514 if (tipc_bclink_acks_missing(l_ptr->owner)) {
515 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 515 tipc_link_proto_xmit(l_ptr, STATE_MSG,
516 0, 0, 0, 0, 0); 516 0, 0, 0, 0, 0);
517 l_ptr->fsm_msg_cnt++; 517 l_ptr->fsm_msg_cnt++;
518 } else if (l_ptr->max_pkt < l_ptr->max_pkt_target) { 518 } else if (l_ptr->max_pkt < l_ptr->max_pkt_target) {
519 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 519 tipc_link_proto_xmit(l_ptr, STATE_MSG,
520 1, 0, 0, 0, 0); 520 1, 0, 0, 0, 0);
521 l_ptr->fsm_msg_cnt++; 521 l_ptr->fsm_msg_cnt++;
522 } 522 }
523 link_set_timer(l_ptr, cont_intv); 523 link_set_timer(l_ptr, cont_intv);
@@ -525,7 +525,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
525 } 525 }
526 l_ptr->state = WORKING_UNKNOWN; 526 l_ptr->state = WORKING_UNKNOWN;
527 l_ptr->fsm_msg_cnt = 0; 527 l_ptr->fsm_msg_cnt = 0;
528 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 1, 0, 0, 0, 0); 528 tipc_link_proto_xmit(l_ptr, STATE_MSG, 1, 0, 0, 0, 0);
529 l_ptr->fsm_msg_cnt++; 529 l_ptr->fsm_msg_cnt++;
530 link_set_timer(l_ptr, cont_intv / 4); 530 link_set_timer(l_ptr, cont_intv / 4);
531 break; 531 break;
@@ -535,7 +535,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
535 tipc_link_reset(l_ptr); 535 tipc_link_reset(l_ptr);
536 l_ptr->state = RESET_RESET; 536 l_ptr->state = RESET_RESET;
537 l_ptr->fsm_msg_cnt = 0; 537 l_ptr->fsm_msg_cnt = 0;
538 tipc_link_send_proto_msg(l_ptr, ACTIVATE_MSG, 0, 0, 0, 0, 0); 538 tipc_link_proto_xmit(l_ptr, ACTIVATE_MSG,
539 0, 0, 0, 0, 0);
539 l_ptr->fsm_msg_cnt++; 540 l_ptr->fsm_msg_cnt++;
540 link_set_timer(l_ptr, cont_intv); 541 link_set_timer(l_ptr, cont_intv);
541 break; 542 break;
@@ -557,7 +558,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
557 tipc_link_reset(l_ptr); 558 tipc_link_reset(l_ptr);
558 l_ptr->state = RESET_RESET; 559 l_ptr->state = RESET_RESET;
559 l_ptr->fsm_msg_cnt = 0; 560 l_ptr->fsm_msg_cnt = 0;
560 tipc_link_send_proto_msg(l_ptr, ACTIVATE_MSG, 0, 0, 0, 0, 0); 561 tipc_link_proto_xmit(l_ptr, ACTIVATE_MSG,
562 0, 0, 0, 0, 0);
561 l_ptr->fsm_msg_cnt++; 563 l_ptr->fsm_msg_cnt++;
562 link_set_timer(l_ptr, cont_intv); 564 link_set_timer(l_ptr, cont_intv);
563 break; 565 break;
@@ -567,14 +569,14 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
567 l_ptr->fsm_msg_cnt = 0; 569 l_ptr->fsm_msg_cnt = 0;
568 l_ptr->checkpoint = l_ptr->next_in_no; 570 l_ptr->checkpoint = l_ptr->next_in_no;
569 if (tipc_bclink_acks_missing(l_ptr->owner)) { 571 if (tipc_bclink_acks_missing(l_ptr->owner)) {
570 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 572 tipc_link_proto_xmit(l_ptr, STATE_MSG,
571 0, 0, 0, 0, 0); 573 0, 0, 0, 0, 0);
572 l_ptr->fsm_msg_cnt++; 574 l_ptr->fsm_msg_cnt++;
573 } 575 }
574 link_set_timer(l_ptr, cont_intv); 576 link_set_timer(l_ptr, cont_intv);
575 } else if (l_ptr->fsm_msg_cnt < l_ptr->abort_limit) { 577 } else if (l_ptr->fsm_msg_cnt < l_ptr->abort_limit) {
576 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 578 tipc_link_proto_xmit(l_ptr, STATE_MSG,
577 1, 0, 0, 0, 0); 579 1, 0, 0, 0, 0);
578 l_ptr->fsm_msg_cnt++; 580 l_ptr->fsm_msg_cnt++;
579 link_set_timer(l_ptr, cont_intv / 4); 581 link_set_timer(l_ptr, cont_intv / 4);
580 } else { /* Link has failed */ 582 } else { /* Link has failed */
@@ -583,8 +585,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
583 tipc_link_reset(l_ptr); 585 tipc_link_reset(l_ptr);
584 l_ptr->state = RESET_UNKNOWN; 586 l_ptr->state = RESET_UNKNOWN;
585 l_ptr->fsm_msg_cnt = 0; 587 l_ptr->fsm_msg_cnt = 0;
586 tipc_link_send_proto_msg(l_ptr, RESET_MSG, 588 tipc_link_proto_xmit(l_ptr, RESET_MSG,
587 0, 0, 0, 0, 0); 589 0, 0, 0, 0, 0);
588 l_ptr->fsm_msg_cnt++; 590 l_ptr->fsm_msg_cnt++;
589 link_set_timer(l_ptr, cont_intv); 591 link_set_timer(l_ptr, cont_intv);
590 } 592 }
@@ -604,16 +606,17 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
604 l_ptr->state = WORKING_WORKING; 606 l_ptr->state = WORKING_WORKING;
605 l_ptr->fsm_msg_cnt = 0; 607 l_ptr->fsm_msg_cnt = 0;
606 link_activate(l_ptr); 608 link_activate(l_ptr);
607 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 1, 0, 0, 0, 0); 609 tipc_link_proto_xmit(l_ptr, STATE_MSG, 1, 0, 0, 0, 0);
608 l_ptr->fsm_msg_cnt++; 610 l_ptr->fsm_msg_cnt++;
609 if (l_ptr->owner->working_links == 1) 611 if (l_ptr->owner->working_links == 1)
610 tipc_link_send_sync(l_ptr); 612 tipc_link_sync_xmit(l_ptr);
611 link_set_timer(l_ptr, cont_intv); 613 link_set_timer(l_ptr, cont_intv);
612 break; 614 break;
613 case RESET_MSG: 615 case RESET_MSG:
614 l_ptr->state = RESET_RESET; 616 l_ptr->state = RESET_RESET;
615 l_ptr->fsm_msg_cnt = 0; 617 l_ptr->fsm_msg_cnt = 0;
616 tipc_link_send_proto_msg(l_ptr, ACTIVATE_MSG, 1, 0, 0, 0, 0); 618 tipc_link_proto_xmit(l_ptr, ACTIVATE_MSG,
619 1, 0, 0, 0, 0);
617 l_ptr->fsm_msg_cnt++; 620 l_ptr->fsm_msg_cnt++;
618 link_set_timer(l_ptr, cont_intv); 621 link_set_timer(l_ptr, cont_intv);
619 break; 622 break;
@@ -621,7 +624,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
621 l_ptr->flags |= LINK_STARTED; 624 l_ptr->flags |= LINK_STARTED;
622 /* fall through */ 625 /* fall through */
623 case TIMEOUT_EVT: 626 case TIMEOUT_EVT:
624 tipc_link_send_proto_msg(l_ptr, RESET_MSG, 0, 0, 0, 0, 0); 627 tipc_link_proto_xmit(l_ptr, RESET_MSG, 0, 0, 0, 0, 0);
625 l_ptr->fsm_msg_cnt++; 628 l_ptr->fsm_msg_cnt++;
626 link_set_timer(l_ptr, cont_intv); 629 link_set_timer(l_ptr, cont_intv);
627 break; 630 break;
@@ -639,16 +642,17 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
639 l_ptr->state = WORKING_WORKING; 642 l_ptr->state = WORKING_WORKING;
640 l_ptr->fsm_msg_cnt = 0; 643 l_ptr->fsm_msg_cnt = 0;
641 link_activate(l_ptr); 644 link_activate(l_ptr);
642 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 1, 0, 0, 0, 0); 645 tipc_link_proto_xmit(l_ptr, STATE_MSG, 1, 0, 0, 0, 0);
643 l_ptr->fsm_msg_cnt++; 646 l_ptr->fsm_msg_cnt++;
644 if (l_ptr->owner->working_links == 1) 647 if (l_ptr->owner->working_links == 1)
645 tipc_link_send_sync(l_ptr); 648 tipc_link_sync_xmit(l_ptr);
646 link_set_timer(l_ptr, cont_intv); 649 link_set_timer(l_ptr, cont_intv);
647 break; 650 break;
648 case RESET_MSG: 651 case RESET_MSG:
649 break; 652 break;
650 case TIMEOUT_EVT: 653 case TIMEOUT_EVT:
651 tipc_link_send_proto_msg(l_ptr, ACTIVATE_MSG, 0, 0, 0, 0, 0); 654 tipc_link_proto_xmit(l_ptr, ACTIVATE_MSG,
655 0, 0, 0, 0, 0);
652 l_ptr->fsm_msg_cnt++; 656 l_ptr->fsm_msg_cnt++;
653 link_set_timer(l_ptr, cont_intv); 657 link_set_timer(l_ptr, cont_intv);
654 break; 658 break;
@@ -734,11 +738,11 @@ static void link_add_chain_to_outqueue(struct tipc_link *l_ptr,
734} 738}
735 739
736/* 740/*
737 * tipc_link_send_buf() is the 'full path' for messages, called from 741 * tipc_link_xmit() is the 'full path' for messages, called from
738 * inside TIPC when the 'fast path' in tipc_send_buf 742 * inside TIPC when the 'fast path' in tipc_send_xmit
739 * has failed, and from link_send() 743 * has failed, and from link_send()
740 */ 744 */
741int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf) 745int __tipc_link_xmit(struct tipc_link *l_ptr, struct sk_buff *buf)
742{ 746{
743 struct tipc_msg *msg = buf_msg(buf); 747 struct tipc_msg *msg = buf_msg(buf);
744 u32 size = msg_size(msg); 748 u32 size = msg_size(msg);
@@ -766,7 +770,7 @@ int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf)
766 770
767 /* Fragmentation needed ? */ 771 /* Fragmentation needed ? */
768 if (size > max_packet) 772 if (size > max_packet)
769 return link_send_long_buf(l_ptr, buf); 773 return tipc_link_frag_xmit(l_ptr, buf);
770 774
771 /* Packet can be queued or sent. */ 775 /* Packet can be queued or sent. */
772 if (likely(!link_congested(l_ptr))) { 776 if (likely(!link_congested(l_ptr))) {
@@ -810,11 +814,11 @@ int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf)
810} 814}
811 815
812/* 816/*
813 * tipc_link_send(): same as tipc_link_send_buf(), but the link to use has 817 * tipc_link_xmit(): same as __tipc_link_xmit(), but the link to use
814 * not been selected yet, and the the owner node is not locked 818 * has not been selected yet, and the the owner node is not locked
815 * Called by TIPC internal users, e.g. the name distributor 819 * Called by TIPC internal users, e.g. the name distributor
816 */ 820 */
817int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) 821int tipc_link_xmit(struct sk_buff *buf, u32 dest, u32 selector)
818{ 822{
819 struct tipc_link *l_ptr; 823 struct tipc_link *l_ptr;
820 struct tipc_node *n_ptr; 824 struct tipc_node *n_ptr;
@@ -826,7 +830,7 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
826 tipc_node_lock(n_ptr); 830 tipc_node_lock(n_ptr);
827 l_ptr = n_ptr->active_links[selector & 1]; 831 l_ptr = n_ptr->active_links[selector & 1];
828 if (l_ptr) 832 if (l_ptr)
829 res = tipc_link_send_buf(l_ptr, buf); 833 res = __tipc_link_xmit(l_ptr, buf);
830 else 834 else
831 kfree_skb(buf); 835 kfree_skb(buf);
832 tipc_node_unlock(n_ptr); 836 tipc_node_unlock(n_ptr);
@@ -838,14 +842,14 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
838} 842}
839 843
840/* 844/*
841 * tipc_link_send_sync - synchronize broadcast link endpoints. 845 * tipc_link_sync_xmit - synchronize broadcast link endpoints.
842 * 846 *
843 * Give a newly added peer node the sequence number where it should 847 * Give a newly added peer node the sequence number where it should
844 * start receiving and acking broadcast packets. 848 * start receiving and acking broadcast packets.
845 * 849 *
846 * Called with node locked 850 * Called with node locked
847 */ 851 */
848static void tipc_link_send_sync(struct tipc_link *l) 852static void tipc_link_sync_xmit(struct tipc_link *l)
849{ 853{
850 struct sk_buff *buf; 854 struct sk_buff *buf;
851 struct tipc_msg *msg; 855 struct tipc_msg *msg;
@@ -862,14 +866,14 @@ static void tipc_link_send_sync(struct tipc_link *l)
862} 866}
863 867
864/* 868/*
865 * tipc_link_recv_sync - synchronize broadcast link endpoints. 869 * tipc_link_sync_rcv - synchronize broadcast link endpoints.
866 * Receive the sequence number where we should start receiving and 870 * Receive the sequence number where we should start receiving and
867 * acking broadcast packets from a newly added peer node, and open 871 * acking broadcast packets from a newly added peer node, and open
868 * up for reception of such packets. 872 * up for reception of such packets.
869 * 873 *
870 * Called with node locked 874 * Called with node locked
871 */ 875 */
872static void tipc_link_recv_sync(struct tipc_node *n, struct sk_buff *buf) 876static void tipc_link_sync_rcv(struct tipc_node *n, struct sk_buff *buf)
873{ 877{
874 struct tipc_msg *msg = buf_msg(buf); 878 struct tipc_msg *msg = buf_msg(buf);
875 879
@@ -879,7 +883,7 @@ static void tipc_link_recv_sync(struct tipc_node *n, struct sk_buff *buf)
879} 883}
880 884
881/* 885/*
882 * tipc_link_send_names - send name table entries to new neighbor 886 * tipc_link_names_xmit - send name table entries to new neighbor
883 * 887 *
884 * Send routine for bulk delivery of name table messages when contact 888 * Send routine for bulk delivery of name table messages when contact
885 * with a new neighbor occurs. No link congestion checking is performed 889 * with a new neighbor occurs. No link congestion checking is performed
@@ -887,7 +891,7 @@ static void tipc_link_recv_sync(struct tipc_node *n, struct sk_buff *buf)
887 * small enough not to require fragmentation. 891 * small enough not to require fragmentation.
888 * Called without any locks held. 892 * Called without any locks held.
889 */ 893 */
890void tipc_link_send_names(struct list_head *message_list, u32 dest) 894void tipc_link_names_xmit(struct list_head *message_list, u32 dest)
891{ 895{
892 struct tipc_node *n_ptr; 896 struct tipc_node *n_ptr;
893 struct tipc_link *l_ptr; 897 struct tipc_link *l_ptr;
@@ -922,13 +926,13 @@ void tipc_link_send_names(struct list_head *message_list, u32 dest)
922} 926}
923 927
924/* 928/*
925 * link_send_buf_fast: Entry for data messages where the 929 * tipc_link_xmit_fast: Entry for data messages where the
926 * destination link is known and the header is complete, 930 * destination link is known and the header is complete,
927 * inclusive total message length. Very time critical. 931 * inclusive total message length. Very time critical.
928 * Link is locked. Returns user data length. 932 * Link is locked. Returns user data length.
929 */ 933 */
930static int link_send_buf_fast(struct tipc_link *l_ptr, struct sk_buff *buf, 934static int tipc_link_xmit_fast(struct tipc_link *l_ptr, struct sk_buff *buf,
931 u32 *used_max_pkt) 935 u32 *used_max_pkt)
932{ 936{
933 struct tipc_msg *msg = buf_msg(buf); 937 struct tipc_msg *msg = buf_msg(buf);
934 int res = msg_data_sz(msg); 938 int res = msg_data_sz(msg);
@@ -944,18 +948,18 @@ static int link_send_buf_fast(struct tipc_link *l_ptr, struct sk_buff *buf,
944 else 948 else
945 *used_max_pkt = l_ptr->max_pkt; 949 *used_max_pkt = l_ptr->max_pkt;
946 } 950 }
947 return tipc_link_send_buf(l_ptr, buf); /* All other cases */ 951 return __tipc_link_xmit(l_ptr, buf); /* All other cases */
948} 952}
949 953
950/* 954/*
951 * tipc_link_send_sections_fast: Entry for messages where the 955 * tipc_link_iovec_xmit_fast: Entry for messages where the
952 * destination processor is known and the header is complete, 956 * destination processor is known and the header is complete,
953 * except for total message length. 957 * except for total message length.
954 * Returns user data length or errno. 958 * Returns user data length or errno.
955 */ 959 */
956int tipc_link_send_sections_fast(struct tipc_port *sender, 960int tipc_link_iovec_xmit_fast(struct tipc_port *sender,
957 struct iovec const *msg_sect, 961 struct iovec const *msg_sect,
958 unsigned int len, u32 destaddr) 962 unsigned int len, u32 destaddr)
959{ 963{
960 struct tipc_msg *hdr = &sender->phdr; 964 struct tipc_msg *hdr = &sender->phdr;
961 struct tipc_link *l_ptr; 965 struct tipc_link *l_ptr;
@@ -981,8 +985,8 @@ again:
981 l_ptr = node->active_links[selector]; 985 l_ptr = node->active_links[selector];
982 if (likely(l_ptr)) { 986 if (likely(l_ptr)) {
983 if (likely(buf)) { 987 if (likely(buf)) {
984 res = link_send_buf_fast(l_ptr, buf, 988 res = tipc_link_xmit_fast(l_ptr, buf,
985 &sender->max_pkt); 989 &sender->max_pkt);
986exit: 990exit:
987 tipc_node_unlock(node); 991 tipc_node_unlock(node);
988 read_unlock_bh(&tipc_net_lock); 992 read_unlock_bh(&tipc_net_lock);
@@ -1008,8 +1012,8 @@ exit:
1008 if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt) 1012 if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt)
1009 goto again; 1013 goto again;
1010 1014
1011 return link_send_sections_long(sender, msg_sect, len, 1015 return tipc_link_iovec_long_xmit(sender, msg_sect,
1012 destaddr); 1016 len, destaddr);
1013 } 1017 }
1014 tipc_node_unlock(node); 1018 tipc_node_unlock(node);
1015 } 1019 }
@@ -1019,13 +1023,13 @@ exit:
1019 if (buf) 1023 if (buf)
1020 return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); 1024 return tipc_reject_msg(buf, TIPC_ERR_NO_NODE);
1021 if (res >= 0) 1025 if (res >= 0)
1022 return tipc_port_reject_sections(sender, hdr, msg_sect, 1026 return tipc_port_iovec_reject(sender, hdr, msg_sect, len,
1023 len, TIPC_ERR_NO_NODE); 1027 TIPC_ERR_NO_NODE);
1024 return res; 1028 return res;
1025} 1029}
1026 1030
1027/* 1031/*
1028 * link_send_sections_long(): Entry for long messages where the 1032 * tipc_link_iovec_long_xmit(): Entry for long messages where the
1029 * destination node is known and the header is complete, 1033 * destination node is known and the header is complete,
1030 * inclusive total message length. 1034 * inclusive total message length.
1031 * Link and bearer congestion status have been checked to be ok, 1035 * Link and bearer congestion status have been checked to be ok,
@@ -1038,9 +1042,9 @@ exit:
1038 * 1042 *
1039 * Returns user data length or errno. 1043 * Returns user data length or errno.
1040 */ 1044 */
1041static int link_send_sections_long(struct tipc_port *sender, 1045static int tipc_link_iovec_long_xmit(struct tipc_port *sender,
1042 struct iovec const *msg_sect, 1046 struct iovec const *msg_sect,
1043 unsigned int len, u32 destaddr) 1047 unsigned int len, u32 destaddr)
1044{ 1048{
1045 struct tipc_link *l_ptr; 1049 struct tipc_link *l_ptr;
1046 struct tipc_node *node; 1050 struct tipc_node *node;
@@ -1159,8 +1163,8 @@ error:
1159 } else { 1163 } else {
1160reject: 1164reject:
1161 kfree_skb_list(buf_chain); 1165 kfree_skb_list(buf_chain);
1162 return tipc_port_reject_sections(sender, hdr, msg_sect, 1166 return tipc_port_iovec_reject(sender, hdr, msg_sect,
1163 len, TIPC_ERR_NO_NODE); 1167 len, TIPC_ERR_NO_NODE);
1164 } 1168 }
1165 1169
1166 /* Append chain of fragments to send queue & send them */ 1170 /* Append chain of fragments to send queue & send them */
@@ -1469,9 +1473,9 @@ void tipc_rcv(struct sk_buff *head, struct tipc_bearer *b_ptr)
1469 1473
1470 if (unlikely(msg_non_seq(msg))) { 1474 if (unlikely(msg_non_seq(msg))) {
1471 if (msg_user(msg) == LINK_CONFIG) 1475 if (msg_user(msg) == LINK_CONFIG)
1472 tipc_disc_recv_msg(buf, b_ptr); 1476 tipc_disc_rcv(buf, b_ptr);
1473 else 1477 else
1474 tipc_bclink_recv_pkt(buf); 1478 tipc_bclink_rcv(buf);
1475 continue; 1479 continue;
1476 } 1480 }
1477 1481
@@ -1532,14 +1536,13 @@ void tipc_rcv(struct sk_buff *head, struct tipc_bearer *b_ptr)
1532 1536
1533 if (unlikely(++l_ptr->unacked_window >= TIPC_MIN_LINK_WIN)) { 1537 if (unlikely(++l_ptr->unacked_window >= TIPC_MIN_LINK_WIN)) {
1534 l_ptr->stats.sent_acks++; 1538 l_ptr->stats.sent_acks++;
1535 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 1539 tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);
1536 0, 0, 0, 0, 0);
1537 } 1540 }
1538 1541
1539 /* Process the incoming packet */ 1542 /* Process the incoming packet */
1540 if (unlikely(!link_working_working(l_ptr))) { 1543 if (unlikely(!link_working_working(l_ptr))) {
1541 if (msg_user(msg) == LINK_PROTOCOL) { 1544 if (msg_user(msg) == LINK_PROTOCOL) {
1542 link_recv_proto_msg(l_ptr, buf); 1545 tipc_link_proto_rcv(l_ptr, buf);
1543 head = link_insert_deferred_queue(l_ptr, head); 1546 head = link_insert_deferred_queue(l_ptr, head);
1544 tipc_node_unlock(n_ptr); 1547 tipc_node_unlock(n_ptr);
1545 continue; 1548 continue;
@@ -1600,25 +1603,25 @@ void tipc_rcv(struct sk_buff *head, struct tipc_bearer *b_ptr)
1600 case TIPC_HIGH_IMPORTANCE: 1603 case TIPC_HIGH_IMPORTANCE:
1601 case TIPC_CRITICAL_IMPORTANCE: 1604 case TIPC_CRITICAL_IMPORTANCE:
1602 tipc_node_unlock(n_ptr); 1605 tipc_node_unlock(n_ptr);
1603 tipc_port_recv_msg(buf); 1606 tipc_port_rcv(buf);
1604 continue; 1607 continue;
1605 case MSG_BUNDLER: 1608 case MSG_BUNDLER:
1606 l_ptr->stats.recv_bundles++; 1609 l_ptr->stats.recv_bundles++;
1607 l_ptr->stats.recv_bundled += msg_msgcnt(msg); 1610 l_ptr->stats.recv_bundled += msg_msgcnt(msg);
1608 tipc_node_unlock(n_ptr); 1611 tipc_node_unlock(n_ptr);
1609 tipc_link_recv_bundle(buf); 1612 tipc_link_bundle_rcv(buf);
1610 continue; 1613 continue;
1611 case NAME_DISTRIBUTOR: 1614 case NAME_DISTRIBUTOR:
1612 n_ptr->bclink.recv_permitted = true; 1615 n_ptr->bclink.recv_permitted = true;
1613 tipc_node_unlock(n_ptr); 1616 tipc_node_unlock(n_ptr);
1614 tipc_named_recv(buf); 1617 tipc_named_rcv(buf);
1615 continue; 1618 continue;
1616 case CONN_MANAGER: 1619 case CONN_MANAGER:
1617 tipc_node_unlock(n_ptr); 1620 tipc_node_unlock(n_ptr);
1618 tipc_port_recv_proto_msg(buf); 1621 tipc_port_proto_rcv(buf);
1619 continue; 1622 continue;
1620 case BCAST_PROTOCOL: 1623 case BCAST_PROTOCOL:
1621 tipc_link_recv_sync(n_ptr, buf); 1624 tipc_link_sync_rcv(n_ptr, buf);
1622 break; 1625 break;
1623 default: 1626 default:
1624 kfree_skb(buf); 1627 kfree_skb(buf);
@@ -1693,7 +1696,7 @@ static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
1693 u32 seq_no = buf_seqno(buf); 1696 u32 seq_no = buf_seqno(buf);
1694 1697
1695 if (likely(msg_user(buf_msg(buf)) == LINK_PROTOCOL)) { 1698 if (likely(msg_user(buf_msg(buf)) == LINK_PROTOCOL)) {
1696 link_recv_proto_msg(l_ptr, buf); 1699 tipc_link_proto_rcv(l_ptr, buf);
1697 return; 1700 return;
1698 } 1701 }
1699 1702
@@ -1715,7 +1718,7 @@ static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
1715 l_ptr->deferred_inqueue_sz++; 1718 l_ptr->deferred_inqueue_sz++;
1716 l_ptr->stats.deferred_recv++; 1719 l_ptr->stats.deferred_recv++;
1717 if ((l_ptr->deferred_inqueue_sz % 16) == 1) 1720 if ((l_ptr->deferred_inqueue_sz % 16) == 1)
1718 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0); 1721 tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);
1719 } else 1722 } else
1720 l_ptr->stats.duplicates++; 1723 l_ptr->stats.duplicates++;
1721} 1724}
@@ -1723,9 +1726,8 @@ static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
1723/* 1726/*
1724 * Send protocol message to the other endpoint. 1727 * Send protocol message to the other endpoint.
1725 */ 1728 */
1726void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, 1729void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,
1727 int probe_msg, u32 gap, u32 tolerance, 1730 u32 gap, u32 tolerance, u32 priority, u32 ack_mtu)
1728 u32 priority, u32 ack_mtu)
1729{ 1731{
1730 struct sk_buff *buf = NULL; 1732 struct sk_buff *buf = NULL;
1731 struct tipc_msg *msg = l_ptr->pmsg; 1733 struct tipc_msg *msg = l_ptr->pmsg;
@@ -1824,7 +1826,7 @@ void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ,
1824 * Note that network plane id propagates through the network, and may 1826 * Note that network plane id propagates through the network, and may
1825 * change at any time. The node with lowest address rules 1827 * change at any time. The node with lowest address rules
1826 */ 1828 */
1827static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf) 1829static void tipc_link_proto_rcv(struct tipc_link *l_ptr, struct sk_buff *buf)
1828{ 1830{
1829 u32 rec_gap = 0; 1831 u32 rec_gap = 0;
1830 u32 max_pkt_info; 1832 u32 max_pkt_info;
@@ -1943,8 +1945,8 @@ static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf)
1943 msg_last_bcast(msg)); 1945 msg_last_bcast(msg));
1944 1946
1945 if (rec_gap || (msg_probe(msg))) { 1947 if (rec_gap || (msg_probe(msg))) {
1946 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 1948 tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, rec_gap, 0,
1947 0, rec_gap, 0, 0, max_pkt_ack); 1949 0, max_pkt_ack);
1948 } 1950 }
1949 if (msg_seq_gap(msg)) { 1951 if (msg_seq_gap(msg)) {
1950 l_ptr->stats.recv_nacks++; 1952 l_ptr->stats.recv_nacks++;
@@ -1983,7 +1985,7 @@ static void tipc_link_tunnel_xmit(struct tipc_link *l_ptr,
1983 } 1985 }
1984 skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE); 1986 skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE);
1985 skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length); 1987 skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length);
1986 tipc_link_send_buf(tunnel, buf); 1988 __tipc_link_xmit(tunnel, buf);
1987} 1989}
1988 1990
1989 1991
@@ -2016,7 +2018,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr)
2016 if (buf) { 2018 if (buf) {
2017 skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE); 2019 skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE);
2018 msg_set_size(&tunnel_hdr, INT_H_SIZE); 2020 msg_set_size(&tunnel_hdr, INT_H_SIZE);
2019 tipc_link_send_buf(tunnel, buf); 2021 __tipc_link_xmit(tunnel, buf);
2020 } else { 2022 } else {
2021 pr_warn("%sunable to send changeover msg\n", 2023 pr_warn("%sunable to send changeover msg\n",
2022 link_co_err); 2024 link_co_err);
@@ -2050,7 +2052,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr)
2050 } 2052 }
2051} 2053}
2052 2054
2053/* tipc_link_dup_send_queue(): A second link has become active. Tunnel a 2055/* tipc_link_dup_queue_xmit(): A second link has become active. Tunnel a
2054 * duplicate of the first link's send queue via the new link. This way, we 2056 * duplicate of the first link's send queue via the new link. This way, we
2055 * are guaranteed that currently queued packets from a socket are delivered 2057 * are guaranteed that currently queued packets from a socket are delivered
2056 * before future traffic from the same socket, even if this is using the 2058 * before future traffic from the same socket, even if this is using the
@@ -2059,7 +2061,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr)
2059 * and sequence order is preserved per sender/receiver socket pair. 2061 * and sequence order is preserved per sender/receiver socket pair.
2060 * Owner node is locked. 2062 * Owner node is locked.
2061 */ 2063 */
2062void tipc_link_dup_send_queue(struct tipc_link *l_ptr, 2064void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr,
2063 struct tipc_link *tunnel) 2065 struct tipc_link *tunnel)
2064{ 2066{
2065 struct sk_buff *iter; 2067 struct sk_buff *iter;
@@ -2089,7 +2091,7 @@ void tipc_link_dup_send_queue(struct tipc_link *l_ptr,
2089 skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE); 2091 skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE);
2090 skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data, 2092 skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data,
2091 length); 2093 length);
2092 tipc_link_send_buf(tunnel, outbuf); 2094 __tipc_link_xmit(tunnel, outbuf);
2093 if (!tipc_link_is_up(l_ptr)) 2095 if (!tipc_link_is_up(l_ptr))
2094 return; 2096 return;
2095 iter = iter->next; 2097 iter = iter->next;
@@ -2223,7 +2225,7 @@ exit:
2223/* 2225/*
2224 * Bundler functionality: 2226 * Bundler functionality:
2225 */ 2227 */
2226void tipc_link_recv_bundle(struct sk_buff *buf) 2228void tipc_link_bundle_rcv(struct sk_buff *buf)
2227{ 2229{
2228 u32 msgcount = msg_msgcnt(buf_msg(buf)); 2230 u32 msgcount = msg_msgcnt(buf_msg(buf));
2229 u32 pos = INT_H_SIZE; 2231 u32 pos = INT_H_SIZE;
@@ -2246,11 +2248,11 @@ void tipc_link_recv_bundle(struct sk_buff *buf)
2246 */ 2248 */
2247 2249
2248/* 2250/*
2249 * link_send_long_buf: Entry for buffers needing fragmentation. 2251 * tipc_link_frag_xmit: Entry for buffers needing fragmentation.
2250 * The buffer is complete, inclusive total message length. 2252 * The buffer is complete, inclusive total message length.
2251 * Returns user data length. 2253 * Returns user data length.
2252 */ 2254 */
2253static int link_send_long_buf(struct tipc_link *l_ptr, struct sk_buff *buf) 2255static int tipc_link_frag_xmit(struct tipc_link *l_ptr, struct sk_buff *buf)
2254{ 2256{
2255 struct sk_buff *buf_chain = NULL; 2257 struct sk_buff *buf_chain = NULL;
2256 struct sk_buff *buf_chain_tail = (struct sk_buff *)&buf_chain; 2258 struct sk_buff *buf_chain_tail = (struct sk_buff *)&buf_chain;
@@ -2477,13 +2479,13 @@ static int link_cmd_set_value(const char *name, u32 new_value, u16 cmd)
2477 switch (cmd) { 2479 switch (cmd) {
2478 case TIPC_CMD_SET_LINK_TOL: 2480 case TIPC_CMD_SET_LINK_TOL:
2479 link_set_supervision_props(l_ptr, new_value); 2481 link_set_supervision_props(l_ptr, new_value);
2480 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 2482 tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, 0,
2481 0, new_value, 0, 0); 2483 new_value, 0, 0);
2482 break; 2484 break;
2483 case TIPC_CMD_SET_LINK_PRI: 2485 case TIPC_CMD_SET_LINK_PRI:
2484 l_ptr->priority = new_value; 2486 l_ptr->priority = new_value;
2485 tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 2487 tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, 0,
2486 0, 0, new_value, 0); 2488 0, new_value, 0);
2487 break; 2489 break;
2488 case TIPC_CMD_SET_LINK_WINDOW: 2490 case TIPC_CMD_SET_LINK_WINDOW:
2489 tipc_link_set_queue_limits(l_ptr, new_value); 2491 tipc_link_set_queue_limits(l_ptr, new_value);
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 45b9cd071c41..8c0b49b5b2ee 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -216,8 +216,7 @@ struct tipc_link *tipc_link_create(struct tipc_node *n_ptr,
216 const struct tipc_media_addr *media_addr); 216 const struct tipc_media_addr *media_addr);
217void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down); 217void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down);
218void tipc_link_failover_send_queue(struct tipc_link *l_ptr); 218void tipc_link_failover_send_queue(struct tipc_link *l_ptr);
219void tipc_link_dup_send_queue(struct tipc_link *l_ptr, 219void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest);
220 struct tipc_link *dest);
221void tipc_link_reset_fragments(struct tipc_link *l_ptr); 220void tipc_link_reset_fragments(struct tipc_link *l_ptr);
222int tipc_link_is_up(struct tipc_link *l_ptr); 221int tipc_link_is_up(struct tipc_link *l_ptr);
223int tipc_link_is_active(struct tipc_link *l_ptr); 222int tipc_link_is_active(struct tipc_link *l_ptr);
@@ -231,23 +230,23 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area,
231 int req_tlv_space); 230 int req_tlv_space);
232void tipc_link_reset(struct tipc_link *l_ptr); 231void tipc_link_reset(struct tipc_link *l_ptr);
233void tipc_link_reset_list(unsigned int bearer_id); 232void tipc_link_reset_list(unsigned int bearer_id);
234int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector); 233int tipc_link_xmit(struct sk_buff *buf, u32 dest, u32 selector);
235void tipc_link_send_names(struct list_head *message_list, u32 dest); 234void tipc_link_names_xmit(struct list_head *message_list, u32 dest);
235int __tipc_link_xmit(struct tipc_link *l_ptr, struct sk_buff *buf);
236int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf); 236int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf);
237u32 tipc_link_get_max_pkt(u32 dest, u32 selector); 237u32 tipc_link_get_max_pkt(u32 dest, u32 selector);
238int tipc_link_send_sections_fast(struct tipc_port *sender, 238int tipc_link_iovec_xmit_fast(struct tipc_port *sender,
239 struct iovec const *msg_sect, 239 struct iovec const *msg_sect,
240 unsigned int len, u32 destnode); 240 unsigned int len, u32 destnode);
241void tipc_link_recv_bundle(struct sk_buff *buf); 241void tipc_link_bundle_rcv(struct sk_buff *buf);
242int tipc_link_frag_rcv(struct sk_buff **reasm_head, 242int tipc_link_frag_rcv(struct sk_buff **reasm_head,
243 struct sk_buff **reasm_tail, 243 struct sk_buff **reasm_tail,
244 struct sk_buff **fbuf); 244 struct sk_buff **fbuf);
245void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, int prob, 245void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob,
246 u32 gap, u32 tolerance, u32 priority, 246 u32 gap, u32 tolerance, u32 priority, u32 acked_mtu);
247 u32 acked_mtu);
248void tipc_link_push_queue(struct tipc_link *l_ptr); 247void tipc_link_push_queue(struct tipc_link *l_ptr);
249u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, 248u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail,
250 struct sk_buff *buf); 249 struct sk_buff *buf);
251void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all); 250void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all);
252void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window); 251void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window);
253void tipc_link_retransmit(struct tipc_link *l_ptr, 252void tipc_link_retransmit(struct tipc_link *l_ptr,
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index e0d08055754e..893c49a3d98a 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -138,7 +138,7 @@ static void named_cluster_distribute(struct sk_buff *buf)
138 if (!buf_copy) 138 if (!buf_copy)
139 break; 139 break;
140 msg_set_destnode(buf_msg(buf_copy), n_ptr->addr); 140 msg_set_destnode(buf_msg(buf_copy), n_ptr->addr);
141 tipc_link_send(buf_copy, n_ptr->addr, n_ptr->addr); 141 tipc_link_xmit(buf_copy, n_ptr->addr, n_ptr->addr);
142 } 142 }
143 } 143 }
144 144
@@ -262,7 +262,7 @@ void tipc_named_node_up(unsigned long nodearg)
262 named_distribute(&message_list, node, &publ_zone, max_item_buf); 262 named_distribute(&message_list, node, &publ_zone, max_item_buf);
263 read_unlock_bh(&tipc_nametbl_lock); 263 read_unlock_bh(&tipc_nametbl_lock);
264 264
265 tipc_link_send_names(&message_list, node); 265 tipc_link_names_xmit(&message_list, node);
266} 266}
267 267
268/** 268/**
@@ -293,9 +293,9 @@ static void named_purge_publ(struct publication *publ)
293} 293}
294 294
295/** 295/**
296 * tipc_named_recv - process name table update message sent by another node 296 * tipc_named_rcv - process name table update message sent by another node
297 */ 297 */
298void tipc_named_recv(struct sk_buff *buf) 298void tipc_named_rcv(struct sk_buff *buf)
299{ 299{
300 struct publication *publ; 300 struct publication *publ;
301 struct tipc_msg *msg = buf_msg(buf); 301 struct tipc_msg *msg = buf_msg(buf);
diff --git a/net/tipc/name_distr.h b/net/tipc/name_distr.h
index 1e41bdd4f255..9b312ccfd43e 100644
--- a/net/tipc/name_distr.h
+++ b/net/tipc/name_distr.h
@@ -42,7 +42,7 @@
42void tipc_named_publish(struct publication *publ); 42void tipc_named_publish(struct publication *publ);
43void tipc_named_withdraw(struct publication *publ); 43void tipc_named_withdraw(struct publication *publ);
44void tipc_named_node_up(unsigned long node); 44void tipc_named_node_up(unsigned long node);
45void tipc_named_recv(struct sk_buff *buf); 45void tipc_named_rcv(struct sk_buff *buf);
46void tipc_named_reinit(void); 46void tipc_named_reinit(void);
47 47
48#endif 48#endif
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 7d305ecc09c2..31b606e3916c 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -146,19 +146,19 @@ void tipc_net_route_msg(struct sk_buff *buf)
146 if (tipc_in_scope(dnode, tipc_own_addr)) { 146 if (tipc_in_scope(dnode, tipc_own_addr)) {
147 if (msg_isdata(msg)) { 147 if (msg_isdata(msg)) {
148 if (msg_mcast(msg)) 148 if (msg_mcast(msg))
149 tipc_port_recv_mcast(buf, NULL); 149 tipc_port_mcast_rcv(buf, NULL);
150 else if (msg_destport(msg)) 150 else if (msg_destport(msg))
151 tipc_port_recv_msg(buf); 151 tipc_port_rcv(buf);
152 else 152 else
153 net_route_named_msg(buf); 153 net_route_named_msg(buf);
154 return; 154 return;
155 } 155 }
156 switch (msg_user(msg)) { 156 switch (msg_user(msg)) {
157 case NAME_DISTRIBUTOR: 157 case NAME_DISTRIBUTOR:
158 tipc_named_recv(buf); 158 tipc_named_rcv(buf);
159 break; 159 break;
160 case CONN_MANAGER: 160 case CONN_MANAGER:
161 tipc_port_recv_proto_msg(buf); 161 tipc_port_proto_rcv(buf);
162 break; 162 break;
163 default: 163 default:
164 kfree_skb(buf); 164 kfree_skb(buf);
@@ -168,7 +168,7 @@ void tipc_net_route_msg(struct sk_buff *buf)
168 168
169 /* Handle message for another node */ 169 /* Handle message for another node */
170 skb_trim(buf, msg_size(msg)); 170 skb_trim(buf, msg_size(msg));
171 tipc_link_send(buf, dnode, msg_link_selector(msg)); 171 tipc_link_xmit(buf, dnode, msg_link_selector(msg));
172} 172}
173 173
174void tipc_net_start(u32 addr) 174void tipc_net_start(u32 addr)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 8596880877c0..0b0f6c7da965 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -162,7 +162,7 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
162 pr_info("New link <%s> becomes standby\n", l_ptr->name); 162 pr_info("New link <%s> becomes standby\n", l_ptr->name);
163 return; 163 return;
164 } 164 }
165 tipc_link_dup_send_queue(active[0], l_ptr); 165 tipc_link_dup_queue_xmit(active[0], l_ptr);
166 if (l_ptr->priority == active[0]->priority) { 166 if (l_ptr->priority == active[0]->priority) {
167 active[0] = l_ptr; 167 active[0] = l_ptr;
168 return; 168 return;
diff --git a/net/tipc/port.c b/net/tipc/port.c
index b742b2654525..c7c2b549a39e 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -87,10 +87,11 @@ int tipc_port_peer_msg(struct tipc_port *p_ptr, struct tipc_msg *msg)
87} 87}
88 88
89/** 89/**
90 * tipc_multicast - send a multicast message to local and remote destinations 90 * tipc_port_mcast_xmit - send a multicast message to local and remote
91 * destinations
91 */ 92 */
92int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, 93int tipc_port_mcast_xmit(u32 ref, struct tipc_name_seq const *seq,
93 struct iovec const *msg_sect, unsigned int len) 94 struct iovec const *msg_sect, unsigned int len)
94{ 95{
95 struct tipc_msg *hdr; 96 struct tipc_msg *hdr;
96 struct sk_buff *buf; 97 struct sk_buff *buf;
@@ -131,7 +132,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq,
131 return -ENOMEM; 132 return -ENOMEM;
132 } 133 }
133 } 134 }
134 res = tipc_bclink_send_msg(buf); 135 res = tipc_bclink_xmit(buf);
135 if ((res < 0) && (dports.count != 0)) 136 if ((res < 0) && (dports.count != 0))
136 kfree_skb(ibuf); 137 kfree_skb(ibuf);
137 } else { 138 } else {
@@ -140,7 +141,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq,
140 141
141 if (res >= 0) { 142 if (res >= 0) {
142 if (ibuf) 143 if (ibuf)
143 tipc_port_recv_mcast(ibuf, &dports); 144 tipc_port_mcast_rcv(ibuf, &dports);
144 } else { 145 } else {
145 tipc_port_list_free(&dports); 146 tipc_port_list_free(&dports);
146 } 147 }
@@ -148,11 +149,11 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq,
148} 149}
149 150
150/** 151/**
151 * tipc_port_recv_mcast - deliver multicast message to all destination ports 152 * tipc_port_mcast_rcv - deliver multicast message to all destination ports
152 * 153 *
153 * If there is no port list, perform a lookup to create one 154 * If there is no port list, perform a lookup to create one
154 */ 155 */
155void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp) 156void tipc_port_mcast_rcv(struct sk_buff *buf, struct tipc_port_list *dp)
156{ 157{
157 struct tipc_msg *msg; 158 struct tipc_msg *msg;
158 struct tipc_port_list dports = {0, NULL, }; 159 struct tipc_port_list dports = {0, NULL, };
@@ -176,7 +177,7 @@ void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp)
176 msg_set_destnode(msg, tipc_own_addr); 177 msg_set_destnode(msg, tipc_own_addr);
177 if (dp->count == 1) { 178 if (dp->count == 1) {
178 msg_set_destport(msg, dp->ports[0]); 179 msg_set_destport(msg, dp->ports[0]);
179 tipc_port_recv_msg(buf); 180 tipc_port_rcv(buf);
180 tipc_port_list_free(dp); 181 tipc_port_list_free(dp);
181 return; 182 return;
182 } 183 }
@@ -191,7 +192,7 @@ void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp)
191 if ((index == 0) && (cnt != 0)) 192 if ((index == 0) && (cnt != 0))
192 item = item->next; 193 item = item->next;
193 msg_set_destport(buf_msg(b), item->ports[index]); 194 msg_set_destport(buf_msg(b), item->ports[index]);
194 tipc_port_recv_msg(b); 195 tipc_port_rcv(b);
195 } 196 }
196 } 197 }
197exit: 198exit:
@@ -422,17 +423,17 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err)
422 /* send returned message & dispose of rejected message */ 423 /* send returned message & dispose of rejected message */
423 src_node = msg_prevnode(msg); 424 src_node = msg_prevnode(msg);
424 if (in_own_node(src_node)) 425 if (in_own_node(src_node))
425 tipc_port_recv_msg(rbuf); 426 tipc_port_rcv(rbuf);
426 else 427 else
427 tipc_link_send(rbuf, src_node, msg_link_selector(rmsg)); 428 tipc_link_xmit(rbuf, src_node, msg_link_selector(rmsg));
428exit: 429exit:
429 kfree_skb(buf); 430 kfree_skb(buf);
430 return data_sz; 431 return data_sz;
431} 432}
432 433
433int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, 434int tipc_port_iovec_reject(struct tipc_port *p_ptr, struct tipc_msg *hdr,
434 struct iovec const *msg_sect, unsigned int len, 435 struct iovec const *msg_sect, unsigned int len,
435 int err) 436 int err)
436{ 437{
437 struct sk_buff *buf; 438 struct sk_buff *buf;
438 int res; 439 int res;
@@ -519,7 +520,7 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *p_ptr, u32 er
519 return buf; 520 return buf;
520} 521}
521 522
522void tipc_port_recv_proto_msg(struct sk_buff *buf) 523void tipc_port_proto_rcv(struct sk_buff *buf)
523{ 524{
524 struct tipc_msg *msg = buf_msg(buf); 525 struct tipc_msg *msg = buf_msg(buf);
525 struct tipc_port *p_ptr; 526 struct tipc_port *p_ptr;
@@ -760,7 +761,7 @@ int tipc_withdraw(struct tipc_port *p_ptr, unsigned int scope,
760 return res; 761 return res;
761} 762}
762 763
763int tipc_connect(u32 ref, struct tipc_portid const *peer) 764int tipc_port_connect(u32 ref, struct tipc_portid const *peer)
764{ 765{
765 struct tipc_port *p_ptr; 766 struct tipc_port *p_ptr;
766 int res; 767 int res;
@@ -768,17 +769,17 @@ int tipc_connect(u32 ref, struct tipc_portid const *peer)
768 p_ptr = tipc_port_lock(ref); 769 p_ptr = tipc_port_lock(ref);
769 if (!p_ptr) 770 if (!p_ptr)
770 return -EINVAL; 771 return -EINVAL;
771 res = __tipc_connect(ref, p_ptr, peer); 772 res = __tipc_port_connect(ref, p_ptr, peer);
772 tipc_port_unlock(p_ptr); 773 tipc_port_unlock(p_ptr);
773 return res; 774 return res;
774} 775}
775 776
776/* 777/*
777 * __tipc_connect - connect to a remote peer 778 * __tipc_port_connect - connect to a remote peer
778 * 779 *
779 * Port must be locked. 780 * Port must be locked.
780 */ 781 */
781int __tipc_connect(u32 ref, struct tipc_port *p_ptr, 782int __tipc_port_connect(u32 ref, struct tipc_port *p_ptr,
782 struct tipc_portid const *peer) 783 struct tipc_portid const *peer)
783{ 784{
784 struct tipc_msg *msg; 785 struct tipc_msg *msg;
@@ -815,7 +816,7 @@ exit:
815 * 816 *
816 * Port must be locked. 817 * Port must be locked.
817 */ 818 */
818int __tipc_disconnect(struct tipc_port *tp_ptr) 819int __tipc_port_disconnect(struct tipc_port *tp_ptr)
819{ 820{
820 if (tp_ptr->connected) { 821 if (tp_ptr->connected) {
821 tp_ptr->connected = 0; 822 tp_ptr->connected = 0;
@@ -828,10 +829,10 @@ int __tipc_disconnect(struct tipc_port *tp_ptr)
828} 829}
829 830
830/* 831/*
831 * tipc_disconnect(): Disconnect port form peer. 832 * tipc_port_disconnect(): Disconnect port form peer.
832 * This is a node local operation. 833 * This is a node local operation.
833 */ 834 */
834int tipc_disconnect(u32 ref) 835int tipc_port_disconnect(u32 ref)
835{ 836{
836 struct tipc_port *p_ptr; 837 struct tipc_port *p_ptr;
837 int res; 838 int res;
@@ -839,15 +840,15 @@ int tipc_disconnect(u32 ref)
839 p_ptr = tipc_port_lock(ref); 840 p_ptr = tipc_port_lock(ref);
840 if (!p_ptr) 841 if (!p_ptr)
841 return -EINVAL; 842 return -EINVAL;
842 res = __tipc_disconnect(p_ptr); 843 res = __tipc_port_disconnect(p_ptr);
843 tipc_port_unlock(p_ptr); 844 tipc_port_unlock(p_ptr);
844 return res; 845 return res;
845} 846}
846 847
847/* 848/*
848 * tipc_shutdown(): Send a SHUTDOWN msg to peer and disconnect 849 * tipc_port_shutdown(): Send a SHUTDOWN msg to peer and disconnect
849 */ 850 */
850int tipc_shutdown(u32 ref) 851int tipc_port_shutdown(u32 ref)
851{ 852{
852 struct tipc_port *p_ptr; 853 struct tipc_port *p_ptr;
853 struct sk_buff *buf = NULL; 854 struct sk_buff *buf = NULL;
@@ -859,13 +860,13 @@ int tipc_shutdown(u32 ref)
859 buf = port_build_peer_abort_msg(p_ptr, TIPC_CONN_SHUTDOWN); 860 buf = port_build_peer_abort_msg(p_ptr, TIPC_CONN_SHUTDOWN);
860 tipc_port_unlock(p_ptr); 861 tipc_port_unlock(p_ptr);
861 tipc_net_route_msg(buf); 862 tipc_net_route_msg(buf);
862 return tipc_disconnect(ref); 863 return tipc_port_disconnect(ref);
863} 864}
864 865
865/** 866/**
866 * tipc_port_recv_msg - receive message from lower layer and deliver to port user 867 * tipc_port_rcv - receive message from lower layer and deliver to port user
867 */ 868 */
868int tipc_port_recv_msg(struct sk_buff *buf) 869int tipc_port_rcv(struct sk_buff *buf)
869{ 870{
870 struct tipc_port *p_ptr; 871 struct tipc_port *p_ptr;
871 struct tipc_msg *msg = buf_msg(buf); 872 struct tipc_msg *msg = buf_msg(buf);
@@ -894,19 +895,19 @@ int tipc_port_recv_msg(struct sk_buff *buf)
894} 895}
895 896
896/* 897/*
897 * tipc_port_recv_sections(): Concatenate and deliver sectioned 898 * tipc_port_iovec_rcv: Concatenate and deliver sectioned
898 * message for this node. 899 * message for this node.
899 */ 900 */
900static int tipc_port_recv_sections(struct tipc_port *sender, 901static int tipc_port_iovec_rcv(struct tipc_port *sender,
901 struct iovec const *msg_sect, 902 struct iovec const *msg_sect,
902 unsigned int len) 903 unsigned int len)
903{ 904{
904 struct sk_buff *buf; 905 struct sk_buff *buf;
905 int res; 906 int res;
906 907
907 res = tipc_msg_build(&sender->phdr, msg_sect, len, MAX_MSG_SIZE, &buf); 908 res = tipc_msg_build(&sender->phdr, msg_sect, len, MAX_MSG_SIZE, &buf);
908 if (likely(buf)) 909 if (likely(buf))
909 tipc_port_recv_msg(buf); 910 tipc_port_rcv(buf);
910 return res; 911 return res;
911} 912}
912 913
@@ -927,10 +928,10 @@ int tipc_send(u32 ref, struct iovec const *msg_sect, unsigned int len)
927 if (!tipc_port_congested(p_ptr)) { 928 if (!tipc_port_congested(p_ptr)) {
928 destnode = port_peernode(p_ptr); 929 destnode = port_peernode(p_ptr);
929 if (likely(!in_own_node(destnode))) 930 if (likely(!in_own_node(destnode)))
930 res = tipc_link_send_sections_fast(p_ptr, msg_sect, 931 res = tipc_link_iovec_xmit_fast(p_ptr, msg_sect, len,
931 len, destnode); 932 destnode);
932 else 933 else
933 res = tipc_port_recv_sections(p_ptr, msg_sect, len); 934 res = tipc_port_iovec_rcv(p_ptr, msg_sect, len);
934 935
935 if (likely(res != -ELINKCONG)) { 936 if (likely(res != -ELINKCONG)) {
936 p_ptr->congested = 0; 937 p_ptr->congested = 0;
@@ -974,13 +975,13 @@ int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain,
974 975
975 if (likely(destport || destnode)) { 976 if (likely(destport || destnode)) {
976 if (likely(in_own_node(destnode))) 977 if (likely(in_own_node(destnode)))
977 res = tipc_port_recv_sections(p_ptr, msg_sect, len); 978 res = tipc_port_iovec_rcv(p_ptr, msg_sect, len);
978 else if (tipc_own_addr) 979 else if (tipc_own_addr)
979 res = tipc_link_send_sections_fast(p_ptr, msg_sect, 980 res = tipc_link_iovec_xmit_fast(p_ptr, msg_sect, len,
980 len, destnode); 981 destnode);
981 else 982 else
982 res = tipc_port_reject_sections(p_ptr, msg, msg_sect, 983 res = tipc_port_iovec_reject(p_ptr, msg, msg_sect,
983 len, TIPC_ERR_NO_NODE); 984 len, TIPC_ERR_NO_NODE);
984 if (likely(res != -ELINKCONG)) { 985 if (likely(res != -ELINKCONG)) {
985 if (res > 0) 986 if (res > 0)
986 p_ptr->sent++; 987 p_ptr->sent++;
@@ -991,8 +992,8 @@ int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain,
991 } 992 }
992 return -ELINKCONG; 993 return -ELINKCONG;
993 } 994 }
994 return tipc_port_reject_sections(p_ptr, msg, msg_sect, len, 995 return tipc_port_iovec_reject(p_ptr, msg, msg_sect, len,
995 TIPC_ERR_NO_NAME); 996 TIPC_ERR_NO_NAME);
996} 997}
997 998
998/** 999/**
@@ -1017,12 +1018,12 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest,
1017 msg_set_hdr_sz(msg, BASIC_H_SIZE); 1018 msg_set_hdr_sz(msg, BASIC_H_SIZE);
1018 1019
1019 if (in_own_node(dest->node)) 1020 if (in_own_node(dest->node))
1020 res = tipc_port_recv_sections(p_ptr, msg_sect, len); 1021 res = tipc_port_iovec_rcv(p_ptr, msg_sect, len);
1021 else if (tipc_own_addr) 1022 else if (tipc_own_addr)
1022 res = tipc_link_send_sections_fast(p_ptr, msg_sect, len, 1023 res = tipc_link_iovec_xmit_fast(p_ptr, msg_sect, len,
1023 dest->node); 1024 dest->node);
1024 else 1025 else
1025 res = tipc_port_reject_sections(p_ptr, msg, msg_sect, len, 1026 res = tipc_port_iovec_reject(p_ptr, msg, msg_sect, len,
1026 TIPC_ERR_NO_NODE); 1027 TIPC_ERR_NO_NODE);
1027 if (likely(res != -ELINKCONG)) { 1028 if (likely(res != -ELINKCONG)) {
1028 if (res > 0) 1029 if (res > 0)
diff --git a/net/tipc/port.h b/net/tipc/port.h
index 34f12bd4074e..3ec3e94e4334 100644
--- a/net/tipc/port.h
+++ b/net/tipc/port.h
@@ -132,25 +132,25 @@ int tipc_publish(struct tipc_port *p_ptr, unsigned int scope,
132int tipc_withdraw(struct tipc_port *p_ptr, unsigned int scope, 132int tipc_withdraw(struct tipc_port *p_ptr, unsigned int scope,
133 struct tipc_name_seq const *name_seq); 133 struct tipc_name_seq const *name_seq);
134 134
135int tipc_connect(u32 portref, struct tipc_portid const *port); 135int tipc_port_connect(u32 portref, struct tipc_portid const *port);
136 136
137int tipc_disconnect(u32 portref); 137int tipc_port_disconnect(u32 portref);
138 138
139int tipc_shutdown(u32 ref); 139int tipc_port_shutdown(u32 ref);
140 140
141 141
142/* 142/*
143 * The following routines require that the port be locked on entry 143 * The following routines require that the port be locked on entry
144 */ 144 */
145int __tipc_disconnect(struct tipc_port *tp_ptr); 145int __tipc_port_disconnect(struct tipc_port *tp_ptr);
146int __tipc_connect(u32 ref, struct tipc_port *p_ptr, 146int __tipc_port_connect(u32 ref, struct tipc_port *p_ptr,
147 struct tipc_portid const *peer); 147 struct tipc_portid const *peer);
148int tipc_port_peer_msg(struct tipc_port *p_ptr, struct tipc_msg *msg); 148int tipc_port_peer_msg(struct tipc_port *p_ptr, struct tipc_msg *msg);
149 149
150/* 150/*
151 * TIPC messaging routines 151 * TIPC messaging routines
152 */ 152 */
153int tipc_port_recv_msg(struct sk_buff *buf); 153int tipc_port_rcv(struct sk_buff *buf);
154int tipc_send(u32 portref, struct iovec const *msg_sect, unsigned int len); 154int tipc_send(u32 portref, struct iovec const *msg_sect, unsigned int len);
155 155
156int tipc_send2name(u32 portref, struct tipc_name const *name, u32 domain, 156int tipc_send2name(u32 portref, struct tipc_name const *name, u32 domain,
@@ -159,15 +159,15 @@ int tipc_send2name(u32 portref, struct tipc_name const *name, u32 domain,
159int tipc_send2port(u32 portref, struct tipc_portid const *dest, 159int tipc_send2port(u32 portref, struct tipc_portid const *dest,
160 struct iovec const *msg_sect, unsigned int len); 160 struct iovec const *msg_sect, unsigned int len);
161 161
162int tipc_multicast(u32 portref, struct tipc_name_seq const *seq, 162int tipc_port_mcast_xmit(u32 portref, struct tipc_name_seq const *seq,
163 struct iovec const *msg, unsigned int len); 163 struct iovec const *msg, unsigned int len);
164 164
165int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr, 165int tipc_port_iovec_reject(struct tipc_port *p_ptr, struct tipc_msg *hdr,
166 struct iovec const *msg_sect, unsigned int len, 166 struct iovec const *msg_sect, unsigned int len,
167 int err); 167 int err);
168struct sk_buff *tipc_port_get_ports(void); 168struct sk_buff *tipc_port_get_ports(void);
169void tipc_port_recv_proto_msg(struct sk_buff *buf); 169void tipc_port_proto_rcv(struct sk_buff *buf);
170void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp); 170void tipc_port_mcast_rcv(struct sk_buff *buf, struct tipc_port_list *dp);
171void tipc_port_reinit(void); 171void tipc_port_reinit(void);
172 172
173/** 173/**
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index aab4948f0aff..fb885977bd2a 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -60,8 +60,8 @@ static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf);
60static void wakeupdispatch(struct tipc_port *tport); 60static void wakeupdispatch(struct tipc_port *tport);
61static void tipc_data_ready(struct sock *sk, int len); 61static void tipc_data_ready(struct sock *sk, int len);
62static void tipc_write_space(struct sock *sk); 62static void tipc_write_space(struct sock *sk);
63static int release(struct socket *sock); 63static int tipc_release(struct socket *sock);
64static int accept(struct socket *sock, struct socket *new_sock, int flags); 64static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags);
65 65
66static const struct proto_ops packet_ops; 66static const struct proto_ops packet_ops;
67static const struct proto_ops stream_ops; 67static const struct proto_ops stream_ops;
@@ -256,7 +256,7 @@ int tipc_sock_create_local(int type, struct socket **res)
256 */ 256 */
257void tipc_sock_release_local(struct socket *sock) 257void tipc_sock_release_local(struct socket *sock)
258{ 258{
259 release(sock); 259 tipc_release(sock);
260 sock->ops = NULL; 260 sock->ops = NULL;
261 sock_release(sock); 261 sock_release(sock);
262} 262}
@@ -282,7 +282,7 @@ int tipc_sock_accept_local(struct socket *sock, struct socket **newsock,
282 if (ret < 0) 282 if (ret < 0)
283 return ret; 283 return ret;
284 284
285 ret = accept(sock, *newsock, flags); 285 ret = tipc_accept(sock, *newsock, flags);
286 if (ret < 0) { 286 if (ret < 0) {
287 sock_release(*newsock); 287 sock_release(*newsock);
288 return ret; 288 return ret;
@@ -292,7 +292,7 @@ int tipc_sock_accept_local(struct socket *sock, struct socket **newsock,
292} 292}
293 293
294/** 294/**
295 * release - destroy a TIPC socket 295 * tipc_release - destroy a TIPC socket
296 * @sock: socket to destroy 296 * @sock: socket to destroy
297 * 297 *
298 * This routine cleans up any messages that are still queued on the socket. 298 * This routine cleans up any messages that are still queued on the socket.
@@ -307,7 +307,7 @@ int tipc_sock_accept_local(struct socket *sock, struct socket **newsock,
307 * 307 *
308 * Returns 0 on success, errno otherwise 308 * Returns 0 on success, errno otherwise
309 */ 309 */
310static int release(struct socket *sock) 310static int tipc_release(struct socket *sock)
311{ 311{
312 struct sock *sk = sock->sk; 312 struct sock *sk = sock->sk;
313 struct tipc_port *tport; 313 struct tipc_port *tport;
@@ -338,7 +338,7 @@ static int release(struct socket *sock)
338 if ((sock->state == SS_CONNECTING) || 338 if ((sock->state == SS_CONNECTING) ||
339 (sock->state == SS_CONNECTED)) { 339 (sock->state == SS_CONNECTED)) {
340 sock->state = SS_DISCONNECTING; 340 sock->state = SS_DISCONNECTING;
341 tipc_disconnect(tport->ref); 341 tipc_port_disconnect(tport->ref);
342 } 342 }
343 tipc_reject_msg(buf, TIPC_ERR_NO_PORT); 343 tipc_reject_msg(buf, TIPC_ERR_NO_PORT);
344 } 344 }
@@ -364,7 +364,7 @@ static int release(struct socket *sock)
364} 364}
365 365
366/** 366/**
367 * bind - associate or disassocate TIPC name(s) with a socket 367 * tipc_bind - associate or disassocate TIPC name(s) with a socket
368 * @sock: socket structure 368 * @sock: socket structure
369 * @uaddr: socket address describing name(s) and desired operation 369 * @uaddr: socket address describing name(s) and desired operation
370 * @uaddr_len: size of socket address data structure 370 * @uaddr_len: size of socket address data structure
@@ -378,7 +378,8 @@ static int release(struct socket *sock)
378 * NOTE: This routine doesn't need to take the socket lock since it doesn't 378 * NOTE: This routine doesn't need to take the socket lock since it doesn't
379 * access any non-constant socket information. 379 * access any non-constant socket information.
380 */ 380 */
381static int bind(struct socket *sock, struct sockaddr *uaddr, int uaddr_len) 381static int tipc_bind(struct socket *sock, struct sockaddr *uaddr,
382 int uaddr_len)
382{ 383{
383 struct sock *sk = sock->sk; 384 struct sock *sk = sock->sk;
384 struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr; 385 struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr;
@@ -423,7 +424,7 @@ exit:
423} 424}
424 425
425/** 426/**
426 * get_name - get port ID of socket or peer socket 427 * tipc_getname - get port ID of socket or peer socket
427 * @sock: socket structure 428 * @sock: socket structure
428 * @uaddr: area for returned socket address 429 * @uaddr: area for returned socket address
429 * @uaddr_len: area for returned length of socket address 430 * @uaddr_len: area for returned length of socket address
@@ -435,8 +436,8 @@ exit:
435 * accesses socket information that is unchanging (or which changes in 436 * accesses socket information that is unchanging (or which changes in
436 * a completely predictable manner). 437 * a completely predictable manner).
437 */ 438 */
438static int get_name(struct socket *sock, struct sockaddr *uaddr, 439static int tipc_getname(struct socket *sock, struct sockaddr *uaddr,
439 int *uaddr_len, int peer) 440 int *uaddr_len, int peer)
440{ 441{
441 struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr; 442 struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr;
442 struct tipc_sock *tsock = tipc_sk(sock->sk); 443 struct tipc_sock *tsock = tipc_sk(sock->sk);
@@ -463,7 +464,7 @@ static int get_name(struct socket *sock, struct sockaddr *uaddr,
463} 464}
464 465
465/** 466/**
466 * poll - read and possibly block on pollmask 467 * tipc_poll - read and possibly block on pollmask
467 * @file: file structure associated with the socket 468 * @file: file structure associated with the socket
468 * @sock: socket for which to calculate the poll bits 469 * @sock: socket for which to calculate the poll bits
469 * @wait: ??? 470 * @wait: ???
@@ -502,8 +503,8 @@ static int get_name(struct socket *sock, struct sockaddr *uaddr,
502 * imply that the operation will succeed, merely that it should be performed 503 * imply that the operation will succeed, merely that it should be performed
503 * and will not block. 504 * and will not block.
504 */ 505 */
505static unsigned int poll(struct file *file, struct socket *sock, 506static unsigned int tipc_poll(struct file *file, struct socket *sock,
506 poll_table *wait) 507 poll_table *wait)
507{ 508{
508 struct sock *sk = sock->sk; 509 struct sock *sk = sock->sk;
509 u32 mask = 0; 510 u32 mask = 0;
@@ -590,7 +591,7 @@ static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
590} 591}
591 592
592/** 593/**
593 * send_msg - send message in connectionless manner 594 * tipc_sendmsg - send message in connectionless manner
594 * @iocb: if NULL, indicates that socket lock is already held 595 * @iocb: if NULL, indicates that socket lock is already held
595 * @sock: socket structure 596 * @sock: socket structure
596 * @m: message to send 597 * @m: message to send
@@ -603,8 +604,8 @@ static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
603 * 604 *
604 * Returns the number of bytes sent on success, or errno otherwise 605 * Returns the number of bytes sent on success, or errno otherwise
605 */ 606 */
606static int send_msg(struct kiocb *iocb, struct socket *sock, 607static int tipc_sendmsg(struct kiocb *iocb, struct socket *sock,
607 struct msghdr *m, size_t total_len) 608 struct msghdr *m, size_t total_len)
608{ 609{
609 struct sock *sk = sock->sk; 610 struct sock *sk = sock->sk;
610 struct tipc_port *tport = tipc_sk_port(sk); 611 struct tipc_port *tport = tipc_sk_port(sk);
@@ -671,10 +672,10 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
671 res = dest_name_check(dest, m); 672 res = dest_name_check(dest, m);
672 if (res) 673 if (res)
673 break; 674 break;
674 res = tipc_multicast(tport->ref, 675 res = tipc_port_mcast_xmit(tport->ref,
675 &dest->addr.nameseq, 676 &dest->addr.nameseq,
676 m->msg_iov, 677 m->msg_iov,
677 total_len); 678 total_len);
678 } 679 }
679 if (likely(res != -ELINKCONG)) { 680 if (likely(res != -ELINKCONG)) {
680 if (needs_conn && (res >= 0)) 681 if (needs_conn && (res >= 0))
@@ -721,7 +722,7 @@ static int tipc_wait_for_sndpkt(struct socket *sock, long *timeo_p)
721} 722}
722 723
723/** 724/**
724 * send_packet - send a connection-oriented message 725 * tipc_send_packet - send a connection-oriented message
725 * @iocb: if NULL, indicates that socket lock is already held 726 * @iocb: if NULL, indicates that socket lock is already held
726 * @sock: socket structure 727 * @sock: socket structure
727 * @m: message to send 728 * @m: message to send
@@ -731,8 +732,8 @@ static int tipc_wait_for_sndpkt(struct socket *sock, long *timeo_p)
731 * 732 *
732 * Returns the number of bytes sent on success, or errno otherwise 733 * Returns the number of bytes sent on success, or errno otherwise
733 */ 734 */
734static int send_packet(struct kiocb *iocb, struct socket *sock, 735static int tipc_send_packet(struct kiocb *iocb, struct socket *sock,
735 struct msghdr *m, size_t total_len) 736 struct msghdr *m, size_t total_len)
736{ 737{
737 struct sock *sk = sock->sk; 738 struct sock *sk = sock->sk;
738 struct tipc_port *tport = tipc_sk_port(sk); 739 struct tipc_port *tport = tipc_sk_port(sk);
@@ -742,7 +743,7 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
742 743
743 /* Handle implied connection establishment */ 744 /* Handle implied connection establishment */
744 if (unlikely(dest)) 745 if (unlikely(dest))
745 return send_msg(iocb, sock, m, total_len); 746 return tipc_sendmsg(iocb, sock, m, total_len);
746 747
747 if (total_len > TIPC_MAX_USER_MSG_SIZE) 748 if (total_len > TIPC_MAX_USER_MSG_SIZE)
748 return -EMSGSIZE; 749 return -EMSGSIZE;
@@ -774,7 +775,7 @@ exit:
774} 775}
775 776
776/** 777/**
777 * send_stream - send stream-oriented data 778 * tipc_send_stream - send stream-oriented data
778 * @iocb: (unused) 779 * @iocb: (unused)
779 * @sock: socket structure 780 * @sock: socket structure
780 * @m: data to send 781 * @m: data to send
@@ -785,8 +786,8 @@ exit:
785 * Returns the number of bytes sent on success (or partial success), 786 * Returns the number of bytes sent on success (or partial success),
786 * or errno if no data sent 787 * or errno if no data sent
787 */ 788 */
788static int send_stream(struct kiocb *iocb, struct socket *sock, 789static int tipc_send_stream(struct kiocb *iocb, struct socket *sock,
789 struct msghdr *m, size_t total_len) 790 struct msghdr *m, size_t total_len)
790{ 791{
791 struct sock *sk = sock->sk; 792 struct sock *sk = sock->sk;
792 struct tipc_port *tport = tipc_sk_port(sk); 793 struct tipc_port *tport = tipc_sk_port(sk);
@@ -806,7 +807,7 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,
806 /* Handle special cases where there is no connection */ 807 /* Handle special cases where there is no connection */
807 if (unlikely(sock->state != SS_CONNECTED)) { 808 if (unlikely(sock->state != SS_CONNECTED)) {
808 if (sock->state == SS_UNCONNECTED) 809 if (sock->state == SS_UNCONNECTED)
809 res = send_packet(NULL, sock, m, total_len); 810 res = tipc_send_packet(NULL, sock, m, total_len);
810 else 811 else
811 res = sock->state == SS_DISCONNECTING ? -EPIPE : -ENOTCONN; 812 res = sock->state == SS_DISCONNECTING ? -EPIPE : -ENOTCONN;
812 goto exit; 813 goto exit;
@@ -851,7 +852,8 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,
851 bytes_to_send = curr_left; 852 bytes_to_send = curr_left;
852 my_iov.iov_base = curr_start; 853 my_iov.iov_base = curr_start;
853 my_iov.iov_len = bytes_to_send; 854 my_iov.iov_len = bytes_to_send;
854 res = send_packet(NULL, sock, &my_msg, bytes_to_send); 855 res = tipc_send_packet(NULL, sock, &my_msg,
856 bytes_to_send);
855 if (res < 0) { 857 if (res < 0) {
856 if (bytes_sent) 858 if (bytes_sent)
857 res = bytes_sent; 859 res = bytes_sent;
@@ -888,7 +890,7 @@ static int auto_connect(struct socket *sock, struct tipc_msg *msg)
888 if (!p_ptr) 890 if (!p_ptr)
889 return -EINVAL; 891 return -EINVAL;
890 892
891 __tipc_connect(tsock->p->ref, p_ptr, &tsock->peer_name); 893 __tipc_port_connect(tsock->p->ref, p_ptr, &tsock->peer_name);
892 894
893 if (msg_importance(msg) > TIPC_CRITICAL_IMPORTANCE) 895 if (msg_importance(msg) > TIPC_CRITICAL_IMPORTANCE)
894 return -EINVAL; 896 return -EINVAL;
@@ -1023,7 +1025,7 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long timeo)
1023} 1025}
1024 1026
1025/** 1027/**
1026 * recv_msg - receive packet-oriented message 1028 * tipc_recvmsg - receive packet-oriented message
1027 * @iocb: (unused) 1029 * @iocb: (unused)
1028 * @m: descriptor for message info 1030 * @m: descriptor for message info
1029 * @buf_len: total size of user buffer area 1031 * @buf_len: total size of user buffer area
@@ -1034,8 +1036,8 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long timeo)
1034 * 1036 *
1035 * Returns size of returned message data, errno otherwise 1037 * Returns size of returned message data, errno otherwise
1036 */ 1038 */
1037static int recv_msg(struct kiocb *iocb, struct socket *sock, 1039static int tipc_recvmsg(struct kiocb *iocb, struct socket *sock,
1038 struct msghdr *m, size_t buf_len, int flags) 1040 struct msghdr *m, size_t buf_len, int flags)
1039{ 1041{
1040 struct sock *sk = sock->sk; 1042 struct sock *sk = sock->sk;
1041 struct tipc_port *tport = tipc_sk_port(sk); 1043 struct tipc_port *tport = tipc_sk_port(sk);
@@ -1117,7 +1119,7 @@ exit:
1117} 1119}
1118 1120
1119/** 1121/**
1120 * recv_stream - receive stream-oriented data 1122 * tipc_recv_stream - receive stream-oriented data
1121 * @iocb: (unused) 1123 * @iocb: (unused)
1122 * @m: descriptor for message info 1124 * @m: descriptor for message info
1123 * @buf_len: total size of user buffer area 1125 * @buf_len: total size of user buffer area
@@ -1128,8 +1130,8 @@ exit:
1128 * 1130 *
1129 * Returns size of returned message data, errno otherwise 1131 * Returns size of returned message data, errno otherwise
1130 */ 1132 */
1131static int recv_stream(struct kiocb *iocb, struct socket *sock, 1133static int tipc_recv_stream(struct kiocb *iocb, struct socket *sock,
1132 struct msghdr *m, size_t buf_len, int flags) 1134 struct msghdr *m, size_t buf_len, int flags)
1133{ 1135{
1134 struct sock *sk = sock->sk; 1136 struct sock *sk = sock->sk;
1135 struct tipc_port *tport = tipc_sk_port(sk); 1137 struct tipc_port *tport = tipc_sk_port(sk);
@@ -1291,7 +1293,7 @@ static u32 filter_connect(struct tipc_sock *tsock, struct sk_buff **buf)
1291 if (msg_connected(msg) && tipc_port_peer_msg(tsock->p, msg)) { 1293 if (msg_connected(msg) && tipc_port_peer_msg(tsock->p, msg)) {
1292 if (unlikely(msg_errcode(msg))) { 1294 if (unlikely(msg_errcode(msg))) {
1293 sock->state = SS_DISCONNECTING; 1295 sock->state = SS_DISCONNECTING;
1294 __tipc_disconnect(tsock->p); 1296 __tipc_port_disconnect(tsock->p);
1295 } 1297 }
1296 retval = TIPC_OK; 1298 retval = TIPC_OK;
1297 } 1299 }
@@ -1506,7 +1508,7 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p)
1506} 1508}
1507 1509
1508/** 1510/**
1509 * connect - establish a connection to another TIPC port 1511 * tipc_connect - establish a connection to another TIPC port
1510 * @sock: socket structure 1512 * @sock: socket structure
1511 * @dest: socket address for destination port 1513 * @dest: socket address for destination port
1512 * @destlen: size of socket address data structure 1514 * @destlen: size of socket address data structure
@@ -1514,8 +1516,8 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p)
1514 * 1516 *
1515 * Returns 0 on success, errno otherwise 1517 * Returns 0 on success, errno otherwise
1516 */ 1518 */
1517static int connect(struct socket *sock, struct sockaddr *dest, int destlen, 1519static int tipc_connect(struct socket *sock, struct sockaddr *dest,
1518 int flags) 1520 int destlen, int flags)
1519{ 1521{
1520 struct sock *sk = sock->sk; 1522 struct sock *sk = sock->sk;
1521 struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest; 1523 struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest;
@@ -1556,7 +1558,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
1556 if (!timeout) 1558 if (!timeout)
1557 m.msg_flags = MSG_DONTWAIT; 1559 m.msg_flags = MSG_DONTWAIT;
1558 1560
1559 res = send_msg(NULL, sock, &m, 0); 1561 res = tipc_sendmsg(NULL, sock, &m, 0);
1560 if ((res < 0) && (res != -EWOULDBLOCK)) 1562 if ((res < 0) && (res != -EWOULDBLOCK))
1561 goto exit; 1563 goto exit;
1562 1564
@@ -1587,13 +1589,13 @@ exit:
1587} 1589}
1588 1590
1589/** 1591/**
1590 * listen - allow socket to listen for incoming connections 1592 * tipc_listen - allow socket to listen for incoming connections
1591 * @sock: socket structure 1593 * @sock: socket structure
1592 * @len: (unused) 1594 * @len: (unused)
1593 * 1595 *
1594 * Returns 0 on success, errno otherwise 1596 * Returns 0 on success, errno otherwise
1595 */ 1597 */
1596static int listen(struct socket *sock, int len) 1598static int tipc_listen(struct socket *sock, int len)
1597{ 1599{
1598 struct sock *sk = sock->sk; 1600 struct sock *sk = sock->sk;
1599 int res; 1601 int res;
@@ -1648,14 +1650,14 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo)
1648} 1650}
1649 1651
1650/** 1652/**
1651 * accept - wait for connection request 1653 * tipc_accept - wait for connection request
1652 * @sock: listening socket 1654 * @sock: listening socket
1653 * @newsock: new socket that is to be connected 1655 * @newsock: new socket that is to be connected
1654 * @flags: file-related flags associated with socket 1656 * @flags: file-related flags associated with socket
1655 * 1657 *
1656 * Returns 0 on success, errno otherwise 1658 * Returns 0 on success, errno otherwise
1657 */ 1659 */
1658static int accept(struct socket *sock, struct socket *new_sock, int flags) 1660static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags)
1659{ 1661{
1660 struct sock *new_sk, *sk = sock->sk; 1662 struct sock *new_sk, *sk = sock->sk;
1661 struct sk_buff *buf; 1663 struct sk_buff *buf;
@@ -1702,7 +1704,7 @@ static int accept(struct socket *sock, struct socket *new_sock, int flags)
1702 /* Connect new socket to it's peer */ 1704 /* Connect new socket to it's peer */
1703 new_tsock->peer_name.ref = msg_origport(msg); 1705 new_tsock->peer_name.ref = msg_origport(msg);
1704 new_tsock->peer_name.node = msg_orignode(msg); 1706 new_tsock->peer_name.node = msg_orignode(msg);
1705 tipc_connect(new_ref, &new_tsock->peer_name); 1707 tipc_port_connect(new_ref, &new_tsock->peer_name);
1706 new_sock->state = SS_CONNECTED; 1708 new_sock->state = SS_CONNECTED;
1707 1709
1708 tipc_set_portimportance(new_ref, msg_importance(msg)); 1710 tipc_set_portimportance(new_ref, msg_importance(msg));
@@ -1719,7 +1721,7 @@ static int accept(struct socket *sock, struct socket *new_sock, int flags)
1719 struct msghdr m = {NULL,}; 1721 struct msghdr m = {NULL,};
1720 1722
1721 advance_rx_queue(sk); 1723 advance_rx_queue(sk);
1722 send_packet(NULL, new_sock, &m, 0); 1724 tipc_send_packet(NULL, new_sock, &m, 0);
1723 } else { 1725 } else {
1724 __skb_dequeue(&sk->sk_receive_queue); 1726 __skb_dequeue(&sk->sk_receive_queue);
1725 __skb_queue_head(&new_sk->sk_receive_queue, buf); 1727 __skb_queue_head(&new_sk->sk_receive_queue, buf);
@@ -1733,7 +1735,7 @@ exit:
1733} 1735}
1734 1736
1735/** 1737/**
1736 * shutdown - shutdown socket connection 1738 * tipc_shutdown - shutdown socket connection
1737 * @sock: socket structure 1739 * @sock: socket structure
1738 * @how: direction to close (must be SHUT_RDWR) 1740 * @how: direction to close (must be SHUT_RDWR)
1739 * 1741 *
@@ -1741,7 +1743,7 @@ exit:
1741 * 1743 *
1742 * Returns 0 on success, errno otherwise 1744 * Returns 0 on success, errno otherwise
1743 */ 1745 */
1744static int shutdown(struct socket *sock, int how) 1746static int tipc_shutdown(struct socket *sock, int how)
1745{ 1747{
1746 struct sock *sk = sock->sk; 1748 struct sock *sk = sock->sk;
1747 struct tipc_port *tport = tipc_sk_port(sk); 1749 struct tipc_port *tport = tipc_sk_port(sk);
@@ -1765,10 +1767,10 @@ restart:
1765 kfree_skb(buf); 1767 kfree_skb(buf);
1766 goto restart; 1768 goto restart;
1767 } 1769 }
1768 tipc_disconnect(tport->ref); 1770 tipc_port_disconnect(tport->ref);
1769 tipc_reject_msg(buf, TIPC_CONN_SHUTDOWN); 1771 tipc_reject_msg(buf, TIPC_CONN_SHUTDOWN);
1770 } else { 1772 } else {
1771 tipc_shutdown(tport->ref); 1773 tipc_port_shutdown(tport->ref);
1772 } 1774 }
1773 1775
1774 sock->state = SS_DISCONNECTING; 1776 sock->state = SS_DISCONNECTING;
@@ -1794,7 +1796,7 @@ restart:
1794} 1796}
1795 1797
1796/** 1798/**
1797 * setsockopt - set socket option 1799 * tipc_setsockopt - set socket option
1798 * @sock: socket structure 1800 * @sock: socket structure
1799 * @lvl: option level 1801 * @lvl: option level
1800 * @opt: option identifier 1802 * @opt: option identifier
@@ -1806,8 +1808,8 @@ restart:
1806 * 1808 *
1807 * Returns 0 on success, errno otherwise 1809 * Returns 0 on success, errno otherwise
1808 */ 1810 */
1809static int setsockopt(struct socket *sock, int lvl, int opt, char __user *ov, 1811static int tipc_setsockopt(struct socket *sock, int lvl, int opt,
1810 unsigned int ol) 1812 char __user *ov, unsigned int ol)
1811{ 1813{
1812 struct sock *sk = sock->sk; 1814 struct sock *sk = sock->sk;
1813 struct tipc_port *tport = tipc_sk_port(sk); 1815 struct tipc_port *tport = tipc_sk_port(sk);
@@ -1853,7 +1855,7 @@ static int setsockopt(struct socket *sock, int lvl, int opt, char __user *ov,
1853} 1855}
1854 1856
1855/** 1857/**
1856 * getsockopt - get socket option 1858 * tipc_getsockopt - get socket option
1857 * @sock: socket structure 1859 * @sock: socket structure
1858 * @lvl: option level 1860 * @lvl: option level
1859 * @opt: option identifier 1861 * @opt: option identifier
@@ -1865,8 +1867,8 @@ static int setsockopt(struct socket *sock, int lvl, int opt, char __user *ov,
1865 * 1867 *
1866 * Returns 0 on success, errno otherwise 1868 * Returns 0 on success, errno otherwise
1867 */ 1869 */
1868static int getsockopt(struct socket *sock, int lvl, int opt, char __user *ov, 1870static int tipc_getsockopt(struct socket *sock, int lvl, int opt,
1869 int __user *ol) 1871 char __user *ov, int __user *ol)
1870{ 1872{
1871 struct sock *sk = sock->sk; 1873 struct sock *sk = sock->sk;
1872 struct tipc_port *tport = tipc_sk_port(sk); 1874 struct tipc_port *tport = tipc_sk_port(sk);
@@ -1927,20 +1929,20 @@ static int getsockopt(struct socket *sock, int lvl, int opt, char __user *ov,
1927static const struct proto_ops msg_ops = { 1929static const struct proto_ops msg_ops = {
1928 .owner = THIS_MODULE, 1930 .owner = THIS_MODULE,
1929 .family = AF_TIPC, 1931 .family = AF_TIPC,
1930 .release = release, 1932 .release = tipc_release,
1931 .bind = bind, 1933 .bind = tipc_bind,
1932 .connect = connect, 1934 .connect = tipc_connect,
1933 .socketpair = sock_no_socketpair, 1935 .socketpair = sock_no_socketpair,
1934 .accept = sock_no_accept, 1936 .accept = sock_no_accept,
1935 .getname = get_name, 1937 .getname = tipc_getname,
1936 .poll = poll, 1938 .poll = tipc_poll,
1937 .ioctl = sock_no_ioctl, 1939 .ioctl = sock_no_ioctl,
1938 .listen = sock_no_listen, 1940 .listen = sock_no_listen,
1939 .shutdown = shutdown, 1941 .shutdown = tipc_shutdown,
1940 .setsockopt = setsockopt, 1942 .setsockopt = tipc_setsockopt,
1941 .getsockopt = getsockopt, 1943 .getsockopt = tipc_getsockopt,
1942 .sendmsg = send_msg, 1944 .sendmsg = tipc_sendmsg,
1943 .recvmsg = recv_msg, 1945 .recvmsg = tipc_recvmsg,
1944 .mmap = sock_no_mmap, 1946 .mmap = sock_no_mmap,
1945 .sendpage = sock_no_sendpage 1947 .sendpage = sock_no_sendpage
1946}; 1948};
@@ -1948,20 +1950,20 @@ static const struct proto_ops msg_ops = {
1948static const struct proto_ops packet_ops = { 1950static const struct proto_ops packet_ops = {
1949 .owner = THIS_MODULE, 1951 .owner = THIS_MODULE,
1950 .family = AF_TIPC, 1952 .family = AF_TIPC,
1951 .release = release, 1953 .release = tipc_release,
1952 .bind = bind, 1954 .bind = tipc_bind,
1953 .connect = connect, 1955 .connect = tipc_connect,
1954 .socketpair = sock_no_socketpair, 1956 .socketpair = sock_no_socketpair,
1955 .accept = accept, 1957 .accept = tipc_accept,
1956 .getname = get_name, 1958 .getname = tipc_getname,
1957 .poll = poll, 1959 .poll = tipc_poll,
1958 .ioctl = sock_no_ioctl, 1960 .ioctl = sock_no_ioctl,
1959 .listen = listen, 1961 .listen = tipc_listen,
1960 .shutdown = shutdown, 1962 .shutdown = tipc_shutdown,
1961 .setsockopt = setsockopt, 1963 .setsockopt = tipc_setsockopt,
1962 .getsockopt = getsockopt, 1964 .getsockopt = tipc_getsockopt,
1963 .sendmsg = send_packet, 1965 .sendmsg = tipc_send_packet,
1964 .recvmsg = recv_msg, 1966 .recvmsg = tipc_recvmsg,
1965 .mmap = sock_no_mmap, 1967 .mmap = sock_no_mmap,
1966 .sendpage = sock_no_sendpage 1968 .sendpage = sock_no_sendpage
1967}; 1969};
@@ -1969,20 +1971,20 @@ static const struct proto_ops packet_ops = {
1969static const struct proto_ops stream_ops = { 1971static const struct proto_ops stream_ops = {
1970 .owner = THIS_MODULE, 1972 .owner = THIS_MODULE,
1971 .family = AF_TIPC, 1973 .family = AF_TIPC,
1972 .release = release, 1974 .release = tipc_release,
1973 .bind = bind, 1975 .bind = tipc_bind,
1974 .connect = connect, 1976 .connect = tipc_connect,
1975 .socketpair = sock_no_socketpair, 1977 .socketpair = sock_no_socketpair,
1976 .accept = accept, 1978 .accept = tipc_accept,
1977 .getname = get_name, 1979 .getname = tipc_getname,
1978 .poll = poll, 1980 .poll = tipc_poll,
1979 .ioctl = sock_no_ioctl, 1981 .ioctl = sock_no_ioctl,
1980 .listen = listen, 1982 .listen = tipc_listen,
1981 .shutdown = shutdown, 1983 .shutdown = tipc_shutdown,
1982 .setsockopt = setsockopt, 1984 .setsockopt = tipc_setsockopt,
1983 .getsockopt = getsockopt, 1985 .getsockopt = tipc_getsockopt,
1984 .sendmsg = send_stream, 1986 .sendmsg = tipc_send_stream,
1985 .recvmsg = recv_stream, 1987 .recvmsg = tipc_recv_stream,
1986 .mmap = sock_no_mmap, 1988 .mmap = sock_no_mmap,
1987 .sendpage = sock_no_sendpage 1989 .sendpage = sock_no_sendpage
1988}; 1990};