Commit 6a862a44 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tipc-add-some-improvements'



Tuong Lien says:

====================
tipc: add some improvements

This series adds some improvements to TIPC.

The first patch improves the TIPC broadcast's performance with the 'Gap
ACK blocks' mechanism similar to unicast before, while the others give
support on tracing & statistics for broadcast links, and an alternative
to carry broadcast retransmissions via unicast which might be useful in
some cases.

Besides, the Nagle algorithm can now automatically 'adjust' itself
depending on the specific network condition a stream connection runs by
the last patch.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ff937b91 0a3e060f
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
#define BCLINK_WIN_MIN      32	/* bcast minimum link window size */

const char tipc_bclink_name[] = "broadcast-link";
unsigned long sysctl_tipc_bc_retruni __read_mostly;

/**
 * struct tipc_bc_base - base structure for keeping broadcast send state
@@ -474,7 +475,7 @@ void tipc_bcast_ack_rcv(struct net *net, struct tipc_link *l,
	__skb_queue_head_init(&xmitq);

	tipc_bcast_lock(net);
	tipc_link_bc_ack_rcv(l, acked, &xmitq);
	tipc_link_bc_ack_rcv(l, acked, 0, NULL, &xmitq, NULL);
	tipc_bcast_unlock(net);

	tipc_bcbase_xmit(net, &xmitq);
@@ -489,9 +490,11 @@ void tipc_bcast_ack_rcv(struct net *net, struct tipc_link *l,
 * RCU is locked, no other locks set
 */
int tipc_bcast_sync_rcv(struct net *net, struct tipc_link *l,
			struct tipc_msg *hdr)
			struct tipc_msg *hdr,
			struct sk_buff_head *retrq)
{
	struct sk_buff_head *inputq = &tipc_bc_base(net)->inputq;
	struct tipc_gap_ack_blks *ga;
	struct sk_buff_head xmitq;
	int rc = 0;

@@ -501,8 +504,13 @@ int tipc_bcast_sync_rcv(struct net *net, struct tipc_link *l,
	if (msg_type(hdr) != STATE_MSG) {
		tipc_link_bc_init_rcv(l, hdr);
	} else if (!msg_bc_ack_invalid(hdr)) {
		tipc_link_bc_ack_rcv(l, msg_bcast_ack(hdr), &xmitq);
		rc = tipc_link_bc_sync_rcv(l, hdr, &xmitq);
		tipc_get_gap_ack_blks(&ga, l, hdr, false);
		if (!sysctl_tipc_bc_retruni)
			retrq = &xmitq;
		rc = tipc_link_bc_ack_rcv(l, msg_bcast_ack(hdr),
					  msg_bc_gap(hdr), ga, &xmitq,
					  retrq);
		rc |= tipc_link_bc_sync_rcv(l, hdr, &xmitq);
	}
	tipc_bcast_unlock(net);

@@ -555,10 +563,8 @@ void tipc_bcast_remove_peer(struct net *net, struct tipc_link *rcv_l)
		tipc_sk_rcv(net, inputq);
}

int tipc_bclink_reset_stats(struct net *net)
int tipc_bclink_reset_stats(struct net *net, struct tipc_link *l)
{
	struct tipc_link *l = tipc_bc_sndlink(net);

	if (!l)
		return -ENOPROTOOPT;

@@ -686,7 +692,7 @@ int tipc_bcast_init(struct net *net)
	tn->bcbase = bb;
	spin_lock_init(&tipc_net(net)->bclock);

	if (!tipc_link_bc_create(net, 0, 0,
	if (!tipc_link_bc_create(net, 0, 0, NULL,
				 FB_MTU,
				 BCLINK_WIN_DEFAULT,
				 BCLINK_WIN_DEFAULT,
+6 −3
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ struct tipc_nl_msg;
struct tipc_nlist;
struct tipc_nitem;
extern const char tipc_bclink_name[];
extern unsigned long sysctl_tipc_bc_retruni;

#define TIPC_METHOD_EXPIRE msecs_to_jiffies(5000)

@@ -93,10 +94,12 @@ int tipc_bcast_rcv(struct net *net, struct tipc_link *l, struct sk_buff *skb);
void tipc_bcast_ack_rcv(struct net *net, struct tipc_link *l,
			struct tipc_msg *hdr);
int tipc_bcast_sync_rcv(struct net *net, struct tipc_link *l,
			struct tipc_msg *hdr);
int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg);
			struct tipc_msg *hdr,
			struct sk_buff_head *retrq);
int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg,
			struct tipc_link *bcl);
int tipc_nl_bc_link_set(struct net *net, struct nlattr *attrs[]);
int tipc_bclink_reset_stats(struct net *net);
int tipc_bclink_reset_stats(struct net *net, struct tipc_link *l);

u32 tipc_bcast_get_broadcast_mode(struct net *net);
u32 tipc_bcast_get_broadcast_ratio(struct net *net);
+285 −202

File changed.

Preview size limit exceeded, changes collapsed.

+7 −4

File changed.

Preview size limit exceeded, changes collapsed.

+5 −7

File changed.

Preview size limit exceeded, changes collapsed.

Loading