From patchwork Tue May 26 09:40:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Maloy X-Patchwork-Id: 476480 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8DA701402B4 for ; Tue, 26 May 2015 23:41:29 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=yahoo.com header.i=@yahoo.com header.b=gT9se17J; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932367AbbEZNk6 (ORCPT ); Tue, 26 May 2015 09:40:58 -0400 Received: from smtp103.biz.mail.bf1.yahoo.com ([98.139.221.62]:36471 "EHLO smtp103.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755095AbbEZNkz (ORCPT ); Tue, 26 May 2015 09:40:55 -0400 Received: (qmail 93541 invoked from network); 26 May 2015 09:40:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1432633254; bh=qvTRElNXsBMfWQv7EvDb3t3+bA+FObyAQzaUMGc2Y/M=; h=From:To:Cc:Subject:Date:Message-Id; b=gT9se17Jxb02UD+C1dHx/Qo7UgIS10WPmVTEs2/152ySPjPh2YDZooeyq/VLGmVlWRSY8hQ8OK3hLt4LxQtA+FGb2coEVe6O40TR+UR8eYd9WxLkSr9OFROWNHLc/apgxJ/2Z/ERwArK0kp+MstO5PBKa9znld3A8JaVGzvSmY8= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: vnsFK2oVM1kYNYyysIWCytqLYmn1I8bGvt5aRePxdxupm6b ygFtD4_U3.EHbbRC50f_DK9lo5iAoRraS6WEcb9HaPKiU77mg12u40V_K4ng Z4LfNJ4bquyyAs3TbfM11e8HtTuMElu5ahGvTqLr6rFDeqcA4GDWemxONSeg 6nXssVkAS5XB0hfMWt_eZMlPsXBPQTQdgz4sD_LpO2R1EVkXmVSJARLtbK4t P7aH6iSy6QQNYeZT6QoGhoz._SohlV5wRq1M4lVUgYSmYmPItW7q.OMvIwU1 Koi69myJtDNYZHaeIzOqTj7nYlTP8ytKxQNFi_MCuPjyEt.JhwjmcIWmDlow D4AWOLUaQts5ZOBvGbftsjYAXHltgeUIlUwV1UowWtxvSQvxKHfBSTFEm61R JJIouCj4wf9YXmBAbXK1JAmroOvKD0CPlqI1qk_0apsSr7dwd96GAwrTRK_A U3EtNQen4QahKKhGNpgjhb3sadGm7RG8X9V30d6Rul3eEMrNh7NH2ZYSF1Uv fOJpc_EyiNzNX4DosMRoIMrZZHLr1PiZm X-Yahoo-SMTP: gPXIZm2swBAFQJ_Vx0CebjUfUdhJ From: Jon Maloy To: davem@davemloft.net Cc: netdev@vger.kernel.org, Paul Gortmaker , erik.hugne@ericsson.com, ying.xue@windriver.com, maloy@donjonn.com, tipc-discussion@lists.sourceforge.net, Jon Maloy Subject: [PATCH net-next 1/1] tipc: fix bug in link protocol message create function Date: Tue, 26 May 2015 05:40:19 -0400 Message-Id: <1432633219-3354-1-git-send-email-jon.maloy@ericsson.com> X-Mailer: git-send-email 1.9.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In commit dd3f9e70f59f43a5712eba9cf3ee4f1e6999540c ("tipc: add packet sequence number at instant of transmission") we made a change with the consequence that packets in the link backlog queue don't contain valid sequence numbers. However, when we create a link protocol message, we still use the sequence number of the first packet in the backlog, if there is any, as "next_sent" indicator in the message. This may entail unnecessary retransissions or stale packet transmission when there is very low traffic on the link. This commit fixes this issue by only using the current value of tipc_link::snd_nxt as indicator. Signed-off-by: Jon Maloy --- net/tipc/link.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index fb2a003..ca8b8e0 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1320,8 +1320,6 @@ void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg, if (!tipc_link_is_up(l_ptr)) return; - if (skb_queue_len(&l_ptr->backlogq)) - next_sent = buf_seqno(skb_peek(&l_ptr->backlogq)); msg_set_next_sent(msg, next_sent); if (!skb_queue_empty(&l_ptr->deferdq)) { last_rcv = buf_seqno(skb_peek(&l_ptr->deferdq));