Since commit c0bceb97db9e ("tipc: add smart nagle feature"), the buffer queue to be transmitted may contain multiple skbs, which have been hold by Nagle. If so, at the 'tipc_link_xmit()', accumulating the TX fragmented or fragment messages' statistic based on the queue length is no longer accurate.
This commit resolves the issue by explicitly checking whether the queue contains a 'MSG_FRAGMENTER' message instead. Signed-off-by: Tuong Lien <tuong.t.l...@dektech.com.au> --- net/tipc/link.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index ee3b8d0576b8..4c073ddc7466 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -992,7 +992,6 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, u16 bc_ack = l->bc_rcvlink->rcv_nxt - 1; u16 ack = l->rcv_nxt - 1; u16 seqno = l->snd_nxt; - int pkt_cnt = skb_queue_len(list); int imp = msg_importance(hdr); unsigned int mss = tipc_link_mss(l); unsigned int cwin = l->window; @@ -1017,9 +1016,9 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, rc = link_schedule_user(l, hdr); } - if (pkt_cnt > 1) { + if (msg_user(hdr) == MSG_FRAGMENTER) { l->stats.sent_fragmented++; - l->stats.sent_fragments += pkt_cnt; + l->stats.sent_fragments += skb_queue_len(list); } /* Prepare each packet for sending, and add to relevant queue: */ -- 2.13.7 _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion