Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5aa8dbbd authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tipc-next'



Jon Maloy says:

====================
tipc: Merge port and socket layer code

After the removal of the TIPC native interface, there is no reason to
keep a distinction between a "generic" port layer and a "specific"
socket layer in the code. Throughout the last months, we have posted
several series that aimed at facilitating removal of the port layer,
and in particular the port_lock spinlock, which in reality duplicates
the role normally kept by lock_sock()/bh_lock_sock().

In this series, we finalize this work, by making a significant number of
changes to the link, node, port and socket code, all with the aim of
reducing dependencies between the layers. In the final commits, we then
remove the port spinlock, port.c and port.h altogether.

After this series, we have a socket layer that has only few dependencies
to the rest of the stack, so that it should be possible to continue
cleanups of its code without significantly affecting other code.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f9474ddf 301bae56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ obj-$(CONFIG_TIPC) := tipc.o
tipc-y	+= addr.o bcast.o bearer.o config.o \
	   core.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  \
	   netlink.o node.o node_subscr.o \
	   socket.o log.o eth_media.o server.o

tipc-$(CONFIG_TIPC_MEDIA_IB)	+= ib_media.o
+4 −4
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@

#include "core.h"
#include "link.h"
#include "port.h"
#include "socket.h"
#include "msg.h"
#include "bcast.h"
@@ -300,8 +299,8 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
		tipc_link_push_queue(bcl);
		bclink_set_last_sent();
	}
	if (unlikely(released && !list_empty(&bcl->waiting_ports)))
		tipc_link_wakeup_ports(bcl, 0);
	if (unlikely(released && !skb_queue_empty(&bcl->waiting_sks)))
		bclink->node.action_flags |= TIPC_WAKEUP_USERS;
exit:
	tipc_bclink_unlock();
}
@@ -840,9 +839,10 @@ int tipc_bclink_init(void)
	sprintf(bcbearer->media.name, "tipc-broadcast");

	spin_lock_init(&bclink->lock);
	INIT_LIST_HEAD(&bcl->waiting_ports);
	__skb_queue_head_init(&bcl->waiting_sks);
	bcl->next_out_no = 1;
	spin_lock_init(&bclink->node.lock);
	__skb_queue_head_init(&bclink->node.waiting_sks);
	bcl->owner = &bclink->node;
	bcl->max_pkt = MAX_PKT_DEFAULT_MCAST;
	tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT);
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
 */

#include "core.h"
#include "port.h"
#include "socket.h"
#include "name_table.h"
#include "config.h"
#include "server.h"
@@ -266,7 +266,7 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
		rep_tlv_buf = tipc_media_get_names();
		break;
	case TIPC_CMD_SHOW_PORTS:
		rep_tlv_buf = tipc_port_get_ports();
		rep_tlv_buf = tipc_sk_socks_show();
		break;
	case TIPC_CMD_SHOW_STATS:
		rep_tlv_buf = tipc_show_stats();
+4 −5
Original line number Diff line number Diff line
@@ -35,11 +35,10 @@
 */

#include "core.h"
#include "ref.h"
#include "name_table.h"
#include "subscr.h"
#include "config.h"
#include "port.h"
#include "socket.h"

#include <linux/module.h>

@@ -85,7 +84,7 @@ static void tipc_core_stop(void)
	tipc_netlink_stop();
	tipc_subscr_stop();
	tipc_nametbl_stop();
	tipc_ref_table_stop();
	tipc_sk_ref_table_stop();
	tipc_socket_stop();
	tipc_unregister_sysctl();
}
@@ -99,7 +98,7 @@ static int tipc_core_start(void)

	get_random_bytes(&tipc_random, sizeof(tipc_random));

	err = tipc_ref_table_init(tipc_max_ports, tipc_random);
	err = tipc_sk_ref_table_init(tipc_max_ports, tipc_random);
	if (err)
		goto out_reftbl;

@@ -139,7 +138,7 @@ static int tipc_core_start(void)
out_netlink:
	tipc_nametbl_stop();
out_nametbl:
	tipc_ref_table_stop();
	tipc_sk_ref_table_stop();
out_reftbl:
	return err;
}
+4 −1
Original line number Diff line number Diff line
@@ -187,8 +187,11 @@ static inline void k_term_timer(struct timer_list *timer)

struct tipc_skb_cb {
	void *handle;
	bool deferred;
	struct sk_buff *tail;
	bool deferred;
	bool wakeup_pending;
	u16 chain_sz;
	u16 chain_imp;
};

#define TIPC_SKB_CB(__skb) ((struct tipc_skb_cb *)&((__skb)->cb[0]))
Loading