Skip to content

Commit

Permalink
tipc: Remove user registry subsystem
Browse files Browse the repository at this point in the history
Eliminates routines, data structures, and files that make up TIPC's
user registry. The user registry is no longer needed since the native
API routines that utilized it no longer exist and there are no longer
any internal TIPC services that use it.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jan 1, 2011
1 parent aa70200 commit b0c1e92
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 292 deletions.
2 changes: 1 addition & 1 deletion net/tipc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ tipc-y += addr.o bcast.o bearer.o config.o \
core.o handler.o link.o discover.o msg.o \
name_distr.o subscr.o name_table.o net.o \
netlink.o node.o node_subscr.o port.o ref.o \
socket.o user_reg.o dbg.o eth_media.o
socket.o dbg.o eth_media.o

# End of file
2 changes: 1 addition & 1 deletion net/tipc/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ int tipc_cfg_init(void)
struct tipc_name_seq seq;
int res;

res = tipc_createport(0, NULL, TIPC_CRITICAL_IMPORTANCE,
res = tipc_createport(NULL, TIPC_CRITICAL_IMPORTANCE,
NULL, NULL, NULL,
NULL, cfg_named_msg_event, NULL,
NULL, &config_port_ref);
Expand Down
3 changes: 0 additions & 3 deletions net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "core.h"
#include "ref.h"
#include "net.h"
#include "user_reg.h"
#include "name_table.h"
#include "subscr.h"
#include "config.h"
Expand Down Expand Up @@ -144,7 +143,6 @@ static void tipc_core_stop(void)
tipc_handler_stop();
tipc_cfg_stop();
tipc_subscr_stop();
tipc_reg_stop();
tipc_nametbl_stop();
tipc_ref_table_stop();
tipc_socket_stop();
Expand All @@ -167,7 +165,6 @@ static int tipc_core_start(void)

if ((res = tipc_handler_start()) ||
(res = tipc_ref_table_init(tipc_max_ports, tipc_random)) ||
(res = tipc_reg_start()) ||
(res = tipc_nametbl_init()) ||
(res = tipc_k_signal((Handler)tipc_subscr_start, 0)) ||
(res = tipc_k_signal((Handler)tipc_cfg_init, 0)) ||
Expand Down
11 changes: 2 additions & 9 deletions net/tipc/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "config.h"
#include "port.h"
#include "name_table.h"
#include "user_reg.h"

/* Connection management: */
#define PROBING_INTERVAL 3600000 /* [ms] => 1 h */
Expand Down Expand Up @@ -272,7 +271,6 @@ int tipc_deleteport(u32 ref)
tipc_nodesub_unsubscribe(&p_ptr->subscription);
}
if (p_ptr->user_port) {
tipc_reg_remove_port(p_ptr->user_port);
kfree(p_ptr->user_port);
}

Expand Down Expand Up @@ -934,12 +932,10 @@ void tipc_acknowledge(u32 ref, u32 ack)
}

/*
* tipc_createport(): user level call. Will add port to
* registry if non-zero user_ref.
* tipc_createport(): user level call.
*/

int tipc_createport(u32 user_ref,
void *usr_handle,
int tipc_createport(void *usr_handle,
unsigned int importance,
tipc_msg_err_event error_cb,
tipc_named_msg_err_event named_error_cb,
Expand All @@ -966,7 +962,6 @@ int tipc_createport(u32 user_ref,
}

p_ptr->user_port = up_ptr;
up_ptr->user_ref = user_ref;
up_ptr->usr_handle = usr_handle;
up_ptr->ref = p_ptr->publ.ref;
up_ptr->err_cb = error_cb;
Expand All @@ -976,8 +971,6 @@ int tipc_createport(u32 user_ref,
up_ptr->named_msg_cb = named_msg_cb;
up_ptr->conn_msg_cb = conn_msg_cb;
up_ptr->continue_event_cb = continue_event_cb;
INIT_LIST_HEAD(&up_ptr->uport_list);
tipc_reg_add_port(up_ptr);
*portref = p_ptr->publ.ref;
tipc_port_unlock(p_ptr);
return 0;
Expand Down
6 changes: 1 addition & 5 deletions net/tipc/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,12 @@ typedef void (*tipc_continue_event) (void *usr_handle, u32 portref);

/**
* struct user_port - TIPC user port (used with native API)
* @user_ref: id of user who created user port
* @usr_handle: user-specified field
* @ref: object reference to associated TIPC port
* <various callback routines>
* @uport_list: adjacent user ports in list of ports held by user
*/

struct user_port {
u32 user_ref;
void *usr_handle;
u32 ref;
tipc_msg_err_event err_cb;
Expand All @@ -95,7 +92,6 @@ struct user_port {
tipc_named_msg_event named_msg_cb;
tipc_conn_msg_event conn_msg_cb;
tipc_continue_event continue_event_cb;
struct list_head uport_list;
};

/**
Expand Down Expand Up @@ -181,7 +177,7 @@ int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode);

void tipc_acknowledge(u32 port_ref, u32 ack);

int tipc_createport(unsigned int tipc_user, void *usr_handle,
int tipc_createport(void *usr_handle,
unsigned int importance, tipc_msg_err_event error_cb,
tipc_named_msg_err_event named_error_cb,
tipc_conn_shutdown_event conn_error_cb, tipc_msg_event msg_cb,
Expand Down
6 changes: 2 additions & 4 deletions net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ static void subscr_named_msg_event(void *usr_handle,

/* Create server port & establish connection to subscriber */

tipc_createport(0,
subscriber,
tipc_createport(subscriber,
importance,
NULL,
NULL,
Expand Down Expand Up @@ -548,8 +547,7 @@ int tipc_subscr_start(void)
INIT_LIST_HEAD(&topsrv.subscriber_list);

spin_lock_bh(&topsrv.lock);
res = tipc_createport(0,
NULL,
res = tipc_createport(NULL,
TIPC_CRITICAL_IMPORTANCE,
NULL,
NULL,
Expand Down
218 changes: 0 additions & 218 deletions net/tipc/user_reg.c

This file was deleted.

Loading

0 comments on commit b0c1e92

Please sign in to comment.