From patchwork Thu Feb 2 17:00:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cloutier, Joseph (Joseph)" X-Patchwork-Id: 139172 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 2B947104796 for ; Fri, 3 Feb 2012 04:00:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755505Ab2BBRAr (ORCPT ); Thu, 2 Feb 2012 12:00:47 -0500 Received: from ihemail2.lucent.com ([135.245.0.35]:39532 "EHLO ihemail2.lucent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754091Ab2BBRAp convert rfc822-to-8bit (ORCPT ); Thu, 2 Feb 2012 12:00:45 -0500 Received: from usnavsmail3.ndc.alcatel-lucent.com (usnavsmail3.ndc.alcatel-lucent.com [135.3.39.11]) by ihemail2.lucent.com (8.13.8/IER-o) with ESMTP id q12H0ZFC011262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Feb 2012 11:00:36 -0600 (CST) Received: from USNAVSXCHHUB01.ndc.alcatel-lucent.com (usnavsxchhub01.ndc.alcatel-lucent.com [135.3.39.110]) by usnavsmail3.ndc.alcatel-lucent.com (8.14.3/8.14.3/GMO) with ESMTP id q12H0ShR025742 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Thu, 2 Feb 2012 11:00:35 -0600 Received: from USNAVSXCHMBSA1.ndc.alcatel-lucent.com ([135.3.39.126]) by USNAVSXCHHUB01.ndc.alcatel-lucent.com ([135.3.39.110]) with mapi; Thu, 2 Feb 2012 11:00:24 -0600 From: "Cloutier, Joseph (Joseph)" To: "'YOSHIFUJI Hideaki'" CC: "'netdev@vger.kernel.org'" , "'Linus Torvalds'" Date: Thu, 2 Feb 2012 11:00:21 -0600 Subject: RE: [PATCH] iputils-s20101006.tar.bz2: "-w deadline" starts after "-c" xmitted, and "-c" was exceeded for flood ping Thread-Topic: [PATCH] iputils-s20101006.tar.bz2: "-w deadline" starts after "-c" xmitted, and "-c" was exceeded for flood ping Thread-Index: AczPS6BxQdeI448jQOqw5UwDRr6hagAceq0ABIOWMqA= Message-ID: <7D3B6706FA74174B8C1AC24710890745136F61BB69@USNAVSXCHMBSA1.ndc.alcatel-lucent.com> In-Reply-To: <7D3B6706FA74174B8C1AC24710890745136F1A0C15@USNAVSXCHMBSA1.ndc.alcatel-lucent.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.57 on 135.245.2.35 X-Scanned-By: MIMEDefang 2.64 on 135.3.39.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Yoshifuji- was this submission ok? Can you tell me the status of it? I am giving a talk to Verizon Wireless Engineers on trouble shooting again and would like to give them a status update on the "-w deadline" change. Thanks, Joe -----Original Message----- From: Cloutier, Joseph (Joseph) Sent: Tuesday, January 10, 2012 1:01 PM To: 'YOSHIFUJI Hideaki' Cc: 'netdev@vger.kernel.org'; 'Linus Torvalds' Subject: [PATCH] iputils-s20101006.tar.bz2: "-w deadline" starts after "-c" xmitted, and "-c" was exceeded for flood ping From: Joseph Cloutier 2 changes to ping & ping6. Only ping_common.c affected. 1- changed "-w deadline" to start deadline after "-c" pings have been transmitted, instead of from start of run. 2- fixed bug where > "-c" pings are sent in flood ping mode when "-w deadline" option is also used. Reason: Linux flood ping is an invaluable tool to finding duplex bugs, fiber problems, NE config problems- especially when used to trouble shoot wireless system backhaul problems. ANY dropped pings are red flag indicators. Current ping problem is that it terminates sometimes when outstanding pings are in transit, giving FALSE red flags. Change "-w deadline" to start after last "-c" transmitted ping allows cleanup of stragglers. Second fix is when "-f" option is running, "-c" is not rigorously checked when generating pings A more rigorous check was added. Signed-off-by: Joseph Cloutier --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- iputils-s20101006/ping_common.c.orig 2012-01-10 10:37:40.399719858 -0500 +++ iputils-s20101006/ping_common.c 2012-01-10 11:33:37.084662882 -0500 @@ -523,16 +523,6 @@ void setup(int icmp_sock) gettimeofday(&start_time, NULL); - if (deadline) { - struct itimerval it; - - it.it_interval.tv_sec = 0; - it.it_interval.tv_usec = 0; - it.it_value.tv_sec = deadline; - it.it_value.tv_usec = 0; - setitimer(ITIMER_REAL, &it, NULL); - } - if (isatty(STDOUT_FILENO)) { struct winsize w; @@ -553,6 +543,7 @@ void main_loop(int icmp_sock, __u8 *pack int cc; int next; int polling; + int sig_deadline = 0; iov.iov_base = (char *)packet; @@ -567,9 +558,22 @@ void main_loop(int icmp_sock, __u8 *pack /* Check for and do special actions. */ if (status_snapshot) status(); + if((npackets == ntransmitted) && deadline && + (sig_deadline == 0)){ + sig_deadline++; + struct itimerval it; + + it.it_interval.tv_sec = 0; + it.it_interval.tv_usec = 0; + it.it_value.tv_sec = deadline; + it.it_value.tv_usec = 0; + setitimer(ITIMER_REAL, &it, NULL); + } /* Send probes scheduled to this time. */ do { + if(npackets == ntransmitted) + break; next = pinger(); next = schedule_exit(next); } while (next <= 0);