Skip to content

Commit d7626b5

Browse files
Tuong Liendavem330
authored andcommitted
tipc: introduce Gap ACK blocks for broadcast link
As achieved through commit 9195948 ("tipc: improve TIPC throughput by Gap ACK blocks"), we apply the same mechanism for the broadcast link as well. The 'Gap ACK blocks' data field in a 'PROTOCOL/STATE_MSG' will consist of two parts built for both the broadcast and unicast types: 31 16 15 0 +-------------+-------------+-------------+-------------+ | bgack_cnt | ugack_cnt | len | +-------------+-------------+-------------+-------------+ - | gap | ack | | +-------------+-------------+-------------+-------------+ > bc gacks : : : | +-------------+-------------+-------------+-------------+ - | gap | ack | | +-------------+-------------+-------------+-------------+ > uc gacks : : : | +-------------+-------------+-------------+-------------+ - which is "automatically" backward-compatible. We also increase the max number of Gap ACK blocks to 128, allowing upto 64 blocks per type (total buffer size = 516 bytes). Besides, the 'tipc_link_advance_transmq()' function is refactored which is applicable for both the unicast and broadcast cases now, so some old functions can be removed and the code is optimized. With the patch, TIPC broadcast is more robust regardless of packet loss or disorder, latency, ... in the underlying network. Its performance is boost up significantly. For example, experiment with a 5% packet loss rate results: $ time tipc-pipe --mc --rdm --data_size 123 --data_num 1500000 real 0m 42.46s user 0m 1.16s sys 0m 17.67s Without the patch: $ time tipc-pipe --mc --rdm --data_size 123 --data_num 1500000 real 8m 27.94s user 0m 0.55s sys 0m 2.38s Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jmaloy@redhat.com> Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ff937b9 commit d7626b5

5 files changed

Lines changed: 293 additions & 185 deletions

File tree

‎net/tipc/bcast.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void tipc_bcast_ack_rcv(struct net *net, struct tipc_link *l,
474474
__skb_queue_head_init(&xmitq);
475475

476476
tipc_bcast_lock(net);
477-
tipc_link_bc_ack_rcv(l, acked, &xmitq);
477+
tipc_link_bc_ack_rcv(l, acked, 0, NULL, &xmitq);
478478
tipc_bcast_unlock(net);
479479

480480
tipc_bcbase_xmit(net, &xmitq);
@@ -492,6 +492,7 @@ int tipc_bcast_sync_rcv(struct net *net, struct tipc_link *l,
492492
struct tipc_msg *hdr)
493493
{
494494
struct sk_buff_head *inputq = &tipc_bc_base(net)->inputq;
495+
struct tipc_gap_ack_blks *ga;
495496
struct sk_buff_head xmitq;
496497
int rc = 0;
497498

@@ -501,8 +502,10 @@ int tipc_bcast_sync_rcv(struct net *net, struct tipc_link *l,
501502
if (msg_type(hdr) != STATE_MSG) {
502503
tipc_link_bc_init_rcv(l, hdr);
503504
} else if (!msg_bc_ack_invalid(hdr)) {
504-
tipc_link_bc_ack_rcv(l, msg_bcast_ack(hdr), &xmitq);
505-
rc = tipc_link_bc_sync_rcv(l, hdr, &xmitq);
505+
tipc_get_gap_ack_blks(&ga, l, hdr, false);
506+
rc = tipc_link_bc_ack_rcv(l, msg_bcast_ack(hdr),
507+
msg_bc_gap(hdr), ga, &xmitq);
508+
rc |= tipc_link_bc_sync_rcv(l, hdr, &xmitq);
506509
}
507510
tipc_bcast_unlock(net);
508511

0 commit comments

Comments
 (0)