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

Commit b6d151bb authored by David S. Miller's avatar David S. Miller
Browse files
parents 1191cb83 617d3c7a
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -9,5 +9,3 @@ tipc-y += addr.o bcast.o bearer.o config.o \
	   name_distr.o  subscr.o name_table.o net.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 port.o ref.o  \
	   socket.o log.o eth_media.o
	   socket.o log.o eth_media.o

# End of file
+0 −3
Original line number Original line Diff line number Diff line
@@ -45,7 +45,6 @@
 *
 *
 * Returns 1 if domain address is valid, otherwise 0
 * Returns 1 if domain address is valid, otherwise 0
 */
 */

int tipc_addr_domain_valid(u32 addr)
int tipc_addr_domain_valid(u32 addr)
{
{
	u32 n = tipc_node(addr);
	u32 n = tipc_node(addr);
@@ -66,7 +65,6 @@ int tipc_addr_domain_valid(u32 addr)
 *
 *
 * Returns 1 if address can be used, otherwise 0
 * Returns 1 if address can be used, otherwise 0
 */
 */

int tipc_addr_node_valid(u32 addr)
int tipc_addr_node_valid(u32 addr)
{
{
	return tipc_addr_domain_valid(addr) && tipc_node(addr);
	return tipc_addr_domain_valid(addr) && tipc_node(addr);
@@ -86,7 +84,6 @@ int tipc_in_scope(u32 domain, u32 addr)
/**
/**
 * tipc_addr_scope - convert message lookup domain to a 2-bit scope value
 * tipc_addr_scope - convert message lookup domain to a 2-bit scope value
 */
 */

int tipc_addr_scope(u32 domain)
int tipc_addr_scope(u32 domain)
{
{
	if (likely(!domain))
	if (likely(!domain))
+0 −3
Original line number Original line Diff line number Diff line
@@ -58,7 +58,6 @@ static inline int in_own_cluster_exact(u32 addr)
/**
/**
 * in_own_node - test for node inclusion; <0.0.0> always matches
 * in_own_node - test for node inclusion; <0.0.0> always matches
 */
 */

static inline int in_own_node(u32 addr)
static inline int in_own_node(u32 addr)
{
{
	return (addr == tipc_own_addr) || !addr;
	return (addr == tipc_own_addr) || !addr;
@@ -67,7 +66,6 @@ static inline int in_own_node(u32 addr)
/**
/**
 * in_own_cluster - test for cluster inclusion; <0.0.0> always matches
 * in_own_cluster - test for cluster inclusion; <0.0.0> always matches
 */
 */

static inline int in_own_cluster(u32 addr)
static inline int in_own_cluster(u32 addr)
{
{
	return in_own_cluster_exact(addr) || !addr;
	return in_own_cluster_exact(addr) || !addr;
@@ -79,7 +77,6 @@ static inline int in_own_cluster(u32 addr)
 * Needed when address of a named message must be looked up a second time
 * Needed when address of a named message must be looked up a second time
 * after a network hop.
 * after a network hop.
 */
 */

static inline u32 addr_domain(u32 sc)
static inline u32 addr_domain(u32 sc)
{
{
	if (likely(sc == TIPC_NODE_SCOPE))
	if (likely(sc == TIPC_NODE_SCOPE))
+0 −22
Original line number Original line Diff line number Diff line
@@ -73,7 +73,6 @@ struct tipc_bcbearer_pair {
 * large local variables within multicast routines.  Concurrent access is
 * large local variables within multicast routines.  Concurrent access is
 * prevented through use of the spinlock "bc_lock".
 * prevented through use of the spinlock "bc_lock".
 */
 */

struct tipc_bcbearer {
struct tipc_bcbearer {
	struct tipc_bearer bearer;
	struct tipc_bearer bearer;
	struct tipc_media media;
	struct tipc_media media;
@@ -92,7 +91,6 @@ struct tipc_bcbearer {
 *
 *
 * Handles sequence numbering, fragmentation, bundling, etc.
 * Handles sequence numbering, fragmentation, bundling, etc.
 */
 */

struct tipc_bclink {
struct tipc_bclink {
	struct tipc_link link;
	struct tipc_link link;
	struct tipc_node node;
	struct tipc_node node;
@@ -169,7 +167,6 @@ static void bclink_update_last_sent(struct tipc_node *node, u32 seqno)
 *
 *
 * Called with bc_lock locked
 * Called with bc_lock locked
 */
 */

struct tipc_node *tipc_bclink_retransmit_to(void)
struct tipc_node *tipc_bclink_retransmit_to(void)
{
{
	return bclink->retransmit_to;
	return bclink->retransmit_to;
@@ -182,7 +179,6 @@ struct tipc_node *tipc_bclink_retransmit_to(void)
 *
 *
 * Called with bc_lock locked
 * Called with bc_lock locked
 */
 */

static void bclink_retransmit_pkt(u32 after, u32 to)
static void bclink_retransmit_pkt(u32 after, u32 to)
{
{
	struct sk_buff *buf;
	struct sk_buff *buf;
@@ -200,7 +196,6 @@ static void bclink_retransmit_pkt(u32 after, u32 to)
 *
 *
 * Node is locked, bc_lock unlocked.
 * Node is locked, bc_lock unlocked.
 */
 */

void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
{
{
	struct sk_buff *crs;
	struct sk_buff *crs;
@@ -280,7 +275,6 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
 *
 *
 * tipc_net_lock and node lock set
 * tipc_net_lock and node lock set
 */
 */

void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent)
void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent)
{
{
	struct sk_buff *buf;
	struct sk_buff *buf;
@@ -344,7 +338,6 @@ void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent)
 *
 *
 * Only tipc_net_lock set.
 * Only tipc_net_lock set.
 */
 */

static void bclink_peek_nack(struct tipc_msg *msg)
static void bclink_peek_nack(struct tipc_msg *msg)
{
{
	struct tipc_node *n_ptr = tipc_node_find(msg_destnode(msg));
	struct tipc_node *n_ptr = tipc_node_find(msg_destnode(msg));
@@ -365,7 +358,6 @@ static void bclink_peek_nack(struct tipc_msg *msg)
/*
/*
 * tipc_bclink_send_msg - broadcast a packet to all nodes in cluster
 * tipc_bclink_send_msg - broadcast a packet to all nodes in cluster
 */
 */

int tipc_bclink_send_msg(struct sk_buff *buf)
int tipc_bclink_send_msg(struct sk_buff *buf)
{
{
	int res;
	int res;
@@ -394,7 +386,6 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
 *
 *
 * Called with both sending node's lock and bc_lock taken.
 * Called with both sending node's lock and bc_lock taken.
 */
 */

static void bclink_accept_pkt(struct tipc_node *node, u32 seqno)
static void bclink_accept_pkt(struct tipc_node *node, u32 seqno)
{
{
	bclink_update_last_sent(node, seqno);
	bclink_update_last_sent(node, seqno);
@@ -420,7 +411,6 @@ static void bclink_accept_pkt(struct tipc_node *node, u32 seqno)
 *
 *
 * tipc_net_lock is read_locked, no other locks set
 * tipc_net_lock is read_locked, no other locks set
 */
 */

void tipc_bclink_recv_pkt(struct sk_buff *buf)
void tipc_bclink_recv_pkt(struct sk_buff *buf)
{
{
	struct tipc_msg *msg = buf_msg(buf);
	struct tipc_msg *msg = buf_msg(buf);
@@ -588,7 +578,6 @@ u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr)
 * Returns 0 (packet sent successfully) under all circumstances,
 * Returns 0 (packet sent successfully) under all circumstances,
 * since the broadcast link's pseudo-bearer never blocks
 * since the broadcast link's pseudo-bearer never blocks
 */
 */

static int tipc_bcbearer_send(struct sk_buff *buf,
static int tipc_bcbearer_send(struct sk_buff *buf,
			      struct tipc_bearer *unused1,
			      struct tipc_bearer *unused1,
			      struct tipc_media_addr *unused2)
			      struct tipc_media_addr *unused2)
@@ -601,7 +590,6 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
	 * preparation is skipped for broadcast link protocol messages
	 * preparation is skipped for broadcast link protocol messages
	 * since they are sent in an unreliable manner and don't need it
	 * since they are sent in an unreliable manner and don't need it
	 */
	 */

	if (likely(!msg_non_seq(buf_msg(buf)))) {
	if (likely(!msg_non_seq(buf_msg(buf)))) {
		struct tipc_msg *msg;
		struct tipc_msg *msg;


@@ -618,7 +606,6 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
	}
	}


	/* Send buffer over bearers until all targets reached */
	/* Send buffer over bearers until all targets reached */

	bcbearer->remains = bclink->bcast_nodes;
	bcbearer->remains = bclink->bcast_nodes;


	for (bp_index = 0; bp_index < MAX_BEARERS; bp_index++) {
	for (bp_index = 0; bp_index < MAX_BEARERS; bp_index++) {
@@ -660,7 +647,6 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
/**
/**
 * tipc_bcbearer_sort - create sets of bearer pairs used by broadcast bearer
 * tipc_bcbearer_sort - create sets of bearer pairs used by broadcast bearer
 */
 */

void tipc_bcbearer_sort(void)
void tipc_bcbearer_sort(void)
{
{
	struct tipc_bcbearer_pair *bp_temp = bcbearer->bpairs_temp;
	struct tipc_bcbearer_pair *bp_temp = bcbearer->bpairs_temp;
@@ -671,7 +657,6 @@ void tipc_bcbearer_sort(void)
	spin_lock_bh(&bc_lock);
	spin_lock_bh(&bc_lock);


	/* Group bearers by priority (can assume max of two per priority) */
	/* Group bearers by priority (can assume max of two per priority) */

	memset(bp_temp, 0, sizeof(bcbearer->bpairs_temp));
	memset(bp_temp, 0, sizeof(bcbearer->bpairs_temp));


	for (b_index = 0; b_index < MAX_BEARERS; b_index++) {
	for (b_index = 0; b_index < MAX_BEARERS; b_index++) {
@@ -687,7 +672,6 @@ void tipc_bcbearer_sort(void)
	}
	}


	/* Create array of bearer pairs for broadcasting */
	/* Create array of bearer pairs for broadcasting */

	bp_curr = bcbearer->bpairs;
	bp_curr = bcbearer->bpairs;
	memset(bcbearer->bpairs, 0, sizeof(bcbearer->bpairs));
	memset(bcbearer->bpairs, 0, sizeof(bcbearer->bpairs));


@@ -817,7 +801,6 @@ void tipc_bclink_stop(void)
/**
/**
 * tipc_nmap_add - add a node to a node map
 * tipc_nmap_add - add a node to a node map
 */
 */

void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
{
{
	int n = tipc_node(node);
	int n = tipc_node(node);
@@ -833,7 +816,6 @@ void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
/**
/**
 * tipc_nmap_remove - remove a node from a node map
 * tipc_nmap_remove - remove a node from a node map
 */
 */

void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
{
{
	int n = tipc_node(node);
	int n = tipc_node(node);
@@ -852,7 +834,6 @@ void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
 * @nm_b: input node map B
 * @nm_b: input node map B
 * @nm_diff: output node map A-B (i.e. nodes of A that are not in B)
 * @nm_diff: output node map A-B (i.e. nodes of A that are not in B)
 */
 */

static void tipc_nmap_diff(struct tipc_node_map *nm_a,
static void tipc_nmap_diff(struct tipc_node_map *nm_a,
			   struct tipc_node_map *nm_b,
			   struct tipc_node_map *nm_b,
			   struct tipc_node_map *nm_diff)
			   struct tipc_node_map *nm_diff)
@@ -878,7 +859,6 @@ static void tipc_nmap_diff(struct tipc_node_map *nm_a,
/**
/**
 * tipc_port_list_add - add a port to a port list, ensuring no duplicates
 * tipc_port_list_add - add a port to a port list, ensuring no duplicates
 */
 */

void tipc_port_list_add(struct tipc_port_list *pl_ptr, u32 port)
void tipc_port_list_add(struct tipc_port_list *pl_ptr, u32 port)
{
{
	struct tipc_port_list *item = pl_ptr;
	struct tipc_port_list *item = pl_ptr;
@@ -912,7 +892,6 @@ void tipc_port_list_add(struct tipc_port_list *pl_ptr, u32 port)
 * tipc_port_list_free - free dynamically created entries in port_list chain
 * tipc_port_list_free - free dynamically created entries in port_list chain
 *
 *
 */
 */

void tipc_port_list_free(struct tipc_port_list *pl_ptr)
void tipc_port_list_free(struct tipc_port_list *pl_ptr)
{
{
	struct tipc_port_list *item;
	struct tipc_port_list *item;
@@ -923,4 +902,3 @@ void tipc_port_list_free(struct tipc_port_list *pl_ptr)
		kfree(item);
		kfree(item);
	}
	}
}
}
+0 −3
Original line number Original line Diff line number Diff line
@@ -45,7 +45,6 @@
 * @count: # of nodes in set
 * @count: # of nodes in set
 * @map: bitmap of node identifiers that are in the set
 * @map: bitmap of node identifiers that are in the set
 */
 */

struct tipc_node_map {
struct tipc_node_map {
	u32 count;
	u32 count;
	u32 map[MAX_NODES / WSIZE];
	u32 map[MAX_NODES / WSIZE];
@@ -59,7 +58,6 @@ struct tipc_node_map {
 * @next: pointer to next entry in list
 * @next: pointer to next entry in list
 * @ports: array of port references
 * @ports: array of port references
 */
 */

struct tipc_port_list {
struct tipc_port_list {
	int count;
	int count;
	struct tipc_port_list *next;
	struct tipc_port_list *next;
@@ -77,7 +75,6 @@ void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node);
/**
/**
 * tipc_nmap_equal - test for equality of node maps
 * tipc_nmap_equal - test for equality of node maps
 */
 */

static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b)
static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b)
{
{
	return !memcmp(nm_a, nm_b, sizeof(*nm_a));
	return !memcmp(nm_a, nm_b, sizeof(*nm_a));
Loading